Commit 8100bb8b by suri

update qris dan va bjb

1 parent 958acf40
......@@ -30,6 +30,12 @@ import base64
import hashlib
import hmac
import sys
from random import choice
from string import (
ascii_uppercase,
ascii_lowercase,
digits,
)
class DepartemenRoute(KodeModel, Base):
__tablename__ = 'departemen_route'
......
......@@ -33,9 +33,9 @@ from sqlalchemy import Integer
def rpc_params():
parameter = dict(
bjbqris_url = get_settings()['bjbqris_url'] and get_settings()['bjbqris_url'].value.strip('/') or '',
bjbqris_user = get_settings()['bjbqris_user'] and get_settings()['bjbqris_user'].value.strip() or '',
bjbqris_key = get_settings()['bjbqris_key'] and get_settings()['bjbqris_key'].value.strip() or ''
bjbqris_url = get_settings()['bjbqris_url'] and get_settings()['bjbqris_url'].strip('/') or '',
bjbqris_user = get_settings()['bjbqris_user'] and get_settings()['bjbqris_user'].strip() or '',
bjbqris_key = get_settings()['bjbqris_key'] and get_settings()['bjbqris_key'].strip() or ''
)
return parameter
......
......@@ -33,9 +33,9 @@ from sqlalchemy import Integer
def rpc_params():
parameter = dict(
bjbva_url = get_settings()['bjbva_url'] and get_settings()['bjbva_url'].value.strip('/') or '',
bjbva_user = get_settings()['bjbva_user'] and get_settings()['bjbva_user'].value.strip() or '',
bjbva_key = get_settings()['bjbva_key'] and get_settings()['bjbva_key'].value.strip() or ''
bjbva_url = get_settings()['bjbva_url'] and get_settings()['bjbva_url'].strip('/') or '',
bjbva_user = get_settings()['bjbva_user'] and get_settings()['bjbva_user'].strip() or '',
bjbva_key = get_settings()['bjbva_key'] and get_settings()['bjbva_key'].strip() or ''
)
return parameter
......@@ -260,6 +260,8 @@ class view(object):
inv = q_inv(val['invoice_no']).first()
pokok, denda = calculate_tagihan(dict(pokok = inv.jumlah,jatuh_tempo=inv.jatuh_tempo))
val['amount'] = (pokok+denda)
print ("=======================")
print(val)
row = BJBVA.create_va(val, rpc_params())
if row:
request.session.flash('BJBVA No. %s sudah ditambahkan.' % row.va_number)
......
......@@ -179,10 +179,21 @@
' </label>',
' <button id="btn_pdf" class="btn btn btn-success pull-left" type="button">PDF</button>',
' <button id="btn_csv" class="btn btn btn-info pull-left" type="button">CSV</button>',
' &nbsp;',
'<div class="dropdown">',
'<button class="btn btn btn-danger pull-left" type="button" id="bjb_va_qris" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">BJB VA / QRIS',
'</button>',
'<div class="dropdown-menu" aria-labelledby="bjb_va_qris">',
'<li><a href="/bjbva">BJB VA</a></li>',
'<li><a href="/bjbqris">BJB QRIS</a></li>',
'</div>',
'</div>',
' &nbsp;',
'</div>',
];
];
var tb = tb_array.join(' ');
$("div.toolbar").html(tb);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!