mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
refactor: Payment btn criteria for Cr/Dr notes
This commit is contained in:
@@ -86,8 +86,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.outstanding_amount != 0
|
if(doc.docstatus == 1 && doc.outstanding_amount != 0 && !doc.on_hold) {
|
||||||
&& !(doc.is_return && doc.return_against) && !doc.on_hold) {
|
|
||||||
this.frm.add_custom_button(
|
this.frm.add_custom_button(
|
||||||
__('Payment'),
|
__('Payment'),
|
||||||
() => this.make_payment_entry(),
|
() => this.make_payment_entry(),
|
||||||
|
|||||||
@@ -98,8 +98,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
|
|||||||
erpnext.accounts.ledger_preview.show_stock_ledger_preview(this.frm);
|
erpnext.accounts.ledger_preview.show_stock_ledger_preview(this.frm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doc.docstatus == 1 && doc.outstanding_amount!=0
|
if (doc.docstatus == 1 && doc.outstanding_amount!=0) {
|
||||||
&& !(cint(doc.is_return) && doc.return_against)) {
|
|
||||||
this.frm.add_custom_button(
|
this.frm.add_custom_button(
|
||||||
__('Payment'),
|
__('Payment'),
|
||||||
() => this.make_payment_entry(),
|
() => this.make_payment_entry(),
|
||||||
|
|||||||
Reference in New Issue
Block a user