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 607ef627
authored
Mar 06, 2025
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Opsen pada Kabupaten Magelang
1 parent
cfcf914b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
opensipkd/pad/models/tangerang_kab.py
opensipkd/pad/services/default.py
opensipkd/pad/services/magelang_kab.py
opensipkd/pad/models/tangerang_kab.py
View file @
607ef62
...
...
@@ -371,6 +371,8 @@ class Payment(Base):
denda
=
Column
(
Integer
)
jml_bayar
=
Column
(
Integer
)
is_valid
=
Column
(
Integer
)
opsen_pokok
=
Column
(
Float
)
opsen_denda
=
Column
(
Float
)
__table_args__
=
(
UniqueConstraint
(
'tahun'
,
'sspdno'
),
dict
(
schema
=
'pad'
))
...
...
opensipkd/pad/services/default.py
View file @
607ef62
...
...
@@ -302,6 +302,7 @@ class Inquiry(BaseInquiry):
def
hitung_tagihan
(
self
):
self
.
pokok
=
self
.
invoice
.
pajak_terhutang
-
self
.
invoice
.
bunga
self
.
pokok
=
round_up
(
self
.
pokok
)
self
.
total_pokok
=
self
.
pokok
+
self
.
invoice
.
opsen_pokok
self
.
total_pokok
=
round_up
(
self
.
total_pokok
)
self
.
opsen_pokok
=
round_up
(
self
.
invoice
.
opsen_pokok
)
...
...
@@ -315,6 +316,7 @@ class Inquiry(BaseInquiry):
if
self
.
invoice
.
status_pembayaran
==
0
:
self
.
hitung_denda_waktu
()
self
.
denda_pokok
+=
self
.
invoice
.
bunga
self
.
denda_pokok
=
round_up
(
self
.
denda_pokok
)
else
:
self
.
bln_tunggakan
=
self
.
denda_pokok
=
self
.
opsen_denda
=
0
self
.
discount_denda_pokok
,
self
.
discount_opsen_denda
=
\
...
...
opensipkd/pad/services/magelang_kab.py
View file @
607ef62
...
...
@@ -28,16 +28,12 @@ AWAL_BAYAR_DENDA_1_PERSEN = date(2025, 2, 1)
class
Inquiry
(
BaseInquiry
):
invoice_id_structure
=
INVOICE_ID
def
hitung_denda_waktu
(
self
):
# Override
def
get_persen_denda
(
self
):
# Override
tgl_terbit
=
self
.
get_jatuh_tempo
()
if
tgl_terbit
>=
AWAL_MASA_DENDA_1_PERSEN
and
\
self
.
tgl_bayar
.
date
()
>=
AWAL_BAYAR_DENDA_1_PERSEN
:
persen_denda
=
1
else
:
persen_denda
=
2
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
persen_denda
,
self
.
tgl_bayar
.
date
())
return
1
return
2
def
get_kohir_model
(
self
):
# Override
return
Kohir
...
...
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