Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait
2013-03-19 12:02:13 +05:30
29 changed files with 617 additions and 184 deletions

View File

@@ -24,6 +24,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,
@@ -31,7 +34,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,