Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Taufik Yulianto
/
esipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 751495c3
authored
Nov 04, 2022
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
remove thousand separator
1 parent
a26e712c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
esipkd/views/public.py
esipkd/views/public.py
View file @
751495c
...
...
@@ -332,6 +332,14 @@ def view_public(request):
url_dict
=
request
.
matchdict
found
=
False
row
=
''
jml
=
''
tahun
=
''
qrcodebase64
=
''
status_pembayaran
=
''
jml_pokok
=
''
jml_denda
=
''
jml_bayar
=
''
found
=
False
if
url_dict
[
'act'
]
==
'skrd'
:
if
'id'
in
params
and
params
[
'id'
]:
...
...
@@ -395,5 +403,8 @@ def view_public(request):
readqrcode
=
open
(
path
,
'rb'
)
.
read
()
## convert ke base64
qrcodebase64
=
base64
.
b64encode
(
readqrcode
)
##akan diouput ke html image
jml_pokok
=
int
(
re
.
sub
(
"
\
D"
,
""
,
jml_pokok
))
jml_denda
=
int
(
re
.
sub
(
"
\
D"
,
""
,
jml_denda
))
jml_bayar
=
int
(
re
.
sub
(
"
\
D"
,
""
,
jml_bayar
))
return
dict
(
data
=
row
,
jml_terbilang
=
jml
,
tahun
=
tahun
,
qrcodebase64
=
qrcodebase64
,
status_pembayaran
=
status_pembayaran
,
jml_pokok
=
int
(
jml_pokok
),
jml_denda
=
int
(
jml_denda
),
jml_bayar
=
int
(
jml_bayar
)
,
found
=
found
)
return
dict
(
data
=
row
,
jml_terbilang
=
jml
,
tahun
=
tahun
,
qrcodebase64
=
qrcodebase64
,
status_pembayaran
=
status_pembayaran
,
jml_pokok
=
jml_pokok
,
jml_denda
=
jml_denda
,
jml_bayar
=
jml_bayar
,
found
=
found
)
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