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 148b7997
authored
Jul 05, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modul bogor_kota: discount denda hingga 31 Agustus 2020
1 parent
6086ee69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
49 deletions
CHANGES.txt
sismiop/services/bogor_kota/__init__.py
CHANGES.txt
View file @
148b799
0.1.7 2020-07-05
----------------
- Modul bogor_kota:
- Tidak ada discount pokok
- Discount denda diperpanjang hingga 31 Agustus 2020
0.1.6 2020-07-03
0.1.6 2020-07-03
----------------
----------------
- Modul tangkota: penyimpanan ke tabel pembayaran_sppt adalah netto sebagaimana
- Modul tangkota: penyimpanan ke tabel pembayaran_sppt adalah netto sebagaimana
...
...
sismiop/services/bogor_kota/__init__.py
View file @
148b799
...
@@ -34,59 +34,23 @@ class Common(Query):
...
@@ -34,59 +34,23 @@ class Common(Query):
class
Inquiry
(
BaseInquiry
,
Common
):
class
Inquiry
(
BaseInquiry
,
Common
):
def
is_pst
(
self
):
DBSession
=
get_db_session
()
inv_id
=
self
.
invoice_id
q
=
DBSession
.
query
(
PenguranganPst
)
.
filter_by
(
kd_propinsi_pemohon
=
inv_id
[
'Propinsi'
],
kd_dati2_pemohon
=
inv_id
[
'Kabupaten'
],
kd_kecamatan_pemohon
=
inv_id
[
'Kecamatan'
],
kd_kelurahan_pemohon
=
inv_id
[
'Kelurahan'
],
kd_blok_pemohon
=
inv_id
[
'Blok'
],
no_urut_pemohon
=
inv_id
[
'Urut'
],
kd_jns_op_pemohon
=
inv_id
[
'Jenis'
],
thn_peng_pst
=
inv_id
[
'Tahun'
])
pst
=
q
.
first
()
return
pst
and
pst
.
no_sk
and
pst
.
status_sk_peng_pst
!=
'2'
# 01-10-2017 Perwal Kota Bogor penghapusan denda
# 01-10-2017 Perwal Kota Bogor penghapusan denda
def
rumus_2017
(
self
):
def
rumus_
discount_denda_
2017
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<
'2013'
:
if
self
.
invoice
.
thn_pajak_sppt
<
'2013'
:
self
.
discount
=
self
.
denda
self
.
discount
=
self
.
denda
def
rumus_discount_pokok
(
self
):
def
rumus_discount_denda_2020
(
self
):
if
self
.
tgl_bayar
.
month
==
4
:
if
self
.
invoice
.
thn_pajak_sppt
<
'2020'
:
pengurang
=
0
#0.15
self
.
discount
=
self
.
denda
elif
self
.
tgl_bayar
.
month
==
5
:
pengurang
=
0
#0.1
elif
self
.
tgl_bayar
.
month
==
6
:
pengurang
=
0
#0.05
else
:
return
self
.
denda
=
0
# discount di-round-down
self
.
discount
=
int
(
pengurang
*
self
.
tagihan
)
self
.
discount_pokok
=
True
def
rumus_discount_denda
(
self
):
self
.
discount
=
self
.
denda
self
.
discount_denda
=
True
def
hitung
(
self
):
# Override
self
.
discount_denda
=
self
.
discount_pokok
=
False
BaseInquiry
.
hitung
(
self
)
def
hitung_discount
(
self
):
# Override
def
hitung_discount
(
self
):
# Override
if
self
.
tgl_bayar
.
year
==
2020
and
self
.
tgl_bayar
.
month
in
(
4
,
5
,
6
):
if
self
.
tgl_bayar
.
year
==
2020
and
self
.
tgl_bayar
.
month
in
(
7
,
8
):
if
self
.
invoice
.
thn_pajak_sppt
==
'2020'
:
self
.
rumus_discount_denda_2020
()
if
not
self
.
is_pst
():
self
.
rumus_discount_pokok
()
elif
self
.
invoice
.
thn_pajak_sppt
<
'2020'
:
self
.
rumus_discount_denda
()
else
:
else
:
self
.
rumus_2017
()
self
.
rumus_
discount_denda_
2017
()
def
before_save
(
self
,
bayar
):
# Override
def
before_save
(
self
,
bayar
):
# Override
if
not
self
.
discount
_pokok
and
not
self
.
discount_denda
:
if
not
self
.
discount
:
return
return
inv
=
self
.
invoice
inv
=
self
.
invoice
pc
=
PenguranganCovid
(
pc
=
PenguranganCovid
(
...
@@ -96,11 +60,8 @@ class Inquiry(BaseInquiry, Common):
...
@@ -96,11 +60,8 @@ class Inquiry(BaseInquiry, Common):
kd_blok
=
bayar
.
kd_blok
,
no_urut
=
bayar
.
no_urut
,
kd_blok
=
bayar
.
kd_blok
,
no_urut
=
bayar
.
no_urut
,
kd_jns_op
=
bayar
.
kd_jns_op
,
thn_pajak_sppt
=
bayar
.
thn_pajak_sppt
,
kd_jns_op
=
bayar
.
kd_jns_op
,
thn_pajak_sppt
=
bayar
.
thn_pajak_sppt
,
pembayaran_sppt_ke
=
bayar
.
pembayaran_sppt_ke
,
pembayaran_sppt_ke
=
bayar
.
pembayaran_sppt_ke
,
bayar
=
self
.
discount
)
bayar
=
self
.
discount
,
if
self
.
discount_pokok
:
denda
=
self
.
discount
)
pc
.
denda
=
0
elif
self
.
discount_denda
:
pc
.
denda
=
self
.
discount
DBSession
=
get_db_session
()
DBSession
=
get_db_session
()
DBSession
.
add
(
pc
)
DBSession
.
add
(
pc
)
...
...
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