[patch] make gl entries for submitted sales invoice where no gl entries exists

This commit is contained in:
Nabin Hait 2013-11-14 18:41:09 +05:30
parent e83069cb32
commit 9e5da835ec
3 changed files with 13 additions and 0 deletions

View File

View File

@ -0,0 +1,12 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
si_no_gle = webnotes.conn.sql("""select si.name from `tabSales Invoice` si
where docstatus=1 and not exists(select name from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no=si.name)""")
for si in si_no_gle:
webnotes.get_obj("Sales Invoice", si[0]).make_gl_entries()

View File

@ -230,4 +230,5 @@ patch_list = [
"patches.october_2013.p07_rename_for_territory",
"patches.june_2013.p07_taxes_price_list_for_territory",
"patches.october_2013.p08_cleanup_after_item_price_module_change",
"patches.november_2013.p01_make_gl_entries_for_si",
]