fix: Do not calculate commission post submit (#34267)
fix: Do not calculate commission post submit (#34267)
* fix: Do not calculate commision post submit
* chore: Update condition to match server side logic
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
---------
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit 10632d75b0)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -139,7 +139,7 @@ class SellingController(StockController):
|
||||
self.in_words = money_in_words(amount, self.currency)
|
||||
|
||||
def calculate_commission(self):
|
||||
if not self.meta.get_field("commission_rate"):
|
||||
if not self.meta.get_field("commission_rate") or self.docstatus.is_submitted():
|
||||
return
|
||||
|
||||
self.round_floats_in(self, ("amount_eligible_for_commission", "commission_rate"))
|
||||
|
||||
Reference in New Issue
Block a user