Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
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 a070cbce
authored
Jan 07, 2020
by
yasir
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update tampilan, update json
1 parent
6cd02f1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
src/agratek/api/merchant/views/pay.py
src/agratek/api/merchant/views/pay_request_resp.py
src/agratek/api/merchant/views/templates/pay.pt
src/agratek/api/merchant/views/pay.py
View file @
a070cbc
...
...
@@ -248,6 +248,10 @@ class view_pay(BaseView):
data_form
[
'customer_name'
]
=
row
.
inv_cust_nm
produks
=
row
.
cart
[
'item'
]
for
trans
in
produks
:
trans
[
'goods_amt'
]
=
format
(
int
(
trans
[
'goods_amt'
]),
',d'
)
.
replace
(
','
,
'.'
)
trans
[
'subtotal'
]
=
format
(
int
(
trans
[
'subtotal'
]),
',d'
)
.
replace
(
','
,
'.'
)
form
.
render
(
data_form
)
vaSchema
=
VaSchema
()
...
...
src/agratek/api/merchant/views/pay_request_resp.py
View file @
a070cbc
...
...
@@ -105,6 +105,7 @@ def pay_request(request, data, **kwargs):
r_data
[
'code'
]
=
-
1
else
:
dat
[
'produk'
]
=
dat
[
'cart'
]
values
=
set_register_values
(
dat
,
customer
)
values
=
added_register_values
(
values
,
dat
)
...
...
@@ -134,6 +135,7 @@ def pay_request(request, data, **kwargs):
r_data
[
"message"
]
=
"Data tersimpan silahkan lanjutkan pembayaran"
r_data
[
'code'
]
=
1
r_data
[
'pay_token'
]
=
ar_invoice
.
token_pay_req
r_data
[
'pay_url'
]
=
request
.
_host
+
'/pay/'
+
ar_invoice
.
token_pay_req
log
.
info
(
"
%
s Payment Request Response:
%
s "
%
(
customer
.
kode
,
r_data
))
return
r_data
...
...
src/agratek/api/merchant/views/templates/pay.pt
View file @
a070cbc
<html
metal:use-macro=
"load:
base
.pt"
>
<html
metal:use-macro=
"load:
opensipkd.base:views/templates/base3-clean
.pt"
>
<div
metal:fill-slot=
"content"
>
<style>
button
{
...
...
@@ -90,33 +90,27 @@ td, th {
</div>
</div>
<div
class=
"col-md-12 panel-heading"
>
<h3
class=
"panel-title"
>
Produk :
</h3>
<div
class=
"col-md-12
col-sm-12 col-xs-12
panel-heading"
>
<h3
class=
"panel-title"
>
List
Produk :
</h3>
</div>
<div
style=
"padding: 0px; padding-bottom: 5px; width: 100%; height: 350px; overflow-y: scroll;"
class=
"col-md-12 panel panel-default"
>
<div
tal:repeat=
"prod produks"
class=
"col-md-12"
style=
"text-align: center; margin-bottom: 5px; margin-top: 5px;"
>
<table
align=
"center"
style=
"width:100%"
>
<tr>
<td
bgcolor=
"#cce6ff"
>
Nama
</td>
<td>
${prod['goods_name']}
</td>
</tr>
<tr>
<td
bgcolor=
"#cce6ff"
>
Detail
</td>
<td>
${prod['goods_detail']}
</td>
</tr>
<tr>
<td
bgcolor=
"#cce6ff"
>
Amount
</td>
<td
style=
"text-align: left;"
>
${prod['goods_amt']}
</td>
</tr>
<tr>
<td
bgcolor=
"#cce6ff"
>
Gambar
</td>
<td>
${prod['img_url']}
</td>
</tr>
</table>
<div
tal:repeat=
"prod produks"
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"text-align: center; margin-bottom: 5px; margin-top: 5px;"
>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;"
>
<img
width=
"100px"
src=
"${prod['img_url']}"
>
</div>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"text-align: left; padding: 0px;"
>
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px;"
>
${prod['goods_name']}
</label>
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px; font-size: 0.8em;"
>
@${prod['goods_amt']} x ${prod['qty']}
</label>
</div>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;"
>
<label
style=
"font-weight: bold;"
>
${prod['subtotal']}
</label>
</div>
</div>
<!-- <div style="padding: 0px; padding-bottom: 5px; width: 100%; height: 350px; overflow-y: scroll;" class="col-md-12 panel panel-default">
</div> -->
<!-- Looping Semua Field-->
...
...
@@ -342,7 +336,9 @@ td, th {
</div>
</div>
<script>
function
numberWithCommas
(
x
)
{
return
x
.
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
"."
);
}
$
(
document
).
ready
(
function
()
{
$
(
"[name=biller_name]"
).
prop
(
"readonly"
,
true
);
...
...
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