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 d639c18e
authored
Jan 02, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount 2023 Tangerang Selatan
1 parent
26a92aea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
5 deletions
CHANGES.txt
sismiop/services/tangsel.py
CHANGES.txt
View file @
d639c18
0.1.41 2022-12-30
-----------------
- Discount 2023 untuk Tangerang Selatan
0.1.40 2022-8-6
0.1.40 2022-8-6
---------------
---------------
- Di Tangerang Selatan discount pokok tidak perlu memperhatikan nilai
- Di Tangerang Selatan discount pokok tidak perlu memperhatikan nilai
...
...
sismiop/services/tangsel.py
View file @
d639c18
...
@@ -22,8 +22,13 @@ from .default import (
...
@@ -22,8 +22,13 @@ from .default import (
from
..models.tangsel
import
PembayaranSppt
from
..models.tangsel
import
PembayaranSppt
AWAL_DISC
=
date
(
2022
,
8
,
1
)
AKHIR_DISC_2022
=
date
(
2022
,
12
,
31
)
AKHIR_DISC
=
date
(
2022
,
12
,
31
)
AWAL_DISC_PERIODE_1
=
date
(
2023
,
1
,
1
)
AKHIR_DISC_PERIODE_1
=
date
(
2023
,
4
,
30
)
AWAL_DISC_PERIODE_2
=
date
(
2023
,
5
,
1
)
AKHIR_DISC_PERIODE_2
=
date
(
2023
,
6
,
30
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -81,14 +86,47 @@ class Inquiry(BaseInquiry):
...
@@ -81,14 +86,47 @@ class Inquiry(BaseInquiry):
disc
=
0
disc
=
0
return
int
(
disc
*
self
.
tagihan
)
return
int
(
disc
*
self
.
tagihan
)
def
hitung_discount
(
self
):
# Override
def
hitung_discount_2022
(
self
):
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
self
.
tgl_bayar
>
AKHIR_DISC_2022
:
if
self
.
tgl_bayar
<
AWAL_DISC
or
self
.
tgl_bayar
>
AKHIR_DISC
:
return
return
if
self
.
tahun_2022_belum_lunas
():
if
self
.
tahun_2022_belum_lunas
():
return
return
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
return
True
def
hitung_discount_denda_periode_1
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<
'2023'
:
return
self
.
denda
# discount 100%
return
0
def
hitung_discount_pokok_periode_1
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
==
'2023'
:
disc
=
0.1
elif
self
.
invoice
.
thn_pajak_sppt
>=
'2014'
and
\
self
.
invoice
.
thn_pajak_sppt
<=
'2022'
:
disc
=
0.3
else
:
disc
=
0.75
return
int
(
disc
*
self
.
tagihan
)
def
hitung_discount_pokok_periode_2
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
==
'2023'
:
disc
=
0.05
return
int
(
disc
*
self
.
tagihan
)
return
0
def
hitung_discount
(
self
):
# Override
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
self
.
hitung_discount_2022
():
return
if
self
.
tgl_bayar
>=
AWAL_DISC_PERIODE_1
and
\
self
.
tgl_bayar
<=
AKHIR_DISC_PERIODE_1
:
self
.
discount_denda
=
self
.
hitung_discount_denda_periode_1
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok_periode_1
()
elif
self
.
tgl_bayar
>=
AWAL_DISC_PERIODE_2
and
\
self
.
tgl_bayar
<=
AKHIR_DISC_PERIODE_2
:
self
.
discount_pokok
=
self
.
hitung_discount_pokok_periode_2
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
def
before_save
(
self
,
payment
):
# Override
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