validate fiscal year reused from accounts.utils
This commit is contained in:
parent
8595fcf910
commit
3c1fee7c6e
@ -66,11 +66,8 @@ class DocType:
|
|||||||
self.doc.cost_center = ""
|
self.doc.cost_center = ""
|
||||||
|
|
||||||
def validate_posting_date(self):
|
def validate_posting_date(self):
|
||||||
from accounts.utils import get_fiscal_year
|
from accounts.utils import validate_fiscal_year
|
||||||
fiscal_year = get_fiscal_year(self.doc.posting_date)[0]
|
validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, "Posting Date")
|
||||||
|
|
||||||
if fiscal_year != self.doc.fiscal_year:
|
|
||||||
msgprint(_("Posting date must be in the Selected Fiscal Year"), raise_exception=1)
|
|
||||||
|
|
||||||
def check_credit_limit(self):
|
def check_credit_limit(self):
|
||||||
master_type, master_name = webnotes.conn.get_value("Account",
|
master_type, master_name = webnotes.conn.get_value("Account",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user