Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-bpd-sultra
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 23464452
authored
Nov 29, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Perubahan invoice profile
1 parent
c0a653d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
CHANGES.txt
opensipkd/views/bpd_sultra/linkaja/pbb.py
CHANGES.txt
View file @
2346445
0.1
4
-11-2021
0.1
29
-11-2021
-------------
-------------
-
- Kali pertama
- Kali pertama
opensipkd/views/bpd_sultra/linkaja/pbb.py
View file @
2346445
...
@@ -19,27 +19,29 @@ from bpd_sultra.structure import (
...
@@ -19,27 +19,29 @@ from bpd_sultra.structure import (
from
bpd_sultra.pbb
import
WebClient
as
BaseWebClient
from
bpd_sultra.pbb
import
WebClient
as
BaseWebClient
NUM_FIELDS
=
[
PROFILE_FIELDS
=
[
(
'JML_POKOK'
,
'Pok'
),
(
'NOP'
,
'NOP'
,
False
),
(
'JML_DENDA'
,
'Den'
)]
(
'THN_PAJAK'
,
'Tahun'
,
False
),
(
'NAMA_WP'
,
'Nama'
,
False
),
STR_FIELDS
=
[
'ALAMAT_WP'
,
'KELURAHAN_WP'
]
(
'KELURAHAN_WP'
,
'Kelurahan'
,
False
),
(
'ALAMAT_WP'
,
'Alamat'
,
False
),
(
'JML_POKOK'
,
'Pokok'
,
True
),
(
'JML_DENDA'
,
'Denda'
,
True
)]
def
profile2name
(
resp
):
def
profile2name
(
resp
):
invoice_id
=
'NOP {} Tahun {}'
.
format
(
resp
[
'NOP'
],
resp
[
'THN_PAJAK'
])
msg
=
[]
msg
=
[
invoice_id
,
resp
[
'NAMA_WP'
]]
for
field
,
label
,
is_num
in
PROFILE_FIELDS
:
for
field
,
label
in
NUM_FIELDS
:
val
=
resp
[
field
]
s
=
resp
[
field
]
if
is_num
:
if
s
:
if
not
val
:
msg
.
append
(
f
'{label} {s}'
)
val
=
'0'
for
field
in
STR_FIELDS
:
elif
val
:
s
=
resp
[
field
]
val
=
val
.
replace
(
':'
,
' '
)
.
replace
(
'_'
,
' '
)
if
s
:
else
:
if
field
==
'ALAMAT_OP'
:
val
=
'-'
s
=
s
.
replace
(
':'
,
' '
)
msg
.
append
(
f
'{label}_{val}'
)
msg
.
append
(
s
)
return
'_'
.
join
(
msg
)
return
', '
.
join
(
msg
)
class
WebClient
(
BaseWebClient
):
class
WebClient
(
BaseWebClient
):
...
...
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