commonified in_words function and introduced selling_controller

This commit is contained in:
Nabin Hait
2013-01-22 11:53:14 +05:30
parent 0394f78382
commit ec52db8490
9 changed files with 79 additions and 78 deletions

View File

@@ -136,9 +136,10 @@ class DocType(TransactionBase):
def validate(self):
from webnotes.utils import money_in_words
self.check_existing()
dcc = get_company_currency(self.doc.company)
self.doc.total_in_words = get_obj('Sales Common').get_total_in_words(dcc, self.doc.rounded_total)
company_currency = get_company_currency(self.doc.company)
self.doc.total_in_words = money_in_words(self.doc.rounded_total, company_currency)
def calculate_earning_total(self):