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 91bf4c9a
authored
Jan 21, 2022
by
sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rumus discount Kabupaten Cirebon
1 parent
24be694c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
15 deletions
CHANGES.txt
sismiop/services/cirebon_kab.py
CHANGES.txt
View file @
91bf4c9
0.1.32 2022-1-20
----------------
- Rumus discount pokok dan discount denda Kabupaten Cirebon
0.1.31 2022-1-9
0.1.31 2022-1-9
---------------
---------------
- Perubahan rumus discount denda untuk Kota Tasik
- Perubahan rumus discount denda untuk Kota Tasik
...
...
sismiop/services/cirebon_kab.py
View file @
91bf4c9
...
@@ -11,19 +11,20 @@ from .default import (
...
@@ -11,19 +11,20 @@ from .default import (
)
)
AKHIR_DISC
=
date
(
2021
,
10
,
31
)
AKHIR_DISC
_DENDA
=
date
(
2022
,
3
,
31
)
# Discount pokok berdasarkan bulan
# Discount pokok berdasarkan bulan
NILAI_DISC
=
{
NILAI_DISC_POKOK
=
{
2
:
0.1
,
1
:
0.12
,
3
:
0.1
,
2
:
0.12
,
4
:
0.1
,
3
:
0.12
,
4
:
0.12
,
5
:
0.1
,
5
:
0.1
,
6
:
0.1
,
6
:
0.1
,
7
:
0.1
,
7
:
0.1
,
8
:
0.0
8
,
8
:
0.0
7
,
9
:
0.0
8
,
9
:
0.0
7
,
10
:
0.0
5
}
10
:
0.0
7
}
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -32,16 +33,22 @@ class Inquiry(BaseInquiry):
...
@@ -32,16 +33,22 @@ class Inquiry(BaseInquiry):
def
hitung_discount
(
self
):
# Override
def
hitung_discount
(
self
):
# Override
self
.
discount_pokok
=
self
.
discount_denda
=
0
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
self
.
invoice
.
thn_pajak_sppt
!=
'2021'
\
if
self
.
invoice
.
thn_pajak_sppt
>=
'2009'
\
or
self
.
tgl_bayar
>
AKHIR_DISC
:
and
self
.
invoice
.
thn_pajak_sppt
<=
'2021'
:
return
if
self
.
tgl_bayar
<=
AKHIR_DISC_DENDA
:
potongan
=
NILAI_DISC
[
self
.
tgl_bayar
.
month
]
self
.
discount
=
self
.
discount_denda
=
self
.
denda
elif
self
.
invoice
.
thn_pajak_sppt
==
'2022'
\
and
self
.
tgl_bayar
.
year
==
2022
\
and
self
.
tgl_bayar
.
month
in
NILAI_DISC_POKOK
:
potongan
=
NILAI_DISC_POKOK
[
self
.
tgl_bayar
.
month
]
self
.
discount
=
self
.
discount_pokok
=
int
(
potongan
*
self
.
tagihan
)
self
.
discount
=
self
.
discount_pokok
=
int
(
potongan
*
self
.
tagihan
)
def
before_save
(
self
,
payment
):
# Override
def
before_save
(
self
,
payment
):
# Override
# Catat sebagai bruto, ujar Gilang
payment
.
jml_sppt_yg_dibayar
=
self
.
tagihan
+
self
.
denda
payment
.
denda_sblm_diskon
=
self
.
denda
payment
.
denda_sblm_diskon
=
self
.
denda
payment
.
discount_pokok
=
self
.
discount
payment
.
discount_pokok
=
self
.
discount
_pokok
payment
.
discount_denda
=
0
payment
.
discount_denda
=
self
.
discount_denda
class
Reversal
(
BaseReversal
):
class
Reversal
(
BaseReversal
):
...
@@ -49,7 +56,8 @@ class Reversal(BaseReversal):
...
@@ -49,7 +56,8 @@ class Reversal(BaseReversal):
return
PembayaranSppt
return
PembayaranSppt
def
before_save
(
self
):
# Override
def
before_save
(
self
):
# Override
self
.
payment
.
discount_pokok
=
0
self
.
payment
.
discount_pokok
=
self
.
payment
.
discount_denda
=
\
self
.
payment
.
denda_sblm_diskon
=
0
class
AvailableInvoice
(
BaseAvailableInvoice
):
class
AvailableInvoice
(
BaseAvailableInvoice
):
...
...
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