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 3dfd900b
authored
Aug 16, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount denda Kabupaten Subang
1 parent
3250a357
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
CHANGES.txt
sismiop/services/subang.py
CHANGES.txt
View file @
3dfd900
0.2.10 2023-08-16
-----------------
- Discount Kabupaten Bekasi
- Discount Kabupaten Subang
0.2.9 2023-08-08
----------------
...
...
sismiop/services/subang.py
View file @
3dfd900
# Keputusan Bupati Subang, 3 Agustus 2022
from
datetime
import
date
from
opensipkd.hitung
import
round_up
from
..models.subang
import
PembayaranSppt
...
...
@@ -10,8 +8,8 @@ from .default import (
)
AWAL_DISC
=
date
(
2023
,
2
,
1
)
AKHIR_DISC
=
date
(
2023
,
4
,
30
)
AWAL_DISC
=
date
(
2023
,
8
,
17
)
AKHIR_DISC
=
date
(
2023
,
12
,
15
)
class
Inquiry
(
BaseInquiry
):
...
...
@@ -34,21 +32,10 @@ class Inquiry(BaseInquiry):
self
.
tagihan
=
round_up
(
tagihan
)
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<
'2023'
:
if
self
.
invoice
.
thn_pajak_sppt
<
=
'2023'
:
return
self
.
denda
return
0
def
hitung_discount_pokok
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
!=
'2023'
:
return
0
if
self
.
tagihan
<=
2000000
:
potongan
=
0.05
elif
self
.
tagihan
<=
5000000
:
potongan
=
0.03
else
:
potongan
=
0.02
return
int
(
potongan
*
self
.
tagihan
)
def
hitung_discount
(
self
):
# Override
self
.
discount
=
self
.
discount_denda
=
self
.
discount_pokok
=
0
if
self
.
tgl_bayar
<
AWAL_DISC
:
...
...
@@ -56,8 +43,7 @@ class Inquiry(BaseInquiry):
if
self
.
tgl_bayar
>
AKHIR_DISC
:
return
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
self
.
discount
=
self
.
discount_denda
def
before_save
(
self
,
payment
):
# Override
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