fix: 'In Qty' and 'Out Qty' columns in Report Stock Ledger
This commit is contained in:
parent
84afdfdb4c
commit
372c5e51d5
@ -83,6 +83,9 @@ frappe.query_reports["Stock Ledger"] = {
|
||||
if (column.fieldname == "out_qty" && data.out_qty < 0) {
|
||||
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;
|
||||
},
|
||||
|
@ -39,10 +39,13 @@ def execute(filters=None):
|
||||
sle.update({
|
||||
"qty_after_transaction": actual_qty,
|
||||
"stock_value": stock_value,
|
||||
"in_qty": max(sle.actual_qty, 0),
|
||||
"out_qty": min(sle.actual_qty, 0)
|
||||
})
|
||||
|
||||
sle.update({
|
||||
"in_qty": max(sle.actual_qty, 0),
|
||||
"out_qty": min(sle.actual_qty, 0)
|
||||
})
|
||||
|
||||
# get the name of the item that was produced using this item
|
||||
if sle.voucher_type == "Stock Entry":
|
||||
purpose, work_order, fg_completed_qty = frappe.db.get_value(sle.voucher_type, sle.voucher_no, ["purpose", "work_order", "fg_completed_qty"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user