mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
[fix] total amount in journal entry
This commit is contained in:
13
erpnext/patches/v6_10/fix_jv_total_amount.py
Normal file
13
erpnext/patches/v6_10/fix_jv_total_amount.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import frappe
|
||||
|
||||
# patch all for-print field (total amount) in Journal Entry in 2015
|
||||
def execute():
|
||||
for je in frappe.get_all("Journal Entry", filters={"creation": (">", "2015-01-01")}):
|
||||
je = frappe.get_doc("Journal Entry", je.name)
|
||||
original = je.total_amount
|
||||
|
||||
je.set_print_format_fields()
|
||||
|
||||
if je.total_amount != original:
|
||||
je.db_set("total_amount", je.total_amount, update_modified=False)
|
||||
je.db_set("total_amount_in_words", je.total_amount_in_words, update_modified=False)
|
||||
Reference in New Issue
Block a user