From 82d0a1a13e510b1031bb4cca6316575adbf65f31 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Tue, 13 Apr 2021 12:35:42 +0530 Subject: [PATCH] style: Add missing semicolons - & make formatting consistent --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 2 +- .../payment_reconciliation/payment_reconciliation.js | 2 +- .../payroll/doctype/salary_structure/salary_structure.js | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 411bd3d6fca..d76641dc9bd 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -334,7 +334,7 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({ + ((value==null || value==="") ? "" : format_currency(Math.abs(value), currency)) + " " + dr_or_cr + ""; - } + }; this.frm.fields_dict.accounts.grid.update_docfield_property('balance', 'formatter', formatter); this.frm.fields_dict.accounts.grid.update_docfield_property('party_balance', 'formatter', formatter); }, diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index a27659b8f7b..08103184d54 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -236,7 +236,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext if (invoices) { this.frm.fields_dict.payment.grid.update_docfield_property( 'invoice_number', 'options', "\n" + invoices.join("\n") - ) + ); $.each(me.frm.doc.payments || [], function(i, p) { if(!in_list(invoices, cstr(p.invoice_number))) p.invoice_number = null; diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure.js b/erpnext/payroll/doctype/salary_structure/salary_structure.js index 21e9d812254..b539b1b8a9c 100755 --- a/erpnext/payroll/doctype/salary_structure/salary_structure.js +++ b/erpnext/payroll/doctype/salary_structure/salary_structure.js @@ -119,9 +119,11 @@ frappe.ui.form.on('Salary Structure', { let fields_read_only = ["is_tax_applicable", "is_flexible_benefit", "variable_based_on_taxable_salary"]; fields_read_only.forEach(function(field) { frm.fields_dict.earnings.grid.update_docfield_property( - field, 'read_only', 1); + field, 'read_only', 1 + ); frm.fields_dict.deductions.grid.update_docfield_property( - field, 'read_only', 1); + field, 'read_only', 1 + ); }); frm.trigger('set_earning_deduction_component'); },