mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +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
|
// payment request
|
||||||
if(flt(doc.per_billed, precision('per_billed', doc)) < 100 + frappe.boot.sysdefaults.over_billing_allowance) {
|
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(
|
||||||
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(
|
||||||
__("Payment"),
|
__("Payment"),
|
||||||
|
|||||||
Reference in New Issue
Block a user