fix: creation of return/debit note from sales invoice

This commit is contained in:
Nihantra C. Patel
2024-04-10 14:36:58 +05:30
committed by GitHub
parent 9905b9e4b0
commit dd10087db6

View File

@@ -136,7 +136,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
if (!doc.is_return && doc.docstatus == 1) {
if (doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
this.frm.add_custom_button(__("Return / Debit Note"), this.make_debit_note, __("Create"));
this.frm.add_custom_button(__("Return / Debit Note"), this.make_debit_note.bind(this), __("Create"));
}
}