fixes in total_in_words

This commit is contained in:
Nabin Hait
2013-01-21 17:24:31 +05:30
parent 1022198cc8
commit d3b625035c
7 changed files with 19 additions and 36 deletions

View File

@@ -456,14 +456,6 @@ class DocType(BuyingController):
}
#msgprint(ret)
return ret
# Get total in words
# ==================================================================
def get_total_in_words(self, currency, amount):
from webnotes.utils import money_in_words
return money_in_words(amount, currency)
# get against document date
#-----------------------------

View File

@@ -67,10 +67,6 @@ class DocType(BuyingController):
# Check for stopped status
self.check_for_stopped_status(pc_obj)
# get total in words
dcc = get_company_currency(self.doc.company)
self.doc.in_words = pc_obj.get_total_in_words(dcc, self.doc.grand_total)
self.doc.in_words_import = pc_obj.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
def get_default_schedule_date(self):
get_obj(dt = 'Purchase Common').get_default_schedule_date(self)

View File

@@ -37,7 +37,6 @@ class DocType(BuyingController):
self.validate_fiscal_year()
self.validate_common()
self.set_in_words()
def on_submit(self):
purchase_controller = webnotes.get_obj("Purchase Common")
@@ -79,10 +78,4 @@ class DocType(BuyingController):
pc.validate_mandatory(self)
pc.validate_for_items(self)
pc.get_prevdoc_date(self)
pc.validate_reference_value(self)
def set_in_words(self):
pc = get_obj('Purchase Common')
company_currency = get_company_currency(self.doc.company)
self.doc.in_words = pc.get_total_in_words(company_currency, self.doc.grand_total)
self.doc.in_words_import = pc.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
pc.validate_reference_value(self)