From 7554ac9569d1b8a2bc3d36ae266010aa656c3790 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 20 Sep 2022 17:32:12 +0530 Subject: [PATCH] fix: get amount in words for debit note (cherry picked from commit 70f6484d9d9afc3b89e6df6a18993214584722f8) --- erpnext/controllers/buying_controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 5659ad0aa9b..48fe7cb083d 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -194,16 +194,16 @@ class BuyingController(SubcontractingController): if self.meta.get_field("base_in_words"): 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: - amount = self.base_grand_total + amount = abs(self.base_grand_total) self.base_in_words = money_in_words(amount, self.company_currency) if self.meta.get_field("in_words"): if self.meta.get_field("rounded_total") and not self.is_rounded_total_disabled(): - amount = self.rounded_total + amount = abs(self.rounded_total) else: - amount = self.grand_total + amount = abs(self.grand_total) self.in_words = money_in_words(amount, self.currency)