mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-05 22:48:27 +00:00
[fix] removed validate due date in Journal Entry
This commit is contained in:
@@ -32,7 +32,6 @@ class JournalEntry(AccountsController):
|
|||||||
self.set_against_account()
|
self.set_against_account()
|
||||||
self.create_remarks()
|
self.create_remarks()
|
||||||
self.set_print_format_fields()
|
self.set_print_format_fields()
|
||||||
self.check_due_date()
|
|
||||||
self.validate_expense_claim()
|
self.validate_expense_claim()
|
||||||
self.validate_credit_debit_note()
|
self.validate_credit_debit_note()
|
||||||
self.validate_empty_accounts_table()
|
self.validate_empty_accounts_table()
|
||||||
@@ -83,20 +82,6 @@ class JournalEntry(AccountsController):
|
|||||||
for customer in customers:
|
for customer in customers:
|
||||||
check_credit_limit(customer, self.company)
|
check_credit_limit(customer, self.company)
|
||||||
|
|
||||||
def check_due_date(self):
|
|
||||||
if self.cheque_date:
|
|
||||||
for d in self.get("accounts"):
|
|
||||||
if d.party_type and d.party and d.get("credit" if d.party_type=="Customer" else "debit") > 0:
|
|
||||||
due_date = None
|
|
||||||
if d.reference_type in ("Sales Invoice", "Purchase Invoice"):
|
|
||||||
due_date = frappe.db.get_value(d.reference_type, d.reference_name, "due_date")
|
|
||||||
|
|
||||||
if due_date and getdate(self.cheque_date) > getdate(due_date):
|
|
||||||
diff = date_diff(self.cheque_date, due_date)
|
|
||||||
if diff > 0:
|
|
||||||
msgprint(_("Note: Reference Date exceeds invoice due date by {0} days for {1} {2}")
|
|
||||||
.format(diff, d.party_type, d.party))
|
|
||||||
|
|
||||||
def validate_cheque_info(self):
|
def validate_cheque_info(self):
|
||||||
if self.voucher_type in ['Bank Entry']:
|
if self.voucher_type in ['Bank Entry']:
|
||||||
if not self.cheque_no or not self.cheque_date:
|
if not self.cheque_no or not self.cheque_date:
|
||||||
|
|||||||
Reference in New Issue
Block a user