Lint and fix JS files

This commit is contained in:
Faris Ansari
2017-05-30 12:54:42 +05:30
parent dae7721384
commit ab74ca7fff
138 changed files with 1280 additions and 1268 deletions

View File

@@ -89,7 +89,7 @@ frappe.ui.form.on('Salary Structure', {
}
})
get_payment_mode_account = function(frm, mode_of_payment, callback){
var get_payment_mode_account = function(frm, mode_of_payment, callback){
return frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
args: {
@@ -108,7 +108,7 @@ get_payment_mode_account = function(frm, mode_of_payment, callback){
cur_frm.cscript.account_head = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.account_head){
msgprint("Please select Charge Type first");
frappe.msgprint("Please select Charge Type first");
frappe.model.set_value(cdt, cdn, "account_head", "");
} else if(d.account_head && d.charge_type!=="Actual") {
frappe.call({
@@ -152,7 +152,7 @@ cur_frm.cscript.validate_taxes_and_charges = function(cdt, cdn) {
}
}
if(msg) {
validated = false;
frappe.validated = false;
refresh_field("taxes");
frappe.throw(msg);
}
@@ -176,9 +176,10 @@ cur_frm.cscript.validate_inclusive_tax = function(tax) {
// inclusive tax cannot be of type Actual
actual_type_error();
} else if(tax.charge_type == "On Previous Row Amount" &&
!cint(this.frm.doc["taxes"][tax.row_id - 1].included_in_print_rate)) {
// referred row should also be an inclusive tax
on_previous_row_error(tax.row_id);
!cint(this.frm.doc["taxes"][tax.row_id - 1].included_in_print_rate)
) {
// referred row should also be an inclusive tax
on_previous_row_error(tax.row_id);
} else if(tax.charge_type == "On Previous Row Total") {
var taxes_not_included = $.map(this.frm.doc["taxes"].slice(0, tax.row_id),
function(t) { return cint(t.included_in_print_rate) ? null : t; });