Skip to content

Commit

Permalink
fix: Valuation Rate column UX in stock ledger report
Browse files Browse the repository at this point in the history
(cherry picked from commit be19e4f)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Nov 23, 2022
1 parent 188b18d commit 5c065e8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions erpnext/stock/report/stock_ledger/stock_ledger.py
Expand Up @@ -58,6 +58,12 @@ def execute(filters=None):
if sle.serial_no:
update_available_serial_nos(available_serial_nos, sle)

if sle.actual_qty:
sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision)

elif sle.voucher_type == "Stock Reconciliation":
sle["in_out_rate"] = sle.valuation_rate

data.append(sle)

if include_uom:
Expand Down Expand Up @@ -185,10 +191,18 @@ def get_columns(filters):
"convertible": "rate",
},
{
"label": _("Valuation Rate"),
"label": _("Avg Rate (Balance Stock)"),
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"width": 110,
"width": 180,
"options": "Company:company:default_currency",
"convertible": "rate",
},
{
"label": _("Valuation Rate"),
"fieldname": "in_out_rate",
"fieldtype": "Currency",
"width": 140,
"options": "Company:company:default_currency",
"convertible": "rate",
},
Expand Down

0 comments on commit 5c065e8

Please sign in to comment.