Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-pad-models
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a48e6371
authored
Mar 17, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bila berjenis STPD maka tidak perlu hitung denda
1 parent
2de2211c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
26 deletions
CHANGES.txt
opensipkd/pad/scripts/inquiry.py
opensipkd/pad/services/default.py
CHANGES.txt
View file @
a48e637
0.3.1 2021-03-1
0
0.3.1 2021-03-1
7
----------------
- B
ug fixed maksimum denda 48% dari tagihan pokok
.
- B
ila dokumen berjenis STPD maka tidak perlu lagi menghitung denda
.
0.3 2021-02-23
--------------
...
...
opensipkd/pad/scripts/inquiry.py
View file @
a48e637
...
...
@@ -60,24 +60,23 @@ def show(inq):
show_val
(
'Kelurahan Objek Pajak'
,
inq
.
get_kelurahan_op
())
show_val
(
'Kecamatan Objek Pajak'
,
inq
.
get_kecamatan_op
())
show_val
(
'Jatuh Tempo'
,
inq
.
get_jatuh_tempo
())
show_val
(
'Jumlah Bulan Denda'
,
inq
.
bln_tunggakan
)
show_rp
(
'Tagihan'
,
inq
.
tagihan
)
show_rp
(
'Denda'
,
inq
.
denda
)
show_rp
(
'Discount Denda'
,
inq
.
discount_denda
)
if
inq
.
notes
:
show_val
(
'Note'
,
inq
.
notes
)
show_rp
(
'Total Denda'
,
inq
.
denda
)
show_rp
(
'Total Bayar'
,
inq
.
total_bayar
)
show_rp
(
'Total Tagihan'
,
inq
.
total
)
show_field
(
inq
.
invoice
,
'status_pembayaran'
)
show_field
(
inq
.
invoice
,
'bunga'
)
try
:
show_
val
(
'Jumlah Bulan Denda'
,
inq
.
bln_tunggakan
)
show_
rp
(
'Bunga'
,
inq
.
invoice
.
bunga
)
except
AttributeError
:
pass
try
:
show_rp
(
'Denda Jatuh Tempo'
,
inq
.
denda_waktu
)
except
AttributeError
:
pass
show_rp
(
'Discount Denda'
,
inq
.
discount_denda
)
if
inq
.
notes
:
show_val
(
'Note'
,
inq
.
notes
)
show_rp
(
'Total Denda'
,
inq
.
denda
)
show_rp
(
'Total Bayar'
,
inq
.
total_bayar
)
show_rp
(
'Total Tagihan'
,
inq
.
total
)
show_field
(
inq
.
invoice
,
'status_pembayaran'
)
if
inq
.
total_bayar
:
pay
=
inq
.
get_payment
()
show_field
(
pay
,
'sspdtgl'
)
...
...
opensipkd/pad/services/default.py
View file @
a48e637
...
...
@@ -44,7 +44,7 @@ INVOICE_ID = [
MAX_PORSI_DENDA
=
0.48
NOTE_MAX_DENDA
=
'maksimum denda = 0,48 x tagihan pokok {pokok} = {maks}'
NOTE_MAX_DENDA
=
'maksimum denda
waktu
= 0,48 x tagihan pokok {pokok} = {maks}'
class
BaseInquiry
:
...
...
@@ -285,25 +285,25 @@ class Inquiry(BaseInquiry):
self
.
tagihan
=
round_up
(
self
.
tagihan
)
def
hitung_denda
(
self
):
bunga
=
self
.
invoice
.
bunga
or
0
self
.
denda
=
self
.
bunga
=
round_up
(
bunga
)
if
self
.
invoice
.
jatuhtempotgl
:
self
.
bln_tunggakan
=
None
self
.
denda
=
0
if
self
.
get_type_name
()
.
strip
()
==
'STPD'
:
self
.
denda
=
round_up
(
self
.
invoice
.
bunga
)
elif
self
.
invoice
.
jatuhtempotgl
:
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
self
.
conf
[
'persen_denda'
],
self
.
tgl_bayar
.
date
())
self
.
denda_waktu
=
round_up
(
self
.
denda_waktu
)
self
.
denda
+=
self
.
denda_waktu
else
:
self
.
bln_tunggakan
=
None
self
.
denda
=
self
.
denda_waktu
+
self
.
invoice
.
bunga
self
.
denda
=
round_up
(
self
.
denda
)
max_denda
=
MAX_PORSI_DENDA
*
self
.
tagihan
max_denda
=
round_up
(
max_denda
)
if
self
.
denda
>
max_denda
:
self
.
denda
=
max_denda
s
=
NOTE_MAX_DENDA
.
format
(
pokok
=
self
.
tagihan
,
maks
=
max_denda
)
self
.
notes
.
append
(
s
)
self
.
discount_denda
=
self
.
get_discount_denda
()
self
.
denda
-=
self
.
discount_denda
max_denda
=
MAX_PORSI_DENDA
*
self
.
tagihan
max_denda
=
round_up
(
max_denda
)
if
self
.
denda
>
max_denda
:
self
.
denda
=
max_denda
s
=
NOTE_MAX_DENDA
.
format
(
pokok
=
self
.
tagihan
,
maks
=
max_denda
)
self
.
notes
.
append
(
s
)
def
get_discount_denda
(
self
):
return
0
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment