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 cb80ff9c
authored
Apr 20, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah Kabupaten Subang
1 parent
c7b126f9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
CHANGES.txt
opensipkd/bphtb/services/default/__init__.py
opensipkd/bphtb/services/subang.py
CHANGES.txt
View file @
cb80ff9
0.4.9 2024-04-20
----------------
- Tambah Kabupaten Subang
0.4.8 2024-01-21
----------------
- Di Kabupaten Kuningan jenis kurang bayar 2024 ke atas didenda 1,8%
...
...
@@ -18,7 +22,7 @@
0.4.4 2022-12-22
----------------
- Tambah Kabupaten Serang
- bin/
inquiry tambah --ntp
dan --tgl-bayar bisa ada jam
- bin/
bphtb_inquiry tambah --ntb
dan --tgl-bayar bisa ada jam
0.4.3 2022-03-12
----------------
...
...
opensipkd/bphtb/services/default/__init__.py
View file @
cb80ff9
...
...
@@ -30,6 +30,12 @@ from .structure import (
)
def
get_nop
(
row
):
return
''
.
join
(
[
row
.
kd_propinsi
,
row
.
kd_dati2
,
row
.
kd_kecamatan
,
row
.
kd_kelurahan
,
row
.
kd_blok
,
row
.
no_urut
,
row
.
kd_jns_op
])
class
Common
:
kecamatan_model
=
Kecamatan
kelurahan_model
=
Kelurahan
...
...
@@ -38,6 +44,7 @@ class Common:
customer_model
=
Customer
invoice_id_structure
=
INVOICE_ID
invoice_id_length
=
INVOICE_ID_LENGTH
kode_kurang_bayar
=
KODE_KURANG_BAYAR
def
__init__
(
self
,
invoice_id
):
self
.
invoice_id
=
invoice_id
...
...
@@ -124,7 +131,7 @@ class Inquiry(Common):
self
.
total
=
self
.
tagihan
+
self
.
denda
-
self
.
discount
def
hitung_denda
(
self
):
if
self
.
kode
in
KODE_KURANG_BAYAR
:
if
self
.
kode
in
self
.
kode_kurang_bayar
:
return
if
isinstance
(
self
.
tgl_bayar
,
datetime
):
tgl_bayar
=
self
.
tgl_bayar
.
date
()
...
...
@@ -317,6 +324,7 @@ class AvailableInvoice(BaseAvailableInvoice):
invoice_model
=
Invoice
inquiry_cls
=
Inquiry
invoice_id_structure
=
INVOICE_ID
kode_kurang_bayar
=
KODE_KURANG_BAYAR
def
get_query
(
self
):
db_session
=
get_db_session
()
...
...
@@ -331,7 +339,7 @@ class AvailableInvoice(BaseAvailableInvoice):
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
))
q
=
q
.
filter
(
self
.
invoice_model
.
kode
.
in_
(
self
.
kode_kurang_bayar
))
return
q
.
order_by
(
self
.
invoice_model
.
id
.
desc
())
def
get_message
(
self
,
row
):
...
...
@@ -343,8 +351,9 @@ class AvailableInvoice(BaseAvailableInvoice):
inq
=
self
.
inquiry_cls
(
invoice_id
,
self
.
conf
)
if
inq
.
total
<
1
:
return
nop
=
get_nop
(
row
)
total
=
thousand
(
inq
.
total
)
.
rjust
(
11
)
msg
=
'{id} Rp {total}'
.
format
(
id
=
invoice_id
,
total
=
total
)
msg
=
f
'{invoice_id} {nop} Rp {total}'
if
row
.
tgl_jatuh_tempo
:
return
'{} jatuh tempo {}'
.
format
(
msg
,
row
.
tgl_jatuh_tempo
.
strftime
(
'
%
d-
%
m-
%
Y'
))
...
...
opensipkd/bphtb/services/subang.py
0 → 100644
View file @
cb80ff9
from
.default
import
(
Inquiry
as
BaseInquiry
,
Reversal
,
AvailableInvoice
as
BaseAvailableInvoice
,
)
class
Inquiry
(
BaseInquiry
):
kode_kurang_bayar
=
[
'1'
,
'5'
]
class
AvailableInvoice
(
BaseAvailableInvoice
):
kode_kurang_bayar
=
[
'1'
,
'5'
]
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