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 40c8ebec
authored
Oct 09, 2022
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rumus discount denda Kota Bogor
1 parent
60e48289
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
CHANGES.txt
sismiop/services/bogor_kota.py
CHANGES.txt
View file @
40c8ebe
0.1.45 2022-10-9
----------------
- Rumus discount denda Kota Bogor
0.1.44 2022-10-1
----------------
- Tambah Kabupaten Bandung
...
...
sismiop/services/bogor_kota.py
View file @
40c8ebe
...
...
@@ -15,9 +15,8 @@ from .default import (
)
# Discount pokok berdasarkan bulan
DISC_POKOK_2022
=
{
2
:
0.15
,
3
:
0.1
,
4
:
0.05
}
DISC_POKOK_MAX_2017
=
{
2
:
0.2
,
3
:
0.2
,
4
:
0.2
}
AWAL_DISC
=
date
(
2022
,
10
,
10
)
AKHIR_DISC
=
date
(
2022
,
12
,
23
)
class
Common
(
Query
):
...
...
@@ -59,31 +58,25 @@ class Inquiry(BaseInquiry, Common):
pst
=
q
.
first
()
return
pst
and
pst
.
no_sk
and
pst
.
status_sk_peng_pst
!=
'2'
def
hitung_discount_pokok
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
==
'2022'
:
potongan
=
DISC_POKOK_2022
[
self
.
tgl_bayar
.
month
]
elif
self
.
invoice
.
thn_pajak_sppt
<=
'2017'
:
potongan
=
DISC_POKOK_MAX_2017
[
self
.
tgl_bayar
.
month
]
else
:
return
self
.
discount_pokok
=
int
(
potongan
*
self
.
tagihan
)
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<=
'2021'
:
self
.
discount_denda
=
self
.
denda
self
.
discount_denda
=
self
.
denda
def
hitung_discount
(
self
):
# Override
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
self
.
tgl_bayar
.
year
>
2022
:
if
self
.
tgl_bayar
<
AWAL_DISC
:
return
if
self
.
tgl_bayar
.
month
not
in
(
2
,
3
,
4
):
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
if
self
.
invoice
.
thn_pajak_sppt
>
'2022'
:
return
if
self
.
tgl_bayar
.
year
>
2022
:
return
if
not
self
.
is_e_sppt
():
return
if
self
.
denda
:
self
.
hitung_discount_denda
()
if
not
self
.
is_pst
():
self
.
hitung_discount_pokok
()
# if not self.is_pst(): # Sertakan ini bila ada discount pokok
#
self.hitung_discount_pokok()
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