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:
Ankush 2021-06-21 11:15:16 +05:30 committed by GitHub
parent 4b32ccb124
commit e78364c191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {