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 2555ed0e
authored
Jan 03, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
2024 ke atas denda 1%
1 parent
63cc13fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
26 deletions
CHANGES.txt
sismiop/services/base.py
sismiop/services/tangsel.py
CHANGES.txt
View file @
2555ed0
0.3 2024-01-02
-----------------
- Tahun 2023 ke bawah persen denda ambil dari file konfigurasi, sedangkan
2024 ke atas di-hard-code 1%
- Discount Pokok Kota Tangerang Selatan
0.2.12 2023-12-01
-----------------
- Discount denda Kota Bekasi
...
...
sismiop/services/base.py
View file @
2555ed0
...
...
@@ -158,7 +158,10 @@ class Inquiry(Query):
if
not
self
.
is_available
():
self
.
invoice
=
None
return
self
.
persen_denda
=
persen_denda
if
self
.
invoice
.
thn_pajak_sppt
<
'2024'
:
self
.
persen_denda
=
persen_denda
else
:
self
.
persen_denda
=
1
# Digunakan untuk ISO8583
self
.
tagihan
=
self
.
denda
=
self
.
discount
=
self
.
total
=
0
self
.
hitung
()
...
...
sismiop/services/tangsel.py
View file @
2555ed0
...
...
@@ -20,8 +20,10 @@ from .default import (
from
..models.tangsel
import
PembayaranSppt
AWAL_DISC
=
date
(
2023
,
9
,
1
)
AKHIR_DISC
=
date
(
2023
,
12
,
28
)
AWAL_DISC_1
=
date
(
2024
,
1
,
3
)
AKHIR_DISC_1
=
date
(
2024
,
4
,
30
)
AWAL_DISC_2
=
date
(
2024
,
5
,
1
)
AKHIR_DISC_2
=
date
(
2024
,
6
,
30
)
class
Inquiry
(
BaseInquiry
):
...
...
@@ -54,30 +56,20 @@ class Inquiry(BaseInquiry):
super
()
.
hitung_denda
()
self
.
denda_sblm_diskon
=
self
.
denda
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<
'2022'
:
return
self
.
denda
# discount 100%
return
0
def
hitung_discount_pokok
(
self
):
# Abaikan faktor_pengurang_sppt
# (Kabid Jimmy via Eko Novianto, 6-8-2022)
# faktor_pengurang = self.invoice.faktor_pengurang_sppt or 0
# if faktor_pengurang > 0:
# return 0
if
self
.
invoice
.
thn_pajak_sppt
<
'2014'
:
disc
=
0.75
elif
'2014'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2020'
:
disc
=
0.3
else
:
disc
=
0
disc
=
0
if
self
.
invoice
.
thn_pajak_sppt
==
'2024'
:
if
AWAL_DISC_1
<=
self
.
tgl_bayar
<=
AKHIR_DISC_1
:
disc
=
0.1
elif
AWAL_DISC_2
<=
self
.
tgl_bayar
<=
AKHIR_DISC_2
:
disc
=
0.05
return
int
(
disc
*
self
.
tagihan
)
def
hitung_discount_denda
(
self
):
if
'1994'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2022'
:
return
self
.
denda
# discount 100%
return
0
def
tahun_lunas
(
self
,
tahun
):
DBSession
=
get_db_session
()
Sppt
=
self
.
get_invoice_model
()
...
...
@@ -89,14 +81,7 @@ class Inquiry(BaseInquiry):
def
hitung_discount
(
self
):
# Override
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
self
.
tgl_bayar
<
AWAL_DISC
:
return
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
if
not
self
.
tahun_lunas
(
'2023'
):
return
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
def
before_save
(
self
,
payment
):
# 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