mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
fix: over billed purchase receipt status
(cherry picked from commit 15e354f76e)
This commit is contained in:
@@ -96,7 +96,7 @@ status_map = {
|
|||||||
["Return Issued", "eval:self.per_returned == 100 and self.docstatus == 1"],
|
["Return Issued", "eval:self.per_returned == 100 and self.docstatus == 1"],
|
||||||
[
|
[
|
||||||
"Completed",
|
"Completed",
|
||||||
"eval:(self.per_billed == 100 and self.docstatus == 1) or (self.docstatus == 1 and self.grand_total == 0 and self.per_returned != 100 and self.is_return == 0)",
|
"eval:(self.per_billed >= 100 and self.docstatus == 1) or (self.docstatus == 1 and self.grand_total == 0 and self.per_returned != 100 and self.is_return == 0)",
|
||||||
],
|
],
|
||||||
["Cancelled", "eval:self.docstatus==2"],
|
["Cancelled", "eval:self.docstatus==2"],
|
||||||
["Closed", "eval:self.status=='Closed' and self.docstatus != 2"],
|
["Closed", "eval:self.status=='Closed' and self.docstatus != 2"],
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ frappe.listview_settings["Purchase Receipt"] = {
|
|||||||
return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"];
|
return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"];
|
||||||
} else if (flt(doc.per_billed, 2) > 0 && flt(doc.per_billed, 2) < 100) {
|
} else if (flt(doc.per_billed, 2) > 0 && flt(doc.per_billed, 2) < 100) {
|
||||||
return [__("Partly Billed"), "yellow", "per_billed,<,100|docstatus,=,1"];
|
return [__("Partly Billed"), "yellow", "per_billed,<,100|docstatus,=,1"];
|
||||||
} else if (flt(doc.grand_total) === 0 || flt(doc.per_billed, 2) === 100) {
|
} else if (flt(doc.grand_total) === 0 || flt(doc.per_billed, 2) >= 100) {
|
||||||
return [__("Completed"), "green", "per_billed,=,100|docstatus,=,1"];
|
return [__("Completed"), "green", "per_billed,>=,100|docstatus,=,1"];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user