Commit 8100bb8b by suri

update qris dan va bjb

1 parent 958acf40
...@@ -30,6 +30,12 @@ import base64 ...@@ -30,6 +30,12 @@ import base64
import hashlib import hashlib
import hmac import hmac
import sys import sys
from random import choice
from string import (
ascii_uppercase,
ascii_lowercase,
digits,
)
class DepartemenRoute(KodeModel, Base): class DepartemenRoute(KodeModel, Base):
__tablename__ = 'departemen_route' __tablename__ = 'departemen_route'
......
...@@ -33,9 +33,9 @@ from sqlalchemy import Integer ...@@ -33,9 +33,9 @@ from sqlalchemy import Integer
def rpc_params(): def rpc_params():
parameter = dict( parameter = dict(
bjbqris_url = get_settings()['bjbqris_url'] and get_settings()['bjbqris_url'].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'].value.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'].value.strip() or '' bjbqris_key = get_settings()['bjbqris_key'] and get_settings()['bjbqris_key'].strip() or ''
) )
return parameter return parameter
......
...@@ -33,9 +33,9 @@ from sqlalchemy import Integer ...@@ -33,9 +33,9 @@ from sqlalchemy import Integer
def rpc_params(): def rpc_params():
parameter = dict( parameter = dict(
bjbva_url = get_settings()['bjbva_url'] and get_settings()['bjbva_url'].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'].value.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'].value.strip() or '' bjbva_key = get_settings()['bjbva_key'] and get_settings()['bjbva_key'].strip() or ''
) )
return parameter return parameter
...@@ -260,6 +260,8 @@ class view(object): ...@@ -260,6 +260,8 @@ class view(object):
inv = q_inv(val['invoice_no']).first() inv = q_inv(val['invoice_no']).first()
pokok, denda = calculate_tagihan(dict(pokok = inv.jumlah,jatuh_tempo=inv.jatuh_tempo)) pokok, denda = calculate_tagihan(dict(pokok = inv.jumlah,jatuh_tempo=inv.jatuh_tempo))
val['amount'] = (pokok+denda) val['amount'] = (pokok+denda)
print ("=======================")
print(val)
row = BJBVA.create_va(val, rpc_params()) row = BJBVA.create_va(val, rpc_params())
if row: if row:
request.session.flash('BJBVA No. %s sudah ditambahkan.' % row.va_number) request.session.flash('BJBVA No. %s sudah ditambahkan.' % row.va_number)
......
...@@ -179,8 +179,19 @@ ...@@ -179,8 +179,19 @@
' </label>', ' </label>',
' <button id="btn_pdf" class="btn btn btn-success pull-left" type="button">PDF</button>', ' <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>', ' <button id="btn_csv" class="btn btn btn-info pull-left" type="button">CSV</button>',
'<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;', ' &nbsp;',
'</div>', '</div>',
]; ];
var tb = tb_array.join(' '); var tb = tb_array.join(' ');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!