refactor: remove use of can_create for Payment Request (#41647)

This commit is contained in:
ruthra kumar
2024-05-27 13:27:11 +05:30
committed by GitHub
parent c5c4d5c61f
commit 47bc5691a1

View File

@@ -770,13 +770,11 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
flt(doc.per_billed, precision("per_billed", doc)) < flt(doc.per_billed, precision("per_billed", doc)) <
100 + frappe.boot.sysdefaults.over_billing_allowance 100 + frappe.boot.sysdefaults.over_billing_allowance
) { ) {
if (frappe.model.can_create("Payment Request")) { this.frm.add_custom_button(
this.frm.add_custom_button( __("Payment Request"),
__("Payment Request"), () => this.make_payment_request(),
() => this.make_payment_request(), __("Create")
__("Create") );
);
}
if (frappe.model.can_create("Payment Entry")) { if (frappe.model.can_create("Payment Entry")) {
this.frm.add_custom_button( this.frm.add_custom_button(