[fix] [minor] perpetual inventory: account for each warehouse

This commit is contained in:
Nabin Hait
2013-09-17 15:15:16 +05:30
parent 5cd1d54347
commit 142007a226
15 changed files with 88 additions and 75 deletions

View File

@@ -91,8 +91,8 @@ def validate_total_debit_credit(total_debit, total_credit):
def validate_account_for_auto_accounting_for_stock(gl_map):
if gl_map[0].voucher_type=="Journal Voucher":
aii_accounts = [d[0] for d in webnotes.conn.sql("""select account from tabWarehouse
where ifnull(account, '')!=''""")]
aii_accounts = [d[0] for d in webnotes.conn.sql("""select name from tabAccount
where account_type = 'Warehouse' and ifnull(master_name, '')!=''""")]
for entry in gl_map:
if entry.account in aii_accounts: