fix: status indicator for delivery notes (#26062)
On list view `per_returned` isn't fetched i.e. `undefined` which become 0 hence the list view indicator is false. This "computation" is already done by status updater, so relying on doc.status is better than redefining it.
This commit is contained in:
parent
4b32ccb124
commit
e78364c191
@ -6,8 +6,8 @@ frappe.listview_settings['Delivery Note'] = {
|
||||
return [__("Return"), "gray", "is_return,=,Yes"];
|
||||
} else if (doc.status === "Closed") {
|
||||
return [__("Closed"), "green", "status,=,Closed"];
|
||||
} else if (flt(doc.per_returned, 2) === 100) {
|
||||
return [__("Return Issued"), "grey", "per_returned,=,100"];
|
||||
} else if (doc.status === "Return Issued") {
|
||||
return [__("Return Issued"), "grey", "status,=,Return Issued"];
|
||||
} else if (flt(doc.per_billed, 2) < 100) {
|
||||
return [__("To Bill"), "orange", "per_billed,<,100"];
|
||||
} else if (flt(doc.per_billed, 2) === 100) {
|
||||
|
Loading…
Reference in New Issue
Block a user