summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-04-01 15:06:41 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-04-01 15:06:41 +0700
commit0a1e73c2c83e14f191c1555907e49014e83eef41 (patch)
tree34982b6b8114d1c4a115a88807d5fd3c961dcceb
parent048552cb18c95c990224d0c53ceb9edeca050248 (diff)
fix delivery amt text
-rw-r--r--indoteknik_custom/models/account_move.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 4d0d6ae5..6a847c1d 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -61,10 +61,14 @@ class AccountMove(models.Model):
tb = Terbilang()
for record in self:
+ if record.sale_id.delivery_amt <= 0:
+ continue
+
if record.sale_id.delivery_amt > 0:
tb.parse(int(record.sale_id.delivery_amt))
record.delivery_amt_text = tb.getresult().title()
+
@api.constrains('bills_efaktur_document')
def _constrains_efaktur_document(self):
for move in self: