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 3be9b74a
authored
Mar 20, 2021
by
h2h
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount pokok Kota Tangerang
1 parent
039e7ce7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
60 deletions
CHANGES.txt
sismiop/services/base.py
sismiop/services/tangkota.py
CHANGES.txt
View file @
3be9b74
0.1.21 2021-02-07
-----------------
- Discount pokok Kota Tangerang
0.1.20 2021-02-07
-----------------
- Penambahan Kota Binjai
...
...
sismiop/services/base.py
View file @
3be9b74
...
...
@@ -138,6 +138,7 @@ class Inquiry(Query):
self
,
invoice_id
=
None
,
persen_denda
=
2
,
invoice
=
None
,
tgl_bayar
=
None
,
debug
=
False
):
Query
.
__init__
(
self
,
invoice_id
,
invoice
)
self
.
debug_invoice
=
None
if
not
self
.
invoice
:
return
if
debug
:
...
...
sismiop/services/tangkota.py
View file @
3be9b74
...
...
@@ -8,35 +8,16 @@ from .tangsel import (
from
..models.tangsel
import
PembayaranSppt
AWAL_DISC
=
date
(
202
0
,
10
,
1
)
AKHIR_DISC
=
date
(
202
0
,
12
,
23
)
AWAL_DISC
=
date
(
202
1
,
3
,
22
)
AKHIR_DISC
=
date
(
202
1
,
6
,
30
)
TAHUN_PAJAK_DISC_POKOK
=
[
'2020'
]
PERIODE_DISC_POKOK
=
{
2020
:
{
7
:
[
(
100000
,
1
),
(
500000
,
0.2
),
(
2000000
,
0.15
),
(
5000000
,
0.1
),
(
None
,
0.05
),
],
8
:
[
(
100000
,
1
),
(
500000
,
0.15
),
(
2000000
,
0.1
),
(
5000000
,
0.05
),
(
None
,
0.03
),
],
9
:
[
(
100000
,
1
),
(
500000
,
0.1
),
(
2000000
,
0.05
),
(
5000000
,
0.03
),
(
None
,
0
),
],
},
}
TAHUN_PAJAK_DISC_POKOK
=
'2021'
BUKU_DISC_POKOK
=
[
(
100000
,
0
),
(
500000
,
0.2
),
(
2000000
,
0.15
),
(
5000000
,
0.1
),
(
None
,
0.05
)]
class
Inquiry
(
BaseInquiry
):
...
...
@@ -46,42 +27,16 @@ class Inquiry(BaseInquiry):
def
hitung_discount
(
self
):
# Override
self
.
denda_sblm_diskon
=
self
.
denda
self
.
discount_denda
=
self
.
discount_pokok
=
0
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
if
self
.
tgl_bayar
<
AWAL_DISC
:
self
.
discount_pokok
=
self
.
hitung_discount_pokok_2020_07_09
()
else
:
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok_2020_10_12
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
self
.
discount
=
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
>
'2020'
:
return
0
return
self
.
denda
def
hitung_discount_pokok_2020_10_12
(
self
):
thn
=
self
.
invoice
.
thn_pajak_sppt
if
thn
>
'2019'
:
return
0
if
thn
<
'2010'
:
disc
=
0.2
elif
thn
<
'2015'
:
disc
=
0.15
else
:
disc
=
0.1
return
int
(
disc
*
self
.
tagihan
)
def
hitung_discount_pokok_2020_07_09
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
not
in
TAHUN_PAJAK_DISC_POKOK
:
def
hitung_discount_pokok
(
self
):
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
0
if
self
.
tgl_bayar
.
year
not
in
PERIODE_DISC_POKOK
:
if
self
.
tgl_bayar
<
AWAL_DISC
:
return
0
bulan_disc
=
PERIODE_DISC_POKOK
[
self
.
tgl_bayar
.
year
]
if
self
.
tgl_bayar
.
month
not
in
bulan_disc
:
if
self
.
invoice
.
thn_pajak_sppt
!=
TAHUN_PAJAK_DISC_POKOK
:
return
0
disc_list
=
bulan_disc
[
self
.
tgl_bayar
.
month
]
for
max_tagihan
,
disc
in
disc_list
:
for
max_tagihan
,
disc
in
BUKU_DISC_POKOK
:
if
max_tagihan
is
None
:
break
if
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
<=
max_tagihan
:
...
...
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