Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-bphtb-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 9eecb884
authored
Apr 15, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Denda hanya untuk jenis kurang bayar
1 parent
080fc384
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
opensipkd/bphtb/scripts/inquiry.py
opensipkd/bphtb/services/default/__init__.py
opensipkd/bphtb/services/default/structure.py
opensipkd/bphtb/scripts/inquiry.py
View file @
9eecb88
...
...
@@ -75,6 +75,7 @@ def show_inquiry(inq):
show_val
(
'Kecamatan Objek Pajak'
,
inq
.
get_kecamatan_op
())
show_val
(
'Kota Objek Pajak'
,
inq
.
get_kota_op
())
show_val
(
'NOP'
,
inq
.
get_nop
())
show_val
(
'Jatuh Tempo'
,
inq
.
get_jatuh_tempo
()
or
''
)
show_rp
(
'Tagihan'
,
inq
.
tagihan
)
show_rp
(
'Denda'
,
inq
.
denda
)
show_rp
(
'Discount'
,
inq
.
discount
)
...
...
opensipkd/bphtb/services/default/__init__.py
View file @
9eecb88
...
...
@@ -25,6 +25,7 @@ from ..base import (
from
.structure
import
(
INVOICE_ID
,
INVOICE_ID_LENGTH
,
KODE_KURANG_BAYAR
,
)
...
...
@@ -44,16 +45,15 @@ class Common:
self
.
invoice_struct
.
set_raw
(
invoice_id
)
self
.
tahun
=
self
.
invoice_struct
[
'Tahun'
]
self
.
tahun
=
int
(
self
.
tahun
)
if
self
.
invoice_struct
[
'Kode'
]:
self
.
kode
=
self
.
invoice_struct
[
'Kode'
]
.
lstrip
(
'0'
)
if
self
.
kode
:
q
=
self
.
query_invoice
()
self
.
invoice
=
q
.
first
()
def
query_invoice
(
self
):
kode
=
int
(
self
.
invoice_struct
[
'Kode'
])
kode
=
str
(
kode
)
db_session
=
get_db_session
()
return
db_session
.
query
(
self
.
invoice_model
)
.
filter_by
(
tahun
=
self
.
tahun
,
kode
=
kode
,
tahun
=
self
.
tahun
,
kode
=
self
.
kode
,
no_sspd
=
self
.
invoice_struct
[
'SSPD No'
])
def
is_paid
(
self
):
...
...
@@ -115,6 +115,8 @@ class Inquiry(Common):
self
.
total
=
self
.
tagihan
+
self
.
denda
-
self
.
discount
def
hitung_denda
(
self
):
if
self
.
kode
not
in
KODE_KURANG_BAYAR
:
return
if
isinstance
(
self
.
tgl_bayar
,
datetime
):
tgl_bayar
=
self
.
tgl_bayar
.
date
()
else
:
...
...
@@ -319,6 +321,8 @@ class AvailableInvoice(BaseAvailableInvoice):
q
=
q
.
filter
(
self
.
invoice_model
.
tgl_jatuh_tempo
>=
kini
)
else
:
q
=
q
.
filter
(
self
.
invoice_model
.
tgl_jatuh_tempo
<
kini
)
if
self
.
option
.
skpdkb
:
q
=
q
.
filter
(
self
.
invoice_model
.
kode
.
in_
(
KODE_KURANG_BAYAR
))
return
q
.
order_by
(
self
.
invoice_model
.
id
.
desc
())
def
get_message
(
self
,
row
):
...
...
opensipkd/bphtb/services/default/structure.py
View file @
9eecb88
...
...
@@ -7,3 +7,6 @@ INVOICE_ID = [
INVOICE_ID_LENGTH
=
0
for
nama
,
size
,
tipe
in
INVOICE_ID
:
INVOICE_ID_LENGTH
+=
size
# Ini adalah komponen Kode pada Invoice ID tergolong kurang bayar
KODE_KURANG_BAYAR
=
[
'2'
,
'4'
]
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