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 ee5f47c2
authored
Oct 17, 2026
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount denda dan pokok Kota Tasik
1 parent
820aa258
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
11 deletions
CHANGES.txt
pyproject.toml
sismiop/scripts/inquiry.py
sismiop/services/tasik_kota.py
CHANGES.txt
View file @
ee5f47c
0.4.9 2026-10-17
----------------
- Discount denda dan pokok Kota Tasikmalaya
0.4.8 2026-10-14
----------------
- Buang definisi field yang berlebihan
...
...
pyproject.toml
View file @
ee5f47c
...
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name
=
'sismiop-models'
version
=
'
0.4.
8
'
version
=
'
0.4.
9
'
dependencies
=
[
'sqlalchemy'
,
'zope.sqlalchemy'
,
...
...
sismiop/scripts/inquiry.py
View file @
ee5f47c
...
...
@@ -84,6 +84,7 @@ def show_inquiry(inq):
show_rp
(
'Total Tagihan'
,
inq
.
total
)
show_field
(
inq
.
invoice
,
'status_pembayaran_sppt'
)
show_field
(
inq
.
invoice
,
'status_tagihan_sppt'
)
show_field
(
inq
.
invoice
,
'denda_status'
)
show_field
(
inq
.
invoice
,
'pbb_yg_harus_dibayar_sppt'
)
show_field
(
inq
.
invoice
,
'pbb_terhutang_sppt'
)
show_field
(
inq
.
invoice
,
'faktor_pengurang_sppt'
)
...
...
sismiop/services/tasik_kota.py
View file @
ee5f47c
from
datetime
import
date
from
..models.tasik_kota
import
(
Sppt
,
PembayaranSppt
,
)
from
..models.tasik_kota
import
Sppt
from
.base
import
get_db_session
from
.tasik_kab
import
(
AvailableInvoice
,
Inquiry
as
BaseInquiry
,
...
...
@@ -10,23 +8,59 @@ from .tasik_kab import (
)
AWAL_DISC
=
date
(
2026
,
10
,
17
)
AKHIR_DISC
=
date
(
2026
,
11
,
17
)
class
Inquiry
(
BaseInquiry
):
def
get_invoice_model
(
self
):
# Override
return
Sppt
def
get_payment_model
(
self
):
# Override
return
PembayaranSppt
def
get_persen_denda
(
self
):
# Override
if
self
.
invoice
.
thn_pajak_sppt
<
'2024'
:
return
2
return
1
def
hitung_discount
(
self
):
# Override
def
hitung_discount
_denda
(
self
):
if
self
.
invoice
.
denda_status
==
'1'
:
self
.
discount
=
int
(
self
.
invoice
.
denda_pbb
or
0
)
self
.
discount_denda
=
int
(
self
.
invoice
.
denda_pbb
or
0
)
elif
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
:
if
self
.
invoice
.
thn_pajak_sppt
<=
'2026'
:
self
.
discount_denda
=
self
.
denda
def
hitung_discount_pokok
(
self
):
if
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
:
if
self
.
invoice
.
thn_pajak_sppt
>=
'2026'
:
return
if
not
self
.
tahun_lunas
(
'2026'
):
return
if
'2021'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2025'
:
disc
=
0.25
elif
'2013'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2020'
:
disc
=
0.5
else
:
# Ketentuan discount pokok seratus persen ini membuat
# tidak bisa dibayar karena tagihannya nol
disc
=
1
self
.
discount_pokok
=
int
(
disc
*
self
.
tagihan
)
def
hitung_discount
(
self
):
# Override
self
.
discount_denda
=
self
.
discount_pokok
=
0
self
.
hitung_discount_denda
()
self
.
hitung_discount_pokok
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
def
before_save
(
self
,
payment
):
# Override
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount_denda
payment
.
discount_denda
=
self
.
discount_denda
payment
.
discount_pokok
=
self
.
discount_pokok
# Sekedar catatan
payment
.
denda_sblm_diskon
=
self
.
denda
def
tahun_lunas
(
self
,
tahun
):
db_session
=
get_db_session
()
q
=
db_session
.
query
(
Sppt
)
q
=
self
.
get_filter_op
(
q
)
q
=
q
.
filter_by
(
thn_pajak_sppt
=
tahun
)
row
=
q
.
first
()
return
row
and
row
.
status_pembayaran_sppt
==
'1'
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