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 510885b7
authored
Apr 28, 2025
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount Kota Bogor
1 parent
4c5ea6f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
CHANGES.txt
pyproject.toml
sismiop/services/bogor_kota.py
CHANGES.txt
View file @
510885b
0.3.29 2025-04-27
-----------------
- Discount Kota Bogor
0.3.28 2025-02-20
-----------------
- Discount Kota Tangerang menggunakan round() ketimbang int() sesuai rumus
...
...
pyproject.toml
View file @
510885b
...
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name
=
'sismiop-models'
version
=
'
0.3.2
7
'
version
=
'
0.3.2
9
'
dependencies
=
[
'sqlalchemy'
,
'zope.sqlalchemy'
,
...
...
sismiop/services/bogor_kota.py
View file @
510885b
...
...
@@ -15,11 +15,13 @@ from .default import (
)
DISC
=
{
2
:
0.15
,
3
:
0.1
,
4
:
0.05
,
}
DISC_POKOK
=
[
(
date
(
2025
,
4
,
28
),
date
(
2025
,
5
,
27
),
0.1
),
(
date
(
2025
,
5
,
28
),
date
(
2025
,
6
,
28
),
0.05
),
]
DISC_DENDA_AWAL
=
date
(
2025
,
4
,
28
)
DISC_DENDA_AKHIR
=
date
(
2025
,
6
,
28
)
class
Common
(
Query
):
...
...
@@ -66,18 +68,25 @@ class Inquiry(BaseInquiry, Common):
return
if
self
.
is_pst
():
return
if
self
.
invoice
.
thn_pajak_sppt
!=
'202
4
'
:
if
self
.
invoice
.
thn_pajak_sppt
!=
'202
5
'
:
return
if
self
.
tgl_bayar
.
year
!=
2024
:
for
awal
,
akhir
,
potongan
in
DISC_POKOK
:
if
awal
<=
self
.
tgl_bayar
<=
akhir
:
self
.
discount_pokok
=
int
(
self
.
tagihan
*
potongan
)
return
def
hitung_discount_denda
(
self
):
if
not
self
.
is_e_sppt
():
return
potongan
=
DISC
.
get
(
self
.
tgl_bayar
.
month
)
if
not
potongan
:
if
self
.
invoice
.
thn_pajak_sppt
>
'2024'
:
return
self
.
discount_pokok
=
int
(
self
.
tagihan
*
potongan
)
if
DISC_DENDA_AWAL
<=
self
.
tgl_bayar
<=
DISC_DENDA_AKHIR
:
self
.
discount_denda
=
self
.
denda
def
hitung_discount
(
self
):
# Override
self
.
discount_pokok
=
self
.
discount_denda
=
0
self
.
hitung_discount_pokok
()
self
.
hitung_discount_denda
()
self
.
discount
=
self
.
discount_pokok
+
self
.
discount_denda
def
before_save
(
self
,
bayar
):
# Override
...
...
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