Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
sismiop-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 f2ae42c9
authored
Feb 02, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Kota Tangerang menerapkan persen denda ganda untuk jatuh tempo sebelum 1 Januari 2024
1 parent
aaf48853
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
CHANGES.txt
sismiop/services/tangkota.py
CHANGES.txt
View file @
f2ae42c
0.3.5 2024-02-02
----------------
- Kota Tangerang menerapkan persen denda ganda untuk jatuh tempo sebelum 1 Januari 2024
0.3.4 2024-01-31
----------------
- Discount Pokok di Kota Bogor
...
...
sismiop/services/tangkota.py
View file @
f2ae42c
from
datetime
import
(
date
,
datetime
,
)
from
opensipkd.hitung
import
(
bulan_tunggakan_berdasarkan_tgl
,
round_up
,
)
from
.tangsel
import
(
Inquiry
as
BaseInquiry
,
Reversal
,
...
...
@@ -6,7 +14,37 @@ from .tangsel import (
)
def
hitung_denda
(
tagihan
,
jatuh_tempo
,
tgl_hitung
):
if
jatuh_tempo
>=
tgl_hitung
:
return
0
,
0
jatuh_tempo_januari
=
date
(
2023
,
12
,
jatuh_tempo
.
day
)
bulan2persen
=
bulan_tunggakan_berdasarkan_tgl
(
jatuh_tempo
,
jatuh_tempo_januari
)
bulan1persen
=
bulan_tunggakan_berdasarkan_tgl
(
jatuh_tempo_januari
,
tgl_hitung
)
persen
=
bulan2persen
*
2
+
bulan1persen
if
persen
>
48
:
persen
=
48
bulan
=
bulan2persen
+
bulan1persen
denda
=
float
(
persen
)
/
100
*
tagihan
return
bulan
,
denda
class
Inquiry
(
BaseInquiry
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
()
.
__init__
(
*
args
,
**
kwargs
)
if
self
.
invoice
and
self
.
invoice
.
status_pembayaran_sppt
==
'1'
:
self
.
tagihan
=
self
.
denda
=
self
.
discount
=
self
.
total
=
0
def
hitung_denda
(
self
):
# Override
if
isinstance
(
self
.
tgl_bayar
,
datetime
):
tgl_bayar
=
self
.
tgl_bayar
.
date
()
else
:
tgl_bayar
=
self
.
tgl_bayar
self
.
bln_tunggakan
,
denda
=
hitung_denda
(
self
.
tagihan
,
self
.
get_jatuh_tempo
(),
tgl_bayar
)
self
.
denda
=
round_up
(
denda
)
def
hitung_discount
(
self
):
# Override
self
.
discount
=
self
.
discount_pokok
=
self
.
discount_denda
=
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