Merge pull request #20454 from marination/stock-ledger-qty-column
fix: 'In Qty' and 'Out Qty' columns in Report Stock Ledger
This commit is contained in:
commit
565a810bf7
@ -83,6 +83,9 @@ frappe.query_reports["Stock Ledger"] = {
|
|||||||
if (column.fieldname == "out_qty" && data.out_qty < 0) {
|
if (column.fieldname == "out_qty" && data.out_qty < 0) {
|
||||||
value = "<span style='color:red'>" + value + "</span>";
|
value = "<span style='color:red'>" + value + "</span>";
|
||||||
}
|
}
|
||||||
|
else if (column.fieldname == "in_qty" && data.in_qty > 0) {
|
||||||
|
value = "<span style='color:green'>" + value + "</span>";
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -38,7 +38,10 @@ def execute(filters=None):
|
|||||||
|
|
||||||
sle.update({
|
sle.update({
|
||||||
"qty_after_transaction": actual_qty,
|
"qty_after_transaction": actual_qty,
|
||||||
"stock_value": stock_value,
|
"stock_value": stock_value
|
||||||
|
})
|
||||||
|
|
||||||
|
sle.update({
|
||||||
"in_qty": max(sle.actual_qty, 0),
|
"in_qty": max(sle.actual_qty, 0),
|
||||||
"out_qty": min(sle.actual_qty, 0)
|
"out_qty": min(sle.actual_qty, 0)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user