Merge pull request #40940 from Nihantra-Patel/fix_debit_creation_dev

fix: creation of return/debit note from purchase invoice
This commit is contained in:
Deepesh Garg
2024-04-10 21:39:08 +05:30
committed by GitHub

View File

@@ -136,7 +136,11 @@ 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")
);
}
}