mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
repost gle for Purchase Invoice with update stock
This commit is contained in:
@@ -321,4 +321,4 @@ erpnext.patches.v7_0.update_mode_of_payment_type
|
||||
finally:erpnext.patches.v7_0.update_timesheet_communications
|
||||
erpnext.patches.v7_0.update_status_of_zero_amount_sales_order
|
||||
erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty
|
||||
erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock
|
||||
erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01
|
||||
@@ -11,6 +11,10 @@ def execute():
|
||||
|
||||
for pi in frappe.db.sql("""select name from `tabPurchase Invoice`
|
||||
where update_stock=1 and docstatus=1 order by posting_date asc""", as_dict=1):
|
||||
|
||||
frappe.db.sql("""delete from `tabGL Entry`
|
||||
where voucher_type = 'Purchase Invoice' and voucher_no = %s""", pi.name)
|
||||
|
||||
pi_doc = frappe.get_doc("Purchase Invoice", pi.name)
|
||||
pi_doc.make_gl_entries()
|
||||
pi_doc.make_gl_entries(repost_future_gle=False)
|
||||
frappe.db.commit()
|
||||
Reference in New Issue
Block a user