[patch] make gl entries for submitted sales invoice where no gl entries exists
diff --git a/patches/november_2013/__init__.py b/patches/november_2013/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/patches/november_2013/__init__.py
diff --git a/patches/november_2013/p01_make_gl_entries_for_si.py b/patches/november_2013/p01_make_gl_entries_for_si.py
new file mode 100644
index 0000000..cfe107a
--- /dev/null
+++ b/patches/november_2013/p01_make_gl_entries_for_si.py
@@ -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()
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 0cc393e..82eb6e4 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -230,4 +230,5 @@
 	"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",
 ]
\ No newline at end of file