2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-11-14 13:11:09 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-11-16 07:03:34 +00:00
|
|
|
from __future__ import unicode_literals
|
2013-11-14 13:11:09 +00:00
|
|
|
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`
|
2013-11-15 05:02:47 +00:00
|
|
|
where voucher_type='Sales Invoice' and voucher_no=si.name)
|
|
|
|
and modified >= '2013-08-01'""")
|
2013-11-14 13:11:09 +00:00
|
|
|
|
|
|
|
for si in si_no_gle:
|
|
|
|
webnotes.get_obj("Sales Invoice", si[0]).make_gl_entries()
|