fix: Codacy

This commit is contained in:
Charles-Henri Decultot
2019-04-26 18:56:47 +02:00
parent de0955b8ed
commit 3c13e8e8b9
2 changed files with 6 additions and 7 deletions

View File

@@ -27,6 +27,6 @@ const update_clearance_date = (frm, cdt, cdn) => {
if (e == "success") { if (e == "success") {
frappe.show_alert({message:__("Document {0} successfully uncleared", [e]), indicator:'green'}); frappe.show_alert({message:__("Document {0} successfully uncleared", [e]), indicator:'green'});
} }
}) });
}
} }
};

View File

@@ -47,7 +47,6 @@ class BankTransaction(StatusUpdater):
if paid_amount and allocated_amount: if paid_amount and allocated_amount:
if flt(allocated_amount[0]["allocated_amount"]) > flt(paid_amount): if flt(allocated_amount[0]["allocated_amount"]) > flt(paid_amount):
frappe.throw(_("The total allocated amount ({0}) is greated than the paid amount ({1}).".format(flt(allocated_amount[0]["allocated_amount"]), flt(paid_amount)))) frappe.throw(_("The total allocated amount ({0}) is greated than the paid amount ({1}).".format(flt(allocated_amount[0]["allocated_amount"]), flt(paid_amount))))
elif flt(allocated_amount[0]["allocated_amount"]) == flt(paid_amount): elif flt(allocated_amount[0]["allocated_amount"]) == flt(paid_amount):
if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]: if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]:
self.clear_simple_entry(payment_entry) self.clear_simple_entry(payment_entry)