diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py index d1f121765bc..55e414cb27d 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.py +++ b/accounts/doctype/fiscal_year/fiscal_year.py @@ -41,6 +41,7 @@ class DocType: from `tabFiscal Year` where name!=%s""", (self.doc.name)) for fiscal_year, ysd, yed in year_start_end_dates: - if getdate(self.doc.year_start_date) == ysd and getdate(self.doc.year_end_date) == yed: - webnotes.throw(_("Year Start Date and Year End Date are already \ - set in Fiscal Year: ") + fiscal_year) \ No newline at end of file + if (getdate(self.doc.year_start_date) == ysd and getdate(self.doc.year_end_date) == yed) \ + and (not webnotes.flags.in_test): + webnotes.throw(_("Year Start Date and Year End Date are already \ + set in Fiscal Year: ") + fiscal_year) \ No newline at end of file diff --git a/accounts/doctype/sales_invoice/pos.js b/accounts/doctype/sales_invoice/pos.js index dabfb97fd3e..adbdca1b633 100644 --- a/accounts/doctype/sales_invoice/pos.js +++ b/accounts/doctype/sales_invoice/pos.js @@ -322,7 +322,6 @@ erpnext.POS = Class.extend({ var me = this; this.party_field.set_input(this.frm.doc[this.party.toLowerCase()]); this.barcode.set_input(""); - this.total_flat_discount = 0.0; this.show_items_in_item_cart(); this.show_taxes(); @@ -377,19 +376,15 @@ erpnext.POS = Class.extend({ .find("tbody").empty(); $.each(taxes, function(i, d) { - if (d.charge_type == "Discount Amount") { - me.total_flat_discount += flt(d.rate); - } else { - $(repl('