mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 07:02:54 +00:00
[fix] Due Date cannot be before Posting Date during amendement of an invoice (#8841)
This commit is contained in:
committed by
Nabin Hait
parent
8a27cf3785
commit
3da400b532
@@ -52,7 +52,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
super(SalesInvoice, self).validate()
|
super(SalesInvoice, self).validate()
|
||||||
self.validate_posting_time()
|
self.validate_auto_set_posting_time()
|
||||||
self.so_dn_required()
|
self.so_dn_required()
|
||||||
self.validate_proj_cust()
|
self.validate_proj_cust()
|
||||||
self.validate_with_previous_doc()
|
self.validate_with_previous_doc()
|
||||||
@@ -378,6 +378,12 @@ class SalesInvoice(SellingController):
|
|||||||
def add_remarks(self):
|
def add_remarks(self):
|
||||||
if not self.remarks: self.remarks = 'No Remarks'
|
if not self.remarks: self.remarks = 'No Remarks'
|
||||||
|
|
||||||
|
def validate_auto_set_posting_time(self):
|
||||||
|
# Don't auto set the posting date and time if invoice is amended
|
||||||
|
if self.is_new() and self.amended_from:
|
||||||
|
self.set_posting_time = 1
|
||||||
|
|
||||||
|
self.validate_posting_time()
|
||||||
|
|
||||||
def so_dn_required(self):
|
def so_dn_required(self):
|
||||||
"""check in manage account if sales order / delivery note required or not."""
|
"""check in manage account if sales order / delivery note required or not."""
|
||||||
|
|||||||
Reference in New Issue
Block a user