Merge pull request #36254 from deepeshgarg007/remove_auto_repeat
fix: Remove auto repeat (subscription) button from Sales and Purchase documents
This commit is contained in:
commit
ebdf1959fd
@ -101,12 +101,6 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
|
|||||||
cur_frm.add_custom_button(__('Return / Debit Note'),
|
cur_frm.add_custom_button(__('Return / Debit Note'),
|
||||||
this.make_debit_note, __('Create'));
|
this.make_debit_note, __('Create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doc.auto_repeat) {
|
|
||||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doc.outstanding_amount > 0 && !cint(doc.is_return) && !doc.on_hold) {
|
if (doc.outstanding_amount > 0 && !cint(doc.is_return) && !doc.on_hold) {
|
||||||
|
@ -163,12 +163,6 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
|
|||||||
cur_frm.cscript.make_maintenance_schedule();
|
cur_frm.cscript.make_maintenance_schedule();
|
||||||
}, __('Create'));
|
}, __('Create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doc.auto_repeat) {
|
|
||||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show buttons only when pos view is active
|
// Show buttons only when pos view is active
|
||||||
|
@ -251,12 +251,6 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends e
|
|||||||
function() { me.make_payment_request() }, __('Create'));
|
function() { me.make_payment_request() }, __('Create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doc.auto_repeat) {
|
|
||||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doc.docstatus === 1 && !doc.inter_company_order_reference) {
|
if (doc.docstatus === 1 && !doc.inter_company_order_reference) {
|
||||||
let me = this;
|
let me = this;
|
||||||
let internal = me.frm.doc.is_internal_supplier;
|
let internal = me.frm.doc.is_internal_supplier;
|
||||||
|
@ -126,12 +126,6 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doc.auto_repeat) {
|
|
||||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,12 +377,6 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
|
|||||||
this.frm.add_custom_button(__('Project'), () => this.make_project(), __('Create'));
|
this.frm.add_custom_button(__('Project'), () => this.make_project(), __('Create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doc.auto_repeat) {
|
|
||||||
this.frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doc.docstatus === 1 && !doc.inter_company_order_reference) {
|
if (doc.docstatus === 1 && !doc.inter_company_order_reference) {
|
||||||
let me = this;
|
let me = this;
|
||||||
let internal = me.frm.doc.is_internal_customer;
|
let internal = me.frm.doc.is_internal_customer;
|
||||||
|
@ -235,12 +235,6 @@ erpnext.stock.DeliveryNoteController = class DeliveryNoteController extends erpn
|
|||||||
__("Status"))
|
__("Status"))
|
||||||
}
|
}
|
||||||
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
|
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
|
||||||
|
|
||||||
if(doc.docstatus==1 && !doc.is_return && !doc.auto_repeat) {
|
|
||||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
|
||||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
make_shipment() {
|
make_shipment() {
|
||||||
|
@ -189,12 +189,6 @@ erpnext.stock.PurchaseReceiptController = class PurchaseReceiptController extend
|
|||||||
}
|
}
|
||||||
cur_frm.add_custom_button(__('Retention Stock Entry'), this.make_retention_stock_entry, __('Create'));
|
cur_frm.add_custom_button(__('Retention Stock Entry'), this.make_retention_stock_entry, __('Create'));
|
||||||
|
|
||||||
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)
|
|
||||||
}, __('Create'))
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user