mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Merge pull request #32299 from frappe/mergify/bp/version-13-hotfix/pr-32296
fix: get amount in words for debit note (backport #32296)
This commit is contained in:
@@ -193,16 +193,16 @@ class BuyingController(StockController, Subcontracting):
|
|||||||
|
|
||||||
if self.meta.get_field("base_in_words"):
|
if self.meta.get_field("base_in_words"):
|
||||||
if self.meta.get_field("base_rounded_total") and not self.is_rounded_total_disabled():
|
if self.meta.get_field("base_rounded_total") and not self.is_rounded_total_disabled():
|
||||||
amount = self.base_rounded_total
|
amount = abs(self.base_rounded_total)
|
||||||
else:
|
else:
|
||||||
amount = self.base_grand_total
|
amount = abs(self.base_grand_total)
|
||||||
self.base_in_words = money_in_words(amount, self.company_currency)
|
self.base_in_words = money_in_words(amount, self.company_currency)
|
||||||
|
|
||||||
if self.meta.get_field("in_words"):
|
if self.meta.get_field("in_words"):
|
||||||
if self.meta.get_field("rounded_total") and not self.is_rounded_total_disabled():
|
if self.meta.get_field("rounded_total") and not self.is_rounded_total_disabled():
|
||||||
amount = self.rounded_total
|
amount = abs(self.rounded_total)
|
||||||
else:
|
else:
|
||||||
amount = self.grand_total
|
amount = abs(self.grand_total)
|
||||||
|
|
||||||
self.in_words = money_in_words(amount, self.currency)
|
self.in_words = money_in_words(amount, self.currency)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user