mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-30 03:58:26 +00:00
fix: use in_import flag for checking imported records
(cherry picked from commit f504f2caf3)
This commit is contained in:
@@ -611,10 +611,9 @@ class AccountsController(TransactionBase):
|
|||||||
posting_date = (
|
posting_date = (
|
||||||
self.posting_date if self.doctype == "Sales Invoice" else (self.bill_date or self.posting_date)
|
self.posting_date if self.doctype == "Sales Invoice" else (self.bill_date or self.posting_date)
|
||||||
)
|
)
|
||||||
via_data_import = (
|
|
||||||
self.flags.updater_reference and self.flags.updater_reference.get("doctype") == "Data Import"
|
# skip due date validation for records via Data Import
|
||||||
)
|
if frappe.flags.in_import and getdate(self.due_date) < getdate(posting_date):
|
||||||
if via_data_import and getdate(self.due_date) < getdate(posting_date):
|
|
||||||
self.due_date = posting_date
|
self.due_date = posting_date
|
||||||
|
|
||||||
elif self.doctype == "Sales Invoice":
|
elif self.doctype == "Sales Invoice":
|
||||||
|
|||||||
Reference in New Issue
Block a user