fix: syntax fixes for native class (#26064)

This commit is contained in:
Ankush 2021-06-16 11:14:40 +05:30 committed by GitHub
parent 0950481253
commit fd84847f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

View File

@ -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;

View File

@ -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)){

View File

@ -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;