From fd84847f2b263d0611a80387e90329e29c93c6d8 Mon Sep 17 00:00:00 2001 From: Ankush Date: Wed, 16 Jun 2021 11:14:40 +0530 Subject: [PATCH] fix: syntax fixes for native class (#26064) --- erpnext/public/js/controllers/taxes_and_totals.js | 8 ++++---- erpnext/public/js/controllers/transaction.js | 6 +++--- erpnext/public/js/payment/payments.js | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 3f2436ddcb..cc33b8bc35 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -268,7 +268,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); } - update_item_tax_map: function() { + update_item_tax_map() { let me = this; let item_codes = []; let item_rates = {}; @@ -305,9 +305,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } }); } - }, + } - add_taxes_from_item_tax_template: function(item_tax_map) { + add_taxes_from_item_tax_template(item_tax_map) { let me = this; if (item_tax_map && cint(frappe.defaults.get_default("add_taxes_from_item_tax_template"))) { @@ -325,7 +325,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } }); } - }, + } calculate_taxes() { var me = this; diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 40f9ae12b8..7e1ffa96a2 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1918,7 +1918,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }); } - make_quality_inspection: function () { + make_quality_inspection() { let data = []; const fields = [ { @@ -2040,9 +2040,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } else { dialog.show(); } - }, + } - get_method_for_payment: function(){ + get_method_for_payment() { var method = "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry"; if(cur_frm.doc.__onload && cur_frm.doc.__onload.make_payment_via_journal_entry){ if(in_list(['Sales Invoice', 'Purchase Invoice'], cur_frm.doc.doctype)){ diff --git a/erpnext/public/js/payment/payments.js b/erpnext/public/js/payment/payments.js index 0466cd62cd..4c23669dbb 100644 --- a/erpnext/public/js/payment/payments.js +++ b/erpnext/public/js/payment/payments.js @@ -22,7 +22,7 @@ erpnext.payments = class payments extends erpnext.stock.StockController { }); } - set_payment_primary_action: function() { + set_payment_primary_action() { var me = this; this.dialog.set_primary_action(__("Submit"), function() { @@ -107,7 +107,7 @@ erpnext.payments = class payments extends erpnext.stock.StockController { this.bind_numeric_keys_event(); } - bind_form_control_event(){ + bind_form_control_event() { var me = this; $(this.$body).find('.pos-payment-row').click(function() { me.idx = $(this).attr("idx"); @@ -127,7 +127,7 @@ erpnext.payments = class payments extends erpnext.stock.StockController { $(this.$body).find('.change_amount').change(function() { me.change_amount(flt($(this).val()), precision("change_amount")); }); - }, + } highlight_selected_row() { var selected_row = $(this.$body).find(repl(".pos-payment-row[idx='%(idx)s']", {'idx': this.idx})); @@ -135,9 +135,9 @@ erpnext.payments = class payments extends erpnext.stock.StockController { selected_row.addClass('selected-payment-mode'); $(this.$body).find('.amount').attr('disabled', true); this.selected_mode.attr('disabled', false); - }, + } - bind_numeric_keys_event: function() { + bind_numeric_keys_event() { var me = this; $(this.$body).find('.pos-keyboard-key').click(function(){ me.payment_val += $(this).text(); @@ -192,7 +192,7 @@ erpnext.payments = class payments extends erpnext.stock.StockController { this.frm.doc.change_amount = flt(change_amount, precision("change_amount")); this.calculate_write_off_amount(); this.show_amounts(); - }, + } update_paid_amount(update_write_off) { var me = this;