Compare commits

...

14 Commits

Author SHA1 Message Date
Pratik Vyas
815cb8959a Merge branch 'develop' 2015-05-20 16:35:40 +05:30
Pratik Vyas
38937ecd3c bumped to version 5.0.6 2015-05-20 17:05:40 +06:00
Nabin Hait
521aa2e94a Update party_model.py 2015-05-20 14:39:39 +05:30
Nabin Hait
390df6626b Merge pull request #3298 from nabinhait/develop
party model patch fix
2015-05-20 14:34:42 +05:30
Nabin Hait
a2d8585b07 party model patch fix 2015-05-20 14:32:54 +05:30
Pratik Vyas
84e658058b Merge branch 'develop' 2015-05-20 12:54:52 +05:30
Pratik Vyas
10e813b010 bumped to version 5.0.5 2015-05-20 13:24:52 +06:00
Nabin Hait
a7bd8ee34b Update utils.py 2015-05-20 12:53:04 +05:30
Pratik Vyas
90a51225a4 Merge branch 'develop' 2015-05-20 12:27:47 +05:30
Pratik Vyas
8980ce6052 bumped to version 5.0.4 2015-05-20 12:57:47 +06:00
Nabin Hait
c0f56de971 Merge pull request #3297 from nabinhait/develop
validate diabled fiscal year
2015-05-20 12:26:44 +05:30
Nabin Hait
8d50eb32c1 validate diabled fiscal year 2015-05-20 12:26:21 +05:30
Nabin Hait
50bbc99889 Merge pull request #3296 from nabinhait/develop
validate disabled fiscal year
2015-05-20 12:21:51 +05:30
Nabin Hait
0cf9469f86 validate disabled fiscal year 2015-05-19 18:44:02 +05:30
5 changed files with 16 additions and 15 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '5.0.3'
__version__ = '5.0.6'

View File

@@ -18,11 +18,11 @@ def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, compan
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None):
# if year start date is 2012-04-01, year end date should be 2013-03-31 (hence subdate)
cond = ""
cond = " ifnull(disabled, 0) = 0"
if fiscal_year:
cond = "fy.name = %(fiscal_year)s"
cond += " and fy.name = %(fiscal_year)s"
else:
cond = "%(transaction_date)s >= fy.year_start_date and %(transaction_date)s <= fy.year_end_date"
cond += " and %(transaction_date)s >= fy.year_start_date and %(transaction_date)s <= fy.year_end_date"
if company:
cond += """ and (not exists(select name from `tabFiscal Year Company` fyc where fyc.parent = fy.name)
@@ -36,7 +36,7 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
})
if not fy:
error_msg = _("""{0} {1} not in any Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://erpnext.com/kb/accounts/fiscal-year-error")
error_msg = _("""{0} {1} not in any active Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://erpnext.com/kb/accounts/fiscal-year-error")
if verbose==1: frappe.msgprint(error_msg)
raise FiscalYearError, error_msg
return fy

View File

@@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors"
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "5.0.3"
app_version = "5.0.6"
error_report_email = "support@erpnext.com"

View File

@@ -96,15 +96,16 @@ def set_party_in_jv_and_gl_entry(receivable_payable_accounts):
frappe.db.commit()
def delete_individual_party_account():
frappe.db.sql("""delete from `tabAccount` acc
where ifnull(acc.master_type, '') in ('Customer', 'Supplier')
and ifnull(acc.master_name, '') != ''
and not exists(select gle.name from `tabGL Entry` gle where gle.account = acc.name)""")
frappe.db.sql("""delete from `tabAccount`
where ifnull(master_type, '') in ('Customer', 'Supplier')
and ifnull(master_name, '') != ''
and not exists(select gle.name from `tabGL Entry` gle
where gle.account = tabAccount.name)""")
accounts_not_deleted = frappe.db.sql_list("""select name from `tabAccount` acc
where ifnull(acc.master_type, '') in ('Customer', 'Supplier')
and ifnull(acc.master_name, '') != ''
and exists(select gle.name from `tabGL Entry` gle where gle.account = acc.name)""")
accounts_not_deleted = frappe.db.sql_list("""select tabAccount.name from `tabAccount`
where ifnull(master_type, '') in ('Customer', 'Supplier')
and ifnull(master_name, '') != ''
and exists(select gle.name from `tabGL Entry` gle where gle.account = tabAccount.name)""")
if accounts_not_deleted:
print "Accounts not deleted: " + "\n".join(accounts_not_deleted)

View File

@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "5.0.3"
version = "5.0.6"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()