Restored missing rounded_total fields
This commit is contained in:
@@ -115,14 +115,17 @@ class BuyingController(StockController):
|
||||
def set_total_in_words(self):
|
||||
from frappe.utils import money_in_words
|
||||
if self.meta.get_field("base_in_words"):
|
||||
amount = (self.base_rounded_total
|
||||
if not self.get("disable_rounded_total") else self.base_grand_total)
|
||||
|
||||
if self.meta.get_field("base_rounded_total") and not self.is_rounded_total_disabled():
|
||||
amount = self.base_rounded_total
|
||||
else:
|
||||
amount = self.base_grand_total
|
||||
self.base_in_words = money_in_words(amount, self.company_currency)
|
||||
|
||||
if self.meta.get_field("in_words"):
|
||||
amount = (self.rounded_total
|
||||
if not self.get("disable_rounded_total") else self.grand_total)
|
||||
if self.meta.get_field("rounded_total") and not self.is_rounded_total_disabled():
|
||||
amount = self.rounded_total
|
||||
else:
|
||||
amount = self.grand_total
|
||||
|
||||
self.in_words = money_in_words(amount, self.currency)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user