feat: Grant commission on certain items only (#27467)

Co-authored-by: Sagar Vora <sagar@resilient.tech>
This commit is contained in:
Raffael Meyer
2021-11-30 13:24:18 +01:00
committed by GitHub
parent d0f4f03b66
commit e10ab1626c
15 changed files with 190 additions and 66 deletions

View File

@@ -250,7 +250,12 @@ class AccountsController(TransactionBase):
from erpnext.controllers.taxes_and_totals import calculate_taxes_and_totals
calculate_taxes_and_totals(self)
if self.doctype in ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"]:
if self.doctype in (
'Sales Order',
'Delivery Note',
'Sales Invoice',
'POS Invoice',
):
self.calculate_commission()
self.calculate_contribution()