[fix] [minor] perpetual inventory: account for each warehouse
diff --git a/accounts/general_ledger.py b/accounts/general_ledger.py
index acb1694..05c52db 100644
--- a/accounts/general_ledger.py
+++ b/accounts/general_ledger.py
@@ -91,8 +91,8 @@
 			
 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: