summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/commision.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/commision.py')
-rw-r--r--indoteknik_custom/models/commision.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py
index 97184cdb..26b5df37 100644
--- a/indoteknik_custom/models/commision.py
+++ b/indoteknik_custom/models/commision.py
@@ -193,6 +193,7 @@ class CustomerCommision(models.Model):
commision_amt_text = fields.Char(string='Amount Text', compute='compute_delivery_amt_text')
total_cashback_text = fields.Char(string='Cashback Text', compute='compute_total_cashback_text')
total_dpp = fields.Float(string='Total DPP', compute='_compute_total_dpp')
+ biaya_lain_lain = fields.Float(string='Biaya Lain-lain')
commision_type = fields.Selection([
('fee', 'Fee'),
('cashback', 'Cashback'),
@@ -363,13 +364,13 @@ class CustomerCommision(models.Model):
else:
self.cashback = 0
self.total_commision = 0
-
+
def _compute_total_dpp(self):
for data in self:
total_dpp = 0
for line in data.commision_lines:
total_dpp = total_dpp + line.dpp
- data.total_dpp = total_dpp
+ data.total_dpp = total_dpp - data.biaya_lain_lain
@api.model
def create(self, vals):