Merge pull request #1671 from nabinhait/v4-hotfix

V4 hotfix
This commit is contained in:
Nabin Hait 2014-05-20 15:25:20 +05:30
commit f5ac91da06
2 changed files with 49 additions and 49 deletions

View File

@ -94,7 +94,8 @@ def validate_account_for_auto_accounting_for_stock(gl_map):
for entry in gl_map:
if entry.account in aii_accounts:
frappe.throw(_("Account {0} can only be updated via Stock Transactions"), StockAccountInvalidTransaction)
frappe.throw(_("Account: {0} can only be updated via \
Stock Transactions").format(entry.account), StockAccountInvalidTransaction)
def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None,

View File

@ -132,8 +132,7 @@ def get_accountwise_gle(filters, gl_entries, gle_map):
for gle in gl_entries:
amount = flt(gle.debit) - flt(gle.credit)
if filters.get("account") and (gle.posting_date < filters.from_date
or cstr(gle.is_opening) == "Yes"):
if filters.get("account") and (gle.posting_date<filters.from_date or cstr(gle.is_opening)=="Yes"):
gle_map[gle.account].opening += amount
opening += amount
elif gle.posting_date <= filters.to_date: