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 44926b32
authored
Dec 30, 2025
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount pokok Kota Tangerang Selatan
1 parent
6b559e8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
20 deletions
CHANGES.txt
pyproject.toml
sismiop/services/tangsel.py
CHANGES.txt
View file @
44926b3
0.3.44 2025-12-30
-----------------
- Discount pokok Kota Tangerang Selatan
0.3.43 2025-12-17
-----------------
- Bug fixed total bayar di Kota Bogor
...
...
pyproject.toml
View file @
44926b3
...
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name
=
'sismiop-models'
version
=
'
0.3.4
3
'
version
=
'
0.3.4
4
'
dependencies
=
[
'sqlalchemy'
,
'zope.sqlalchemy'
,
...
...
sismiop/services/tangsel.py
View file @
44926b3
...
...
@@ -23,8 +23,10 @@ from ..models.tangsel import (
)
AWAL_DISC
=
date
(
2025
,
10
,
1
)
AKHIR_DISC
=
date
(
2025
,
12
,
29
)
DISC
=
[
(
date
(
2026
,
1
,
1
),
date
(
2026
,
4
,
30
),
0.1
),
(
date
(
2026
,
5
,
1
),
date
(
2026
,
6
,
30
),
0.05
),
]
class
Inquiry
(
BaseInquiry
):
...
...
@@ -66,16 +68,6 @@ class Inquiry(BaseInquiry):
return
0
return
int
(
disc
*
self
.
tagihan
)
def
get_disc
(
self
):
if
not
self
.
tahun_lunas
(
'2025'
):
print
(
'Tahun 2025 belum lunas'
)
return
0
if
self
.
invoice
.
thn_pajak_sppt
<=
'2014'
:
return
0.75
if
self
.
invoice
.
thn_pajak_sppt
<=
'2024'
:
return
0.3
return
0
def
tahun_lunas
(
self
,
tahun
):
DBSession
=
get_db_session
()
Sppt
=
self
.
get_invoice_model
()
...
...
@@ -86,13 +78,14 @@ class Inquiry(BaseInquiry):
return
row
and
row
.
status_pembayaran_sppt
==
'1'
def
hitung_discount
(
self
):
# Override
if
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
:
disc
=
self
.
get_disc
()
self
.
discount_denda
=
int
(
disc
*
self
.
denda
)
self
.
discount_pokok
=
self
.
hitung_discount_pokok
(
disc
)
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
else
:
self
.
discount_denda
=
self
.
discount_pokok
=
0
self
.
discount_denda
=
self
.
discount_pokok
=
0
if
self
.
invoice
.
thn_pajak_sppt
!=
'2026'
:
return
for
awal
,
akhir
,
potongan
in
DISC
:
if
awal
<=
self
.
tgl_bayar
<=
akhir
:
self
.
discount
=
self
.
discount_pokok
=
\
self
.
hitung_discount_pokok
(
potongan
)
return
def
before_save
(
self
,
payment
):
# Override
# Sekedar catatan
...
...
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