Update bank_reconciliation.py
set to null if clearance_date is blank because if not it will set it just 0000-00-00.
This commit is contained in:
parent
cb66d3a8c9
commit
af667f77e6
@ -52,6 +52,8 @@ class BankReconciliation(Document):
|
||||
frappe.throw(_("Clearance date cannot be before check date in row {0}").format(d.idx))
|
||||
|
||||
if d.clearance_date or self.include_reconciled_entries:
|
||||
if not d.clearance_date:
|
||||
d.clearance_date = None
|
||||
frappe.db.set_value("Journal Entry", d.voucher_id, "clearance_date", d.clearance_date)
|
||||
frappe.db.sql("""update `tabJournal Entry` set clearance_date = %s, modified = %s
|
||||
where name=%s""", (d.clearance_date, nowdate(), d.voucher_id))
|
||||
|
Loading…
Reference in New Issue
Block a user