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 898929b9
authored
Oct 25, 2022
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://git.opensipkd.com/taufik/esipkd
2 parents
3178fd0a
f956c722
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
29 deletions
esipkd/views/bjb_va.py
esipkd/views/pap.py
esipkd/views/templates/bjbva/list.pt
esipkd/views/templates/bjbva/vacode.pt
esipkd/views/bjb_va.py
View file @
898929b
...
@@ -444,6 +444,19 @@ class view(object):
...
@@ -444,6 +444,19 @@ class view(object):
values
=
va
.
to_dict
()
values
=
va
.
to_dict
()
BJBVA
.
cancel_va
(
values
,
rpc_params
())
BJBVA
.
cancel_va
(
values
,
rpc_params
())
elif
url_dict
[
'act'
]
==
'vacode'
:
id
=
'id'
in
params
and
params
[
'id'
]
or
''
invoice_no
=
''
va_number
=
''
if
id
:
qris
=
BJBVA
.
query_id
(
id
)
.
first
()
invoice_no
=
qris
.
invoice_no
va_number
=
qris
.
va_number
from
pyramid.renderers
import
render_to_response
return
render_to_response
(
"templates/bjbva/vacode.pt"
,
dict
(
invoice_no
=
invoice_no
,
va_number
=
va_number
))
@jsonrpc_method
(
method
=
'callback'
,
endpoint
=
'bjbva-callback'
)
@jsonrpc_method
(
method
=
'callback'
,
endpoint
=
'bjbva-callback'
)
def
callback
(
request
,
data
):
def
callback
(
request
,
data
):
##
##
...
...
esipkd/views/pap.py
View file @
898929b
...
@@ -18,6 +18,7 @@ from ..models.informix import EngInformix
...
@@ -18,6 +18,7 @@ from ..models.informix import EngInformix
from
.bjb_va
import
rpc_params
,
BJBVA
from
.bjb_va
import
rpc_params
,
BJBVA
from
.bjb_qris
import
BJBQRIS
from
.bjb_qris
import
BJBQRIS
from
..tools
import
ymd
,
dmy
,
ymdhms
,
dmyhms
,
dmy_to_date
from
..tools
import
ymd
,
dmy
,
ymdhms
,
dmyhms
,
dmy_to_date
from
pyramid.renderers
import
render_to_response
,
render
SESS_ADD_FAILED
=
'user add failed'
SESS_ADD_FAILED
=
'user add failed'
SESS_EDIT_FAILED
=
'user edit failed'
SESS_EDIT_FAILED
=
'user edit failed'
...
@@ -306,21 +307,21 @@ def view_add(request):
...
@@ -306,21 +307,21 @@ def view_add(request):
return
dict
(
form
=
form
,
private_key
=
private_key
,
found
=
found
,
data_key
=
data_key
)
return
dict
(
form
=
form
,
private_key
=
private_key
,
found
=
found
,
data_key
=
data_key
)
def
query_id
(
request
):
def
query_id
(
request
):
engInformix
=
EngInformix
()
engInformix
=
EngInformix
()
sql_result1
=
"""
sql_result1
=
"""
SELECT * FROM v_jupntepap
SELECT * FROM v_jupntepap
WHERE npwpd= '{npwpd}' and m_pjk_bln= '{m_pjk_bln}'
WHERE npwpd= '{npwpd}' and m_pjk_bln= '{m_pjk_bln}'
and m_pjk_thn = '{m_pjk_thn}'
and m_pjk_thn = '{m_pjk_thn}'
"""
.
format
(
"""
.
format
(
npwpd
=
request
.
matchdict
[
'nr'
],
npwpd
=
request
.
matchdict
[
'nr'
],
m_pjk_bln
=
request
.
matchdict
[
'nk'
],
m_pjk_bln
=
request
.
matchdict
[
'nk'
],
m_pjk_thn
=
request
.
matchdict
[
'em'
])
m_pjk_thn
=
request
.
matchdict
[
'em'
])
#kd_status = 2)
#kd_status = 2)
x
=
engInformix
.
fetchone
(
sql_result1
)
x
=
engInformix
.
fetchone
(
sql_result1
)
# print '----------------X Hasil Select----------------------',x
# print '----------------X Hasil Select----------------------',x
return
x
return
x
@view_config
(
route_name
=
'pap-edit'
,
renderer
=
'templates/pap/edit.pt'
,
@view_config
(
route_name
=
'pap-edit'
,
renderer
=
'templates/pap/edit.pt'
,
)
#permission='view')
)
#permission='view')
...
@@ -395,17 +396,16 @@ def view_edit(request):
...
@@ -395,17 +396,16 @@ def view_edit(request):
DBSession
.
flush
()
DBSession
.
flush
()
row
=
BJBVA
.
create_va
(
val
,
rpc_params
())
row
=
BJBVA
.
create_va
(
val
,
rpc_params
())
if
row
:
if
row
and
hasattr
(
row
,
'va_number'
)
:
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
form
=
get_form
(
request
,
VASchema
)
val
[
'va'
]
=
row
.
va_number
form
.
set_appstruct
(
val
)
return
render_to_response
(
'templates/pap/edit.pt'
,
dict
(
form
=
form
,
private_key
=
private_key
,
data_key
=
data_key
,
found
=
found
),
request
)
else
:
else
:
request
.
session
.
flash
(
'BJBVA gagal ditambahkan.'
)
request
.
session
.
flash
(
'BJBVA gagal ditambahkan.'
)
form
=
get_form
(
request
,
VASchema
)
val
[
'va'
]
=
row
.
va_number
form
.
set_appstruct
(
val
)
return
HTTPFound
(
location
=
request
.
route_url
(
'pap-edit'
,
nr
=
val
[
'npwpd'
],
nk
=
val
[
'm_pjk_bln'
],
em
=
val
[
'm_pjk_thn'
]))
elif
'createqris'
in
request
.
POST
:
elif
'createqris'
in
request
.
POST
:
...
@@ -430,17 +430,16 @@ def view_edit(request):
...
@@ -430,17 +430,16 @@ def view_edit(request):
DBSession
.
flush
()
DBSession
.
flush
()
row
=
BJBQRIS
.
create_va
(
val
,
rpc_params
())
row
=
BJBQRIS
.
create_va
(
val
,
rpc_params
())
if
row
:
if
row
and
hasattr
(
row
,
'va_number'
)
:
request
.
session
.
flash
(
'BJBQRIS No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
request
.
session
.
flash
(
'BJBQRIS No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
form
=
get_form
(
request
,
QRISSchema
)
val
[
'qris'
]
=
row
.
va_number
form
.
set_appstruct
(
val
)
return
render_to_response
(
'templates/pap/edit.pt'
,
dict
(
form
=
form
,
private_key
=
private_key
,
data_key
=
data_key
,
found
=
found
),
request
)
else
:
else
:
request
.
session
.
flash
(
'BJBQRIS gagal ditambahkan.'
)
request
.
session
.
flash
(
'BJBQRIS gagal ditambahkan.'
)
form
=
get_form
(
request
,
QRISSchema
)
val
[
'qris'
]
=
row
.
va_number
form
.
set_appstruct
(
val
)
return
HTTPFound
(
location
=
request
.
route_url
(
'pap-edit'
,
nr
=
val
[
'npwpd'
],
nk
=
val
[
'm_pjk_bln'
],
em
=
val
[
'm_pjk_thn'
]))
return
route_list
(
request
)
return
route_list
(
request
)
elif
SESS_EDIT_FAILED
in
request
.
session
:
elif
SESS_EDIT_FAILED
in
request
.
session
:
return
session_failed
(
request
,
SESS_EDIT_FAILED
)
return
session_failed
(
request
,
SESS_EDIT_FAILED
)
...
...
esipkd/views/templates/bjbva/list.pt
View file @
898929b
...
@@ -109,6 +109,7 @@
...
@@ -109,6 +109,7 @@
' <button id="btn_add" class="btn btn btn-success" type="button">Create VA</button>'
,
' <button id="btn_add" class="btn btn btn-success" type="button">Create VA</button>'
,
' <button id="btn_edit" class="btn btn btn-warning" type="button">Update VA</button>'
,
' <button id="btn_edit" class="btn btn btn-warning" type="button">Update VA</button>'
,
' <button id="btn_update" class="btn btn btn-primary" type="button">Inquiry VA</button>'
,
' <button id="btn_update" class="btn btn btn-primary" type="button">Inquiry VA</button>'
,
' <button id="btn_va" class="btn btn btn-info" type="button">View VA</button>'
,
' <button id="btn_delete" class="btn btn btn-danger" type="button">Cancel VA</button>'
,
' <button id="btn_delete" class="btn btn btn-danger" type="button">Cancel VA</button>'
,
' '
,
' '
,
'</div>'
,
'</div>'
,
...
@@ -170,6 +171,13 @@
...
@@ -170,6 +171,13 @@
return
false
;
return
false
;
});
});
$
(
"#btn_va"
).
click
(
function
()
{
if
(
mID
)
window
.
open
(
oTableUri
+
"/vacode/act?id="
+
mID
,
"_blank"
,
"width=350,height=350"
);
else
alert
(
"Pilih Baris yang akan di lihat..."
);
});
});
});
</script>
</script>
</div>
</div>
...
...
esipkd/views/templates/bjbva/vacode.pt
0 → 100644
View file @
898929b
<label>${invoice_no}</label>
<label>${va_number}</label>
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