patch to fix incorrect gl entries due to payment reconciliation between 2013-03-11 and 2013-03-15

This commit is contained in:
Anand Doshi
2013-03-15 13:42:31 +05:30
parent c08e1037d6
commit 1cf7391562
3 changed files with 35 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ from utilities.transaction_base import TransactionBase
class AccountsController(TransactionBase):
def get_gl_dict(self, args, cancel=None):
"""this method populates the common properties of a gl entry record"""
if cancel is None:
cancel = (self.doc.docstatus == 2)
gl_dict = {
'company': self.doc.company,
'posting_date': self.doc.posting_date,
@@ -30,7 +33,7 @@ class AccountsController(TransactionBase):
'voucher_no': self.doc.name,
'aging_date': self.doc.fields.get("aging_date") or self.doc.posting_date,
'remarks': self.doc.remarks,
'is_cancelled': self.doc.docstatus == 2 and "Yes" or "No",
'is_cancelled': cancel and "Yes" or "No",
'fiscal_year': self.doc.fiscal_year,
'debit': 0,
'credit': 0,