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 1a66d428
authored
Feb 26, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rumus denda di Kota Serang sama seperti Kota Tangerang Selatan
1 parent
e4f0d1ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
CHANGES.txt
opensipkd/pad/services/serang_kota.py
opensipkd/pad/services/tangsel.py
CHANGES.txt
View file @
1a66d42
0.5.5 2024-02-26
----------------
- Rumus denda di Kota Serang sama seperti Kota Tangerang Selatan
0.5.4 2024-02-15
----------------
- Tambah Kota Bogor
...
...
opensipkd/pad/services/serang_kota.py
View file @
1a66d42
...
...
@@ -3,8 +3,23 @@ from .tangerang_kab import (
Reversal
,
AvailableInvoice
,
)
from
.tangsel
import
hitung_denda
class
Inquiry
(
BaseInquiry
):
def
get_discount_denda
(
self
):
# Override
return
0
def
hitung_denda_waktu
(
self
):
# Override
tgl_kohir
=
self
.
get_tgl_kohir
()
if
tgl_kohir
:
tahun_terbit
=
tgl_kohir
.
year
else
:
tahun_terbit
=
self
.
invoice
.
masadari
.
year
if
tahun_terbit
>
2023
:
persen_denda
=
1
else
:
persen_denda
=
self
.
conf
[
'persen_denda'
]
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
persen_denda
,
self
.
tgl_bayar
.
date
())
opensipkd/pad/services/tangsel.py
View file @
1a66d42
...
...
@@ -3,6 +3,7 @@ from datetime import (
datetime
,
timedelta
,
)
from
opensipkd.hitung
import
bulan_tunggakan_berdasarkan_tgl
from
.default
import
(
Inquiry
as
BaseInquiry
,
Reversal
as
BaseReversal
,
...
...
@@ -31,6 +32,21 @@ MASA_PAJAK_NON_REKLAME = date(2023, 8, 31)
MASA_PAJAK_REKLAME
=
date
(
2023
,
8
,
31
)
def
hitung_denda
(
tagihan
,
jatuh_tempo
,
persen_denda
,
tgl_hitung
):
if
jatuh_tempo
is
None
:
return
0
,
0
if
isinstance
(
jatuh_tempo
,
datetime
):
jatuh_tempo
=
jatuh_tempo
.
date
()
if
jatuh_tempo
>=
tgl_hitung
or
persen_denda
<=
0
:
return
0
,
0
bulan
=
bulan_tunggakan_berdasarkan_tgl
(
jatuh_tempo
,
tgl_hitung
)
persen
=
bulan
*
persen_denda
if
persen
>
48
:
persen
=
48
denda
=
persen
/
100
*
tagihan
return
bulan
,
denda
class
Inquiry
(
BaseInquiry
):
def
get_invoice
(
self
):
# Override
self
.
invoice
=
super
()
.
get_invoice
()
...
...
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