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 715562db
authored
Dec 07, 2022
by
suri
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cetak skrd dengan no va dan qris dan update add with param no bayar
1 parent
82483bff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
3 deletions
esipkd/reports/skrd.odt
esipkd/views/arinvoice_b.py
esipkd/views/bjb_va.py
esipkd/views/templates/bjbva/add-edit.pt
esipkd/reports/skrd.odt
View file @
715562d
No preview for this file type
esipkd/views/arinvoice_b.py
View file @
715562d
...
...
@@ -51,6 +51,9 @@ from daftar import (STATUS, deferred_status,
)
from
..models.bjb_qris
import
BJBQRIS
from
..models.bjb_va
import
BJBVA
SESS_ADD_FAILED
=
'Gagal tambah Tagihan'
SESS_EDIT_FAILED
=
'Gagal edit Tagihan'
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -915,6 +918,30 @@ def view_pdf(request):
imgqrcode
.
save
(
path
,
'PNG'
)
item
.
qrcode
=
open
(
path
,
'rb'
)
.
read
()
# ---------------------------- untuk tambah qris---------------------
no_bayar
=
row
.
kode
qris
=
DBSession
.
query
(
BJBQRIS
)
.
join
(
ARInvoice
,
ARInvoice
.
kode
==
BJBQRIS
.
invoice_no
)
.
\
filter
(
BJBQRIS
.
invoice_no
==
no_bayar
)
.
first
()
from
..tools
import
get_tmp
if
qris
:
img_qr
=
qrcode
.
make
(
str
(
qris
.
qrcode
))
path
=
get_tmp
()
+
str
(
qris
.
va_number
)
img_qr
.
save
(
path
,
'PNG'
)
item
.
qris
=
open
(
path
,
'rb'
)
.
read
()
else
:
item
.
qris
=
''
# -----------------------------------------------------------------------
# ---------------------------- untuk tambah va---------------------
qva
=
DBSession
.
query
(
BJBVA
)
.
join
(
ARInvoice
,
ARInvoice
.
kode
==
BJBVA
.
invoice_no
)
.
\
filter
(
BJBVA
.
invoice_no
==
no_bayar
)
.
first
()
if
qva
:
item
.
qva
=
qva
.
va_number
else
:
item
.
qva
=
''
# -----------------------------------------------------------------------
data
=
{}
data
[
'item'
]
=
item
template
.
render
(
data
)
...
...
esipkd/views/bjb_va.py
View file @
715562d
...
...
@@ -91,6 +91,7 @@ class AddSchema(colander.Schema):
colander
.
Integer
(),
oid
=
"amount"
,
title
=
"Amount"
)
class
EditSchema
(
AddSchema
):
invoice_no
=
colander
.
SchemaNode
(
...
...
@@ -289,10 +290,12 @@ class view(object):
values
[
'amount'
]
=
(
pokok
+
denda
)
print
(
'---------------------------------'
,
values
)
form
.
set_appstruct
(
values
)
return
dict
(
form
=
form
,
invoice_no
=
params
[
'no_invoice'
])
else
:
values
=
{}
form
.
set_appstruct
(
values
)
return
dict
(
form
=
form
)
form
.
set_appstruct
(
values
)
return
dict
(
form
=
form
)
########
...
...
esipkd/views/templates/bjbva/add-edit.pt
View file @
715562d
...
...
@@ -44,7 +44,7 @@
$
(
'.input-date'
).
datetimepicker
({
format
:
"yyyy-mm-dd hh:ii:ss"
});
<
tal
:
block
tal
:
condition
=
"not 'id' in request.matchdict"
>
<
tal
:
block
tal
:
condition
=
"not 'id' in request.matchdict
and not 'no_invoice' in request.params
"
>
$
(
'#invoice_no'
).
select2
({
ajax
:
{
url
:
'/bjbva/kodebayar/act'
,
...
...
@@ -101,6 +101,11 @@
$
(
'#response_code'
).
prop
(
'readonly'
,
true
);
$
(
'#response_message'
).
prop
(
'readonly'
,
true
);
<
/tal:block
>
<
tal
:
block
tal
:
condition
=
"'no_invoice' in request.params and request.params['no_invoice']"
>
$
(
'#invoice_no'
).
select2
(
'data'
,
{
id
:
{
invoice_no
},
value
:
{
invoice_no
}});
<
/tal:block
>
});
</script>
</div>
<!-- /metal:script -->
...
...
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