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 f451355c
authored
Aug 16, 2022
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount Kota Tangerang
1 parent
26a92aea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
21 deletions
CHANGES.txt
sismiop/services/tangkota.py
CHANGES.txt
View file @
f451355
0.1.41 2022-8-16
----------------
- Rumus discount Kota Tangerang
0.1.40 2022-8-6
---------------
- Di Tangerang Selatan discount pokok tidak perlu memperhatikan nilai
...
...
sismiop/services/tangkota.py
View file @
f451355
...
...
@@ -8,16 +8,8 @@ from .tangsel import (
from
..models.tangsel
import
PembayaranSppt
AWAL_DISC
=
date
(
2021
,
3
,
22
)
AKHIR_DISC
=
date
(
2021
,
6
,
30
)
TAHUN_PAJAK_DISC_POKOK
=
'2021'
BUKU_DISC_POKOK
=
[
(
100000
,
0
),
(
500000
,
0.2
),
(
2000000
,
0.15
),
(
5000000
,
0.1
),
(
None
,
0.05
)]
AWAL_DISC
=
date
(
2022
,
8
,
17
)
AKHIR_DISC
=
date
(
2022
,
8
,
31
)
class
Inquiry
(
BaseInquiry
):
...
...
@@ -27,21 +19,23 @@ class Inquiry(BaseInquiry):
def
hitung_discount
(
self
):
# Override
self
.
denda_sblm_diskon
=
self
.
denda
self
.
discount_denda
=
self
.
discount_pokok
=
0
self
.
discount
=
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
def
hitung_discount_pokok
(
self
):
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
0
return
if
self
.
tgl_bayar
<
AWAL_DISC
:
return
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount
=
self
.
discount_pokok
+
self
.
discount_denda
def
hitung_discount_pokok
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
>
'2014'
:
return
0
if
self
.
invoice
.
thn_pajak_sppt
!=
TAHUN_PAJAK_DISC_POKOK
:
return
int
(
0.77
*
self
.
tagihan
)
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
>
'2021'
:
return
0
for
max_tagihan
,
disc
in
BUKU_DISC_POKOK
:
if
max_tagihan
is
None
:
break
if
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
<=
max_tagihan
:
break
return
int
(
disc
*
self
.
tagihan
)
return
self
.
denda
class
AvailableInvoice
(
BaseAvailableInvoice
):
...
...
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