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 5812b05e
authored
Jun 16, 2021
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed available invoice pada Kabupaten Tasikmalaya
1 parent
08fdddc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
CHANGES.txt
sismiop/services/base.py
sismiop/services/tasik_kab.py
CHANGES.txt
View file @
5812b05
0.1.28 2021-06-16
-----------------
- Bug fixed available invoice pada Kabupaten Tasikmalaya
0.1.27 2021-05-27
-----------------
- Tambah Indramayu
...
...
sismiop/services/base.py
View file @
5812b05
...
...
@@ -379,7 +379,6 @@ class AvailableInvoice(Query):
def
show
(
self
):
Invoice
=
self
.
get_invoice_model
()
Payment
=
self
.
get_payment_model
()
inq_cls
=
self
.
get_inquiry_class
()
offset
=
-
1
no
=
0
...
...
sismiop/services/tasik_kab.py
View file @
5812b05
from
datetime
import
(
datetime
,
date
,
)
from
sqlalchemy
import
func
from
opensipkd.hitung
import
round_up
from
..models.tasik_kab
import
(
ObjekPajak
,
Sppt
,
...
...
@@ -18,9 +16,6 @@ from .base import (
)
NOV_30
=
date
(
2020
,
11
,
30
)
class
Inquiry
(
BaseInquiry
):
def
get_op_model
(
self
):
# Override
return
ObjekPajak
...
...
@@ -40,12 +35,24 @@ class Inquiry(BaseInquiry):
def
get_propinsi_model
(
self
):
# Override
return
Propinsi
def
hitung_denda
(
self
):
# Override
super
()
.
hitung_denda
()
if
self
.
tgl_bayar
>
NOV_30
:
return
if
self
.
invoice
.
thn_pajak_sppt
in
(
'2018'
,
'2019'
):
self
.
denda
=
0
def
hitung_pokok
(
self
):
# Override
DBSession
=
get_db_session
()
Payment
=
self
.
get_payment_model
()
q
=
DBSession
.
query
(
func
.
sum
(
Payment
.
jml_sppt_yg_dibayar
)
.
label
(
'jml_sppt_yg_dibayar'
),
func
.
sum
(
Payment
.
denda_sppt
)
.
label
(
'denda_sppt'
))
q
=
self
.
get_filter
(
q
)
bayar
=
q
.
first
()
self
.
total_bayar
=
bayar
.
jml_sppt_yg_dibayar
or
0
denda_lalu
=
bayar
.
denda_sppt
or
0
sisa
=
float
(
self
.
total_bayar
-
denda_lalu
)
tagihan
=
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
-
sisa
if
tagihan
<
0
:
self
.
tagihan
=
0
else
:
self
.
tagihan
=
round_up
(
tagihan
)
class
Reversal
(
BaseReversal
):
...
...
@@ -57,6 +64,9 @@ class Reversal(BaseReversal):
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
return
Inquiry
def
get_invoice_model
(
self
):
return
Sppt
...
...
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