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:
@@ -16,7 +16,7 @@ from erpnext.accounts.party import get_party_account_currency, validate_party_fr
|
||||
from erpnext.exceptions import InvalidCurrency
|
||||
from six import text_type
|
||||
|
||||
force_item_fields = ("item_group", "brand", "stock_uom", "is_fixed_asset")
|
||||
force_item_fields = ("item_group", "brand", "stock_uom", "is_fixed_asset", "item_tax_rate")
|
||||
|
||||
|
||||
class AccountsController(TransactionBase):
|
||||
@@ -605,13 +605,14 @@ class AccountsController(TransactionBase):
|
||||
advance.account_currency)
|
||||
|
||||
if advance.account_currency == self.currency:
|
||||
order_total = self.grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("grand_total"),
|
||||
currency=advance.account_currency)
|
||||
order_total = self.get("rounded_total") or self.grand_total
|
||||
precision = "rounded_total" if self.get("rounded_total") else "grand_total"
|
||||
else:
|
||||
order_total = self.base_grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
|
||||
currency=advance.account_currency)
|
||||
order_total = self.get("base_rounded_total") or self.base_grand_total
|
||||
precision = "base_rounded_total" if self.get("base_rounded_total") else "base_grand_total"
|
||||
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision(precision),
|
||||
currency=advance.account_currency)
|
||||
|
||||
if self.currency == self.company_currency and advance_paid > order_total:
|
||||
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
|
||||
|
||||
Reference in New Issue
Block a user