mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-12 23:07:41 +00:00
refactor: remove use of can_create for Payment Request (#41647)
(cherry picked from commit 47bc5691a1)
This commit is contained in:
@@ -363,13 +363,12 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
|
||||
}
|
||||
// payment request
|
||||
if(flt(doc.per_billed, precision('per_billed', doc)) < 100 + frappe.boot.sysdefaults.over_billing_allowance) {
|
||||
if (frappe.model.can_create("Payment Request")) {
|
||||
this.frm.add_custom_button(
|
||||
__("Payment Request"),
|
||||
() => this.make_payment_request(),
|
||||
__("Create")
|
||||
);
|
||||
}
|
||||
this.frm.add_custom_button(
|
||||
__("Payment Request"),
|
||||
() => this.make_payment_request(),
|
||||
__("Create")
|
||||
);
|
||||
|
||||
if (frappe.model.can_create("Payment Entry")) {
|
||||
this.frm.add_custom_button(
|
||||
__("Payment"),
|
||||
|
||||
Reference in New Issue
Block a user