fix: status for settled credit notes in sales invoice list (#54764)

This commit is contained in:
Raffael Meyer
2026-05-20 21:50:41 +02:00
committed by GitHub
parent 33dc1f5f09
commit 341891e326

View File

@@ -27,6 +27,15 @@ frappe.listview_settings["Sales Invoice"] = {
"Partly Paid": "yellow",
"Internal Transfer": "darkgrey",
};
if (doc.status === "Credit Note Issued" && flt(doc.outstanding_amount) === 0) {
return [
__("Settled with Credit Note"),
"green",
`status,=,Credit Note Issued|outstanding_amount,=,0`,
];
}
return [__(doc.status), status_colors[doc.status], "status,=," + doc.status];
},
right_column: "grand_total",