[fix] repost gle only if there is any stock account without warehouse

This commit is contained in:
Nabin Hait 2016-07-27 17:33:22 +05:30
parent 95f53cca44
commit fa97b3cac7

View File

@ -15,6 +15,8 @@ def execute():
and (warehouse is null or warehouse = '')""")
if warehouses:
warehouses = set_warehouse_for_stock_account(warehouses)
if not warehouses:
return
stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no
from `tabStock Ledger Entry` sle