fix: Linting errors

This commit is contained in:
Deepesh Garg 2021-05-13 14:04:51 +05:30
parent a87e3fcb7c
commit fd380d34f9
6 changed files with 52 additions and 53 deletions

View File

@ -719,8 +719,8 @@ class PaymentEntry(AccountsController):
"account": d.account_head, "account": d.account_head,
"against": self.party if self.payment_type=="Receive" else self.paid_from, "against": self.party if self.payment_type=="Receive" else self.paid_from,
dr_or_cr: d.base_tax_amount, dr_or_cr: d.base_tax_amount,
dr_or_cr + "_in_account_currency": d.base_tax_amount \ dr_or_cr + "_in_account_currency": d.base_tax_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else d.tax_amount, else d.tax_amount,
"cost_center": d.cost_center "cost_center": d.cost_center
}, account_currency, item=d)) }, account_currency, item=d))
@ -730,8 +730,8 @@ class PaymentEntry(AccountsController):
"account": self.advance_tax_account, "account": self.advance_tax_account,
"against": self.party if self.payment_type=="Receive" else self.paid_from, "against": self.party if self.payment_type=="Receive" else self.paid_from,
rev_dr_cr: d.base_tax_amount, rev_dr_cr: d.base_tax_amount,
rev_dr_cr + "_in_account_currency": d.base_tax_amount \ rev_dr_cr + "_in_account_currency": d.base_tax_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else d.tax_amount, else d.tax_amount,
"cost_center": d.cost_center or self.cost_center "cost_center": d.cost_center or self.cost_center
}, account_currency, item=d)) }, account_currency, item=d))
@ -806,7 +806,6 @@ class PaymentEntry(AccountsController):
for i, tax in enumerate(self.taxes): for i, tax in enumerate(self.taxes):
tax_rate = tax.rate tax_rate = tax.rate
current_tax_rate = 0.0
# To set row_id by default as previous row. # To set row_id by default as previous row.
if tax.charge_type in ["On Previous Row Amount", "On Previous Row Total"]: if tax.charge_type in ["On Previous Row Amount", "On Previous Row Total"]:

View File

@ -921,8 +921,8 @@ class PurchaseInvoice(BuyingController):
"account": tax.account_head, "account": tax.account_head,
"against": self.supplier, "against": self.supplier,
dr_or_cr: unallocated_amount, dr_or_cr: unallocated_amount,
dr_or_cr + "_in_account_currency": unallocated_amount \ dr_or_cr + "_in_account_currency": unallocated_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else unallocated_amount, else unallocated_amount,
'cost_center': tax.cost_center 'cost_center': tax.cost_center
}, account_currency, item=tax)) }, account_currency, item=tax))
@ -932,8 +932,8 @@ class PurchaseInvoice(BuyingController):
"account": pe.advance_tax_account, "account": pe.advance_tax_account,
"against": self.supplier, "against": self.supplier,
rev_dr_cr: unallocated_amount, rev_dr_cr: unallocated_amount,
rev_dr_cr + "_in_account_currency": unallocated_amount \ rev_dr_cr + "_in_account_currency": unallocated_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else unallocated_amount, else unallocated_amount,
'cost_center': tax.cost_center or self.cost_center 'cost_center': tax.cost_center or self.cost_center
}, account_currency, item=tax)) }, account_currency, item=tax))

View File

@ -933,8 +933,8 @@ class SalesInvoice(SellingController):
"account": tax.account_head, "account": tax.account_head,
"against": self.customer, "against": self.customer,
dr_or_cr: unallocated_amount, dr_or_cr: unallocated_amount,
dr_or_cr + "_in_account_currency": unallocated_amount \ dr_or_cr + "_in_account_currency": unallocated_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else unallocated_amount, else unallocated_amount,
'cost_center': tax.cost_center 'cost_center': tax.cost_center
}, account_currency, item=tax)) }, account_currency, item=tax))
@ -944,8 +944,8 @@ class SalesInvoice(SellingController):
"account": pe.advance_tax_account, "account": pe.advance_tax_account,
"against": self.customer, "against": self.customer,
rev_dr_cr: unallocated_amount, rev_dr_cr: unallocated_amount,
rev_dr_cr + "_in_account_currency": unallocated_amount \ rev_dr_cr + "_in_account_currency": unallocated_amount
if account_currency==self.company_currency \ if account_currency==self.company_currency
else unallocated_amount, else unallocated_amount,
'cost_center': tax.cost_center 'cost_center': tax.cost_center
}, account_currency, item=tax)) }, account_currency, item=tax))

View File

@ -136,7 +136,7 @@ def get_gle_map(filters, documents):
# create gle_map of the form # create gle_map of the form
# {"purchase_invoice": list of dict of all gle created for this invoice} # {"purchase_invoice": list of dict of all gle created for this invoice}
gle_map = {} gle_map = {}
filter_obj = {}
gle = frappe.db.get_all('GL Entry', gle = frappe.db.get_all('GL Entry',
{ {
"voucher_no": ["in", documents], "voucher_no": ["in", documents],

View File

@ -113,21 +113,21 @@ erpnext.payments = erpnext.stock.StockController.extend({
$(this.$body).find('.pos-payment-row').click(function() { $(this.$body).find('.pos-payment-row').click(function() {
me.idx = $(this).attr("idx"); me.idx = $(this).attr("idx");
me.set_outstanding_amount() me.set_outstanding_amount()
}) });
$(this.$body).find('.form-control').click(function() { $(this.$body).find('.form-control').click(function() {
me.idx = $(this).attr("idx"); me.idx = $(this).attr("idx");
me.set_outstanding_amount(); me.set_outstanding_amount();
me.update_paid_amount(true); me.update_paid_amount(true);
}) });
$(this.$body).find('.write_off_amount').change(function() { $(this.$body).find('.write_off_amount').change(function() {
me.write_off_amount(flt($(this).val()), precision("write_off_amount")); me.write_off_amount(flt($(this).val()), precision("write_off_amount"));
}) });
$(this.$body).find('.change_amount').change(function() { $(this.$body).find('.change_amount').change(function() {
me.change_amount(flt($(this).val()), precision("change_amount")); me.change_amount(flt($(this).val()), precision("change_amount"));
}) });
}, },
highlight_selected_row: function() { highlight_selected_row: function() {