Skip to content

Commit

Permalink
fix: Patch to update reference_due_date in Journal Entry (#33616)
Browse files Browse the repository at this point in the history
* fix: Patch to update reference_due_date in Journal Entry (#33616)
  • Loading branch information
mergify[bot] authored Jan 20, 2023
1 parent 0f9d81e commit 0740120
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ erpnext.patches.v13_0.show_india_localisation_deprecation_warning
erpnext.patches.v13_0.show_hr_payroll_deprecation_warning
erpnext.patches.v13_0.reset_corrupt_defaults
erpnext.patches.v13_0.create_accounting_dimensions_for_asset_repair
erpnext.patches.v14_0.update_reference_due_date_in_journal_entry

[post_model_sync]
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import frappe


def execute():
if frappe.db.get_value("Journal Entry Account", {"reference_due_date": ""}):
frappe.db.sql(
"""
UPDATE `tabJournal Entry Account`
SET reference_due_date = NULL
WHERE reference_due_date = ''
"""
)

0 comments on commit 0740120

Please sign in to comment.