This commit is contained in:
Nabin Hait
2014-04-04 11:06:10 +05:30
parent c10213d861
commit 312ba99e71
11 changed files with 13 additions and 14 deletions

View File

@@ -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") \

View File

@@ -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)