[fixes] production, added qty transferred, fix gantt, fiscal year (set fiscal year, instead of validation
This commit is contained in:
@@ -41,10 +41,13 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
|
||||
raise FiscalYearError, error_msg
|
||||
return fy
|
||||
|
||||
def validate_fiscal_year(date, fiscal_year, label="Date"):
|
||||
def validate_fiscal_year(date, fiscal_year, label=_("Date"), doc=None):
|
||||
years = [f[0] for f in get_fiscal_years(date, label=label)]
|
||||
if fiscal_year not in years:
|
||||
throw(_("{0} '{1}' not in Fiscal Year {2}").format(label, formatdate(date), fiscal_year))
|
||||
if doc:
|
||||
doc.fiscal_year = years[0]
|
||||
else:
|
||||
throw(_("{0} '{1}' not in Fiscal Year {2}").format(label, formatdate(date), fiscal_year))
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_balance_on(account=None, date=None, party_type=None, party=None):
|
||||
|
||||
Reference in New Issue
Block a user