Merge branch 'master' of github.com:webnotes/erpnext into cleanup

This commit is contained in:
Rushabh Mehta
2013-10-31 15:16:05 +05:30
12 changed files with 101 additions and 101 deletions

View File

@@ -6,7 +6,6 @@ test_records = [
"doctype": "POS Setting",
"name": "_Test POS Setting",
"currency": "INR",
"conversion_rate": 1.0,
"selling_price_list": "_Test Price List",
"company": "_Test Company",
"warehouse": "_Test Warehouse - _TC",

View File

@@ -338,11 +338,14 @@ class DocType(BuyingController):
)
# accumulate valuation tax
if tax.category in ("Valuation", "Valuation and Total") and flt(tax.tax_amount) \
and tax.cost_center:
valuation_tax.setdefault(tax.cost_center, 0)
valuation_tax[tax.cost_center] += \
(tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.tax_amount)
if tax.category in ("Valuation", "Valuation and Total") and flt(tax.tax_amount):
if auto_accounting_for_stock and not tax.cost_center:
webnotes.throw(_("Row %(row)s: Cost Center is mandatory \
if tax/charges category is Valuation or Valuation and Total" %
{"row": tax.idx}))
valuation_tax.setdefault(tax.cost_center, 0)
valuation_tax[tax.cost_center] += \
(tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.tax_amount)
# item gl entries
stock_item_and_auto_accounting_for_stock = False