Merge branch 'Item-Tax-Template' of https://github.com/SaiFi0102/erpnext.git into Item-Tax-Template-V12

# Conflicts:
#	erpnext/patches.txt
#	erpnext/stock/doctype/item/item.json
This commit is contained in:
Saif Ur Rehman
2019-01-10 04:23:40 +05:00
67 changed files with 2280 additions and 191 deletions

View File

@@ -303,9 +303,10 @@ def set_taxes(quotation, cart_settings):
customer_group = frappe.db.get_value("Customer", quotation.customer, "customer_group")
quotation.taxes_and_charges = set_taxes(quotation.customer, "Customer", \
quotation.transaction_date, quotation.company, customer_group, None, \
quotation.customer_address, quotation.shipping_address_name, 1)
quotation.taxes_and_charges = set_taxes(quotation.customer, "Customer",
quotation.transaction_date, quotation.company, customer_group=customer_group, supplier_group=None,
tax_category=quotation.tax_category, billing_address=quotation.customer_address,
shipping_address=quotation.shipping_address_name, use_for_shopping_cart=1)
#
# # clear table
quotation.set("taxes", [])

View File

@@ -107,9 +107,10 @@ class TestShoppingCart(unittest.TestCase):
from erpnext.accounts.party import set_taxes
tax_rule_master = set_taxes(quotation.customer, "Customer", \
quotation.transaction_date, quotation.company, None, None, \
quotation.customer_address, quotation.shipping_address_name, 1)
tax_rule_master = set_taxes(quotation.customer, "Customer",
quotation.transaction_date, quotation.company, customer_group=None, supplier_group=None,
tax_category=quotation.tax_category, billing_address=quotation.customer_address,
shipping_address=quotation.shipping_address_name, use_for_shopping_cart=1)
self.assertEqual(quotation.taxes_and_charges, tax_rule_master)
self.assertEqual(quotation.total_taxes_and_charges, 1000.0)