[salary slip] total no. of working days calculation [issue] webnotes/erpnext#285

This commit is contained in:
Anand Doshi
2013-08-02 19:31:41 +05:30
parent 6cd2ed88bb
commit e79d57ca19
18 changed files with 271 additions and 46 deletions

View File

@@ -141,8 +141,9 @@ class AccountsController(TransactionBase):
def calculate_taxes_and_totals(self):
# validate conversion rate
if not self.doc.currency:
self.doc.currency = get_company_currency(self.doc.company)
company_currency = get_company_currency(self.doc.company)
if not self.doc.currency or self.doc.currency == company_currency:
self.doc.currency = company_currency
self.doc.conversion_rate = 1.0
else:
validate_conversion_rate(self.doc.currency, self.doc.conversion_rate,