From 4fca6cae349925bf248cb161e4fa8bc3186ad648 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 3 Feb 2020 15:53:27 +0530 Subject: [PATCH] feat: add tax category in pos profile (#20413) * feat: add tax category in pos profile * fix: review fixes --- erpnext/accounts/doctype/pos_profile/pos_profile.json | 10 +++++++++- .../accounts/doctype/sales_invoice/sales_invoice.py | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index aa9f85a05a..fba1bed9dd 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -3,6 +3,7 @@ "autoname": "Prompt", "creation": "2013-05-24 12:15:51", "doctype": "DocType", + "engine": "InnoDB", "field_order": [ "disabled", "section_break_2", @@ -50,6 +51,7 @@ "income_account", "expense_account", "taxes_and_charges", + "tax_category", "apply_discount_on", "accounting_dimensions_section", "cost_center", @@ -381,11 +383,17 @@ { "fieldname": "dimension_col_break", "fieldtype": "Column Break" + }, + { + "fieldname": "tax_category", + "fieldtype": "Link", + "label": "Tax Category", + "options": "Tax Category" } ], "icon": "icon-cog", "idx": 1, - "modified": "2019-05-25 22:56:30.352693", + "modified": "2020-01-24 15:52:03.797701", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index d576a66835..d8344ea6a6 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -420,6 +420,9 @@ class SalesInvoice(SellingController): if pos: self.allow_print_before_pay = pos.allow_print_before_pay + + if not for_validate: + self.tax_category = pos.get("tax_category") if not for_validate and not self.customer: self.customer = pos.customer