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 547325e0
authored
Mar 25, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount Kabupaten Subang
1 parent
1c2fe7ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
CHANGES.txt
sismiop/services/subang.py
CHANGES.txt
View file @
547325e
0.3.8 2024-03-25
----------------
- Discount Kabupaten Subang
0.3.7 2024-02-28
0.3.7 2024-02-28
----------------
----------------
- Kabupaten Bekasi, Kota Tasik, Kabupaten Subang, Kabupaten Pangandaran, dan
- Kabupaten Bekasi, Kota Tasik, Kabupaten Subang, Kabupaten Pangandaran, dan
...
...
sismiop/services/subang.py
View file @
547325e
...
@@ -8,8 +8,8 @@ from .default import (
...
@@ -8,8 +8,8 @@ from .default import (
)
)
AWAL_DISC
=
date
(
202
3
,
8
,
17
)
AWAL_DISC
=
date
(
202
4
,
3
,
25
)
AKHIR_DISC
=
date
(
202
3
,
12
,
15
)
AKHIR_DISC
=
date
(
202
4
,
5
,
31
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -41,6 +41,17 @@ class Inquiry(BaseInquiry):
...
@@ -41,6 +41,17 @@ class Inquiry(BaseInquiry):
return
self
.
denda
return
self
.
denda
return
0
return
0
def
hitung_discount_pokok
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
!=
'2024'
:
return
0
if
self
.
tagihan
<=
2000000
:
potongan
=
0.1
elif
self
.
tagihan
<=
5000000
:
potongan
=
0.075
else
:
potongan
=
0.05
return
int
(
potongan
*
self
.
tagihan
)
def
hitung_discount
(
self
):
# Override
def
hitung_discount
(
self
):
# Override
self
.
discount
=
self
.
discount_denda
=
self
.
discount_pokok
=
0
self
.
discount
=
self
.
discount_denda
=
self
.
discount_pokok
=
0
if
self
.
tgl_bayar
<
AWAL_DISC
:
if
self
.
tgl_bayar
<
AWAL_DISC
:
...
@@ -48,7 +59,8 @@ class Inquiry(BaseInquiry):
...
@@ -48,7 +59,8 @@ class Inquiry(BaseInquiry):
if
self
.
tgl_bayar
>
AKHIR_DISC
:
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
return
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount
=
self
.
discount_denda
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
def
before_save
(
self
,
payment
):
# Override
def
before_save
(
self
,
payment
):
# Override
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount_denda
# Netto
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount_denda
# Netto
...
...
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