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

This commit is contained in:
Nabin Hait 2013-11-15 10:32:47 +05:30
parent 7373a83043
commit c10621a5be

View File

@ -6,7 +6,8 @@ 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)""")
where voucher_type='Sales Invoice' and voucher_no=si.name)
and modified >= '2013-08-01'""")
for si in si_no_gle:
webnotes.get_obj("Sales Invoice", si[0]).make_gl_entries()