minor fix

This commit is contained in:
Nabin Hait 2014-05-20 15:07:18 +05:30
parent 956d7868b5
commit c49b7f8c63
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: for entry in gl_map:
if entry.account in aii_accounts: 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, 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: for gle in gl_entries:
amount = flt(gle.debit) - flt(gle.credit) amount = flt(gle.debit) - flt(gle.credit)
if filters.get("account") and (gle.posting_date < filters.from_date if filters.get("account") and (gle.posting_date<filters.from_date or cstr(gle.is_opening)=="Yes"):
or cstr(gle.is_opening) == "Yes"):
gle_map[gle.account].opening += amount gle_map[gle.account].opening += amount
opening += amount opening += amount
elif gle.posting_date <= filters.to_date: elif gle.posting_date <= filters.to_date: