Skip to content

Commit

Permalink
fix: after applying coupon code, field in_words not updated (#37133)
Browse files Browse the repository at this point in the history
fix: after applying coupon code, field in_words not updated (#37133)

* fix: after applying coupon code, field in_words not updated

* fix: changed the order of the function set_total_in_words

(cherry picked from commit 03f0abf)

Co-authored-by: RitvikSardana <65544983+RitvikSardana@users.noreply.github.com>
  • Loading branch information
mergify[bot] and RitvikSardana authored Sep 19, 2023
1 parent 699ad80 commit 1cb8c64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def validate(self):
self.validate_value("base_grand_total", ">=", 0)

validate_return(self)
self.set_total_in_words()

self.validate_all_documents_schedule()

Expand Down Expand Up @@ -207,6 +206,8 @@ def validate(self):
if self.doctype != "Material Request" and not self.ignore_pricing_rule:
apply_pricing_rule_on_transaction(self)

self.set_total_in_words()

def before_cancel(self):
validate_einvoice_fields(self)

Expand Down

0 comments on commit 1cb8c64

Please sign in to comment.