mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
fixes in total_in_words
This commit is contained in:
@@ -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
|
||||
#-----------------------------
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user