[Enhance] Provision to show inclusive tax in print (#12345)

* [Enhance] Provision to show inclusive tax in print

* POS Print format
This commit is contained in:
rohitwaghchaure
2018-01-08 15:20:15 +05:30
committed by Nabin Hait
parent 44fa9a6d9d
commit bf4c114c58
8 changed files with 133 additions and 6 deletions

View File

@@ -375,6 +375,17 @@ class AccountsController(TransactionBase):
return res
def is_inclusive_tax(self):
is_inclusive = cint(frappe.db.get_single_value("Accounts Settings",
"show_inclusive_tax_in_print"))
if is_inclusive:
is_inclusive = 0
if self.get("taxes", filters={"included_in_print_rate": 1}):
is_inclusive = 1
return is_inclusive
def validate_advance_entries(self):
order_field = "sales_order" if self.doctype == "Sales Invoice" else "purchase_order"
order_list = list(set([d.get(order_field)