mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: stock ledger rendering glitch (#29482)
undefined Issue (cherry picked from commitf380042195) Co-authored-by: smehata <53169014+smehata@users.noreply.github.com> (cherry picked from commit0dafa8a12a) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -86,10 +86,10 @@ frappe.query_reports["Stock Ledger"] = {
|
|||||||
],
|
],
|
||||||
"formatter": function (value, row, column, data, default_formatter) {
|
"formatter": function (value, row, column, data, default_formatter) {
|
||||||
value = default_formatter(value, row, column, data);
|
value = default_formatter(value, row, column, data);
|
||||||
if (column.fieldname == "out_qty" && data.out_qty < 0) {
|
if (column.fieldname == "out_qty" && data && 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) {
|
else if (column.fieldname == "in_qty" && data && data.in_qty > 0) {
|
||||||
value = "<span style='color:green'>" + value + "</span>";
|
value = "<span style='color:green'>" + value + "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user