diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-09-27 11:39:40 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-09-27 11:39:40 +0700 |
| commit | 4d714d528c671b3aff475672d75cc5d23ebfbe0f (patch) | |
| tree | b7368e8772d079f1eaf8b31e6e1300212772482c /vit_efaktur | |
| parent | a69ed2c6612f7dbd5a60cdcaa4249e51b04653eb (diff) | |
Update pk.py - fix different ppn line and header
Diffstat (limited to 'vit_efaktur')
| -rwxr-xr-x | vit_efaktur/wizard/pk.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vit_efaktur/wizard/pk.py b/vit_efaktur/wizard/pk.py index af68da4..06cfb3e 100755 --- a/vit_efaktur/wizard/pk.py +++ b/vit_efaktur/wizard/pk.py @@ -235,11 +235,12 @@ class efaktur_pk_wizard(models.TransientModel): npwp = partner_id.npwp.replace(".","").replace("-","") faktur = inv['efaktur_id'][1].replace(".","").replace("-","") - sum_dpp_line = 0 + sum_ppn_line = sum_dpp_line = 0 for line in inv['invoice_line_ids']: if not line['product_id']: continue sum_dpp_line += round(line['price_subtotal']) + sum_ppn_line += round(line['price_total'] - line['price_subtotal']) print ("Invoice No ", invno) print ("Tax ", inv['amount_tax']) @@ -265,7 +266,7 @@ class efaktur_pk_wizard(models.TransientModel): 'NAMA': partner_id.nama_wajib_pajak or '', 'ALAMAT_LENGKAP': partner_id.alamat_lengkap_text or '', 'JUMLAH_DPP': sum_dpp_line or 0, - 'JUMLAH_PPN': round(inv['amount_tax']) or 0, + 'JUMLAH_PPN': sum_ppn_line or 0, 'JUMLAH_PPNBM': 0, 'ID_KETERANGAN_TAMBAHAN': '', 'FG_UANG_MUKA': 0, |
