mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
Merge pull request #55323 from aerele/fix/support-#68170
fix(stock): change valuation rate column label in stock ledger entry/report
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_bulk_edit": 1,
|
||||
"allow_copy": 1,
|
||||
"autoname": "MAT-SLE-.YYYY.-.#####",
|
||||
"creation": "2013-01-29 19:25:42",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Other",
|
||||
"engine": "InnoDB",
|
||||
"is_submittable": 1,
|
||||
"field_order": [
|
||||
"item_code",
|
||||
"warehouse",
|
||||
@@ -205,7 +205,7 @@
|
||||
{
|
||||
"fieldname": "valuation_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Valuation Rate",
|
||||
"label": "Average Rate",
|
||||
"oldfieldname": "valuation_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -361,12 +361,13 @@
|
||||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2025-10-04 09:59:15.546556",
|
||||
"modified": "2026-05-26 19:07:43.537450",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Ledger Entry",
|
||||
"naming_rule": "Expression (old style)",
|
||||
"naming_rule": "Expression",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
|
||||
@@ -108,10 +108,11 @@ def execute(filters=None):
|
||||
if sle.serial_no:
|
||||
update_available_serial_nos(available_serial_nos, sle)
|
||||
|
||||
if sle.actual_qty:
|
||||
if sle.actual_qty < 0:
|
||||
sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision)
|
||||
sle["incoming_rate"] = 0
|
||||
|
||||
elif sle.voucher_type == "Stock Reconciliation":
|
||||
elif sle.voucher_type == "Stock Reconciliation" and sle.actual_qty < 0:
|
||||
sle["in_out_rate"] = sle.valuation_rate
|
||||
|
||||
if (
|
||||
@@ -192,7 +193,7 @@ def get_segregated_bundle_entries(sle, bundle_details, batch_balance_dict, filte
|
||||
new_sle.update(row)
|
||||
new_sle.update(
|
||||
{
|
||||
"in_out_rate": flt(new_sle.stock_value_difference / row.qty) if row.qty else 0,
|
||||
"in_out_rate": flt(new_sle.stock_value_difference / row.qty) if row.qty < 0 else 0,
|
||||
"in_qty": row.qty if row.qty > 0 else 0,
|
||||
"out_qty": row.qty if row.qty < 0 else 0,
|
||||
"qty_after_transaction": qty_before_transaction + row.qty,
|
||||
@@ -374,7 +375,7 @@ def get_columns(filters):
|
||||
"convertible": "rate",
|
||||
},
|
||||
{
|
||||
"label": _("Valuation Rate"),
|
||||
"label": _("Outgoing Rate"),
|
||||
"fieldname": "in_out_rate",
|
||||
"fieldtype": filters.valuation_field_type,
|
||||
"width": 140,
|
||||
|
||||
Reference in New Issue
Block a user