[Fix] Subscription method (#14604)
* [Fix] Subscription method path * [Fix] Condition
This commit is contained in:
parent
4d80c05125
commit
79e5b07e62
@ -71,7 +71,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
this.make_debit_note, __("Make"));
|
||||
}
|
||||
|
||||
if(!doc.subscription) {
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -88,7 +88,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
this.make_payment_request, __("Make"));
|
||||
}
|
||||
|
||||
if(!doc.subscription) {
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -125,7 +125,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_payment_entry, __("Make"));
|
||||
}
|
||||
|
||||
if(!doc.subscription) {
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -22,9 +22,12 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
cur_frm.add_custom_button(__("Quotation"), this.make_quotation,
|
||||
__("Make"));
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
|
||||
}, __("Make"))
|
||||
|
||||
if(!this.frm.doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
|
||||
}, __("Make"))
|
||||
}
|
||||
}
|
||||
else if (this.frm.doc.docstatus===0) {
|
||||
|
||||
|
@ -146,7 +146,7 @@ $.extend(erpnext.utils, {
|
||||
|
||||
make_subscription: function(doctype, docname) {
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.doctype.subscription.subscription.make_subscription",
|
||||
method: "frappe.desk.doctype.auto_repeat.auto_repeat.make_auto_repeat",
|
||||
args: {
|
||||
doctype: doctype,
|
||||
docname: docname
|
||||
|
@ -60,7 +60,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
cur_frm.cscript['Declare Order Lost']);
|
||||
}
|
||||
|
||||
if(!doc.subscription) {
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -158,7 +158,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
function() { me.make_project() }, __("Make"));
|
||||
}
|
||||
|
||||
if(!doc.subscription) {
|
||||
if(!doc.auto_repeat) {
|
||||
this.frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -167,7 +167,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
}
|
||||
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
|
||||
|
||||
if(doc.docstatus==1 && !doc.subscription) {
|
||||
if(doc.docstatus==1 && !doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
|
@ -117,7 +117,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
||||
}
|
||||
cur_frm.add_custom_button(__('Retention Stock Entry'), this.make_retention_stock_entry, __("Make"));
|
||||
|
||||
if(!this.frm.doc.subscription) {
|
||||
if(!this.frm.doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
|
||||
}, __("Make"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user