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 c76e53aa
authored
Jul 10, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed rumus denda Kabupaten Tangerang
1 parent
f622dda9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
opensipkd/pad/scripts/inquiry.py
opensipkd/pad/services/default.py
opensipkd/pad/services/tangerang_kab.py
opensipkd/pad/scripts/inquiry.py
View file @
c76e53a
...
...
@@ -17,7 +17,7 @@ def show_val(label, value):
def
show_rp
(
label
,
value
):
show_val
(
label
,
'Rp {}'
.
format
(
thousand
(
value
)))
show_val
(
label
,
'Rp {}'
.
format
(
thousand
(
value
,
2
)))
def
show_field
(
t
,
fieldname
):
...
...
opensipkd/pad/services/default.py
View file @
c76e53a
...
...
@@ -303,10 +303,7 @@ class Inquiry(BaseInquiry):
self
.
denda
=
round_up
(
self
.
invoice
.
bunga
)
elif
self
.
invoice
.
jatuhtempotgl
:
if
self
.
invoice
.
status_pembayaran
==
0
:
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
self
.
conf
[
'persen_denda'
],
self
.
tgl_bayar
.
date
())
self
.
hitung_denda_waktu
()
else
:
self
.
bln_tunggakan
=
self
.
denda_waktu
=
0
self
.
denda
=
self
.
denda_waktu
+
self
.
invoice
.
bunga
...
...
@@ -314,6 +311,12 @@ class Inquiry(BaseInquiry):
self
.
discount_denda
=
self
.
get_discount_denda
()
self
.
denda
-=
self
.
discount_denda
def
hitung_denda_waktu
(
self
):
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
self
.
conf
[
'persen_denda'
],
self
.
tgl_bayar
.
date
())
def
get_discount_denda
(
self
):
return
0
...
...
opensipkd/pad/services/tangerang_kab.py
View file @
c76e53a
...
...
@@ -30,6 +30,17 @@ NOTE_TGL_BAYAR = 'Tanggal bayar {tgl} <= ' + dmy(AKHIR_TGL_BAYAR)
class
Inquiry
(
BaseInquiry
):
def
hitung_denda_waktu
(
self
):
# Override
super
()
.
hitung_denda_waktu
()
if
self
.
invoice
.
bunga
<
1
:
return
denda_per_bln
=
self
.
denda_waktu
/
self
.
bln_tunggakan
max_denda
=
24
*
denda_per_bln
denda
=
self
.
denda_waktu
+
self
.
invoice
.
bunga
if
denda
>=
max_denda
:
self
.
bln_tunggakan
=
24
self
.
denda_waktu
=
max_denda
-
self
.
invoice
.
bunga
def
get_discount_denda
(
self
):
# Override
tgl_bayar
=
self
.
tgl_bayar
.
date
()
masa_pajak
=
self
.
invoice
.
masadari
.
date
()
...
...
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