summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHafidBuroiroh <hafidburoiroh09@gmail.com>2025-09-24 17:16:35 +0700
committerHafidBuroiroh <hafidburoiroh09@gmail.com>2025-09-24 17:16:35 +0700
commit2bfd932b541351452dda67039740ac1e72ca2326 (patch)
treeedd613812cdce7c9846815c77e8b05eab609bdf0
parentfa4d124243688f4a74dd605a21b7b402ee632191 (diff)
<hafid> refund
-rw-r--r--indoteknik_custom/models/refund_sale_order.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index 6a6d10ea..96082447 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -1013,11 +1013,21 @@ class RefundSaleOrder(models.Model):
'partner_id': partner.id,
'currency_id': 12,
'debit': 0.0,
- 'credit': amount + admintf,
+ 'credit': amount,
'name': ref_text,
}
- journal_line = [debit_line, adminline, credit_line] if admintf > 0 else [debit_line, credit_line]
+ credit_admin_line = {
+ 'move_id': account_move.id,
+ 'account_id': 389, # Intransit BCA
+ 'partner_id': partner.id,
+ 'currency_id': 12,
+ 'debit': 0.0,
+ 'credit': admintf,
+ 'name': admintex,
+ }
+
+ journal_line = [debit_line, credit_line, adminline, credit_admin_line] if admintf > 0 else [debit_line, credit_line]
self.env['account.move.line'].create(journal_line)