From fa97b3cac7f443789d5cecf9d8f3887505451b73 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2016 17:33:22 +0530 Subject: [PATCH] [fix] repost gle only if there is any stock account without warehouse --- .../v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py index ba1d067116..174bb119c1 100644 --- a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py +++ b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py @@ -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