mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
fix(stock): change valuation rate column label in stock ledger entry/report (backport #55323) (#55393)
Co-authored-by: Sudharsanan11 <sudharsananashok1975@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
|
"allow_bulk_edit": 1,
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
"autoname": "MAT-SLE-.YYYY.-.#####",
|
"autoname": "MAT-SLE-.YYYY.-.#####",
|
||||||
"creation": "2013-01-29 19:25:42",
|
"creation": "2013-01-29 19:25:42",
|
||||||
@@ -204,7 +205,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "valuation_rate",
|
"fieldname": "valuation_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Valuation Rate",
|
"label": "Average Rate",
|
||||||
"oldfieldname": "valuation_rate",
|
"oldfieldname": "valuation_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
@@ -362,11 +363,11 @@
|
|||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-10-04 09:59:15.546556",
|
"modified": "2026-05-26 19:07:43.537450",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Stock Ledger Entry",
|
"name": "Stock Ledger Entry",
|
||||||
"naming_rule": "Expression (old style)",
|
"naming_rule": "Expression",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -109,10 +109,11 @@ def execute(filters=None):
|
|||||||
if sle.serial_no:
|
if sle.serial_no:
|
||||||
update_available_serial_nos(available_serial_nos, sle)
|
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["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
|
sle["in_out_rate"] = sle.valuation_rate
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -193,7 +194,7 @@ def get_segregated_bundle_entries(sle, bundle_details, batch_balance_dict, filte
|
|||||||
new_sle.update(row)
|
new_sle.update(row)
|
||||||
new_sle.update(
|
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,
|
"in_qty": row.qty if row.qty > 0 else 0,
|
||||||
"out_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,
|
"qty_after_transaction": qty_before_transaction + row.qty,
|
||||||
@@ -375,7 +376,7 @@ def get_columns(filters):
|
|||||||
"convertible": "rate",
|
"convertible": "rate",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": _("Valuation Rate"),
|
"label": _("Outgoing Rate"),
|
||||||
"fieldname": "in_out_rate",
|
"fieldname": "in_out_rate",
|
||||||
"fieldtype": filters.valuation_field_type,
|
"fieldtype": filters.valuation_field_type,
|
||||||
"width": 140,
|
"width": 140,
|
||||||
|
|||||||
Reference in New Issue
Block a user