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 8e37f31f
authored
Jan 20, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed saat menyimpan field denda_sppt
1 parent
d1fbdec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
sismiop/services/pangandaran.py
sismiop/services/pangandaran.py
View file @
8e37f31
...
@@ -17,12 +17,20 @@ from .base import (
...
@@ -17,12 +17,20 @@ from .base import (
AWAL_DISC
=
date
(
2024
,
1
,
18
)
AWAL_DISC
=
date
(
2024
,
1
,
18
)
AKHIR_DISC
=
date
(
2024
,
9
,
30
)
AKHIR_DISC
=
date
(
2024
,
9
,
30
)
AWAL_DISC_UNLIMITED
=
date
(
2024
,
1
,
19
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
# 2024 ditutup dulu, Gilang, 19-1-2024
def
is_available
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
>
'2023'
:
return
return
super
()
.
is_available
()
def
hitung_discount_denda
(
self
):
def
hitung_discount_denda
(
self
):
# 2004 - 2013 tanpa batas waktu, Gilang, 18-1-2024
# 2004 - 2013 tanpa batas waktu, Gilang, 18-1-2024
if
'2004'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2013'
:
if
self
.
tgl_bayar
>=
AWAL_DISC_UNLIMITED
and
\
'2004'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2013'
:
return
self
.
denda
return
self
.
denda
if
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
and
\
if
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
and
\
'2014'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2023'
:
'2014'
<=
self
.
invoice
.
thn_pajak_sppt
<=
'2023'
:
...
@@ -33,7 +41,7 @@ class Inquiry(BaseInquiry):
...
@@ -33,7 +41,7 @@ class Inquiry(BaseInquiry):
self
.
discount
=
self
.
hitung_discount_denda
()
self
.
discount
=
self
.
hitung_discount_denda
()
def
before_save
(
self
,
payment
):
# Override
def
before_save
(
self
,
payment
):
# Override
payment
.
denda_sppt
=
0
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount
payment
.
discount_denda
=
self
.
discount
payment
.
discount_denda
=
self
.
discount
payment
.
discount_pokok
=
0
payment
.
discount_pokok
=
0
...
...
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