mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +00:00
frappe/frappe#478 fixes
This commit is contained in:
@@ -210,7 +210,7 @@ class AccountsController(TransactionBase):
|
||||
"row_range": row_range
|
||||
})
|
||||
|
||||
if cint(tax.included_in_print_rate):
|
||||
if cint(getattr(tax, "included_in_print_rate", None)):
|
||||
if tax.charge_type == "Actual":
|
||||
# inclusive tax cannot be of type Actual
|
||||
throw((_("Row")
|
||||
@@ -259,7 +259,7 @@ class AccountsController(TransactionBase):
|
||||
|
||||
tax.tax_amount_after_discount_amount += current_tax_amount
|
||||
|
||||
if tax.category:
|
||||
if getattr(tax, "category", None):
|
||||
# if just for valuation, do not add the tax amount in total
|
||||
# hence, setting it as 0 for further steps
|
||||
current_tax_amount = 0.0 if (tax.category == "Valuation") \
|
||||
|
||||
@@ -50,7 +50,7 @@ class BuyingController(StockController):
|
||||
from erpnext.stock.utils import validate_warehouse_company
|
||||
|
||||
warehouses = list(set([d.warehouse for d in
|
||||
self.get(self.fname) if d.warehouse]))
|
||||
self.get(self.fname) if getattr(d, "warehouse", None)]))
|
||||
|
||||
for w in warehouses:
|
||||
validate_warehouse_company(w, self.company)
|
||||
|
||||
Reference in New Issue
Block a user