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 acf4300e
authored
Sep 10, 2020
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
revisi report csv
1 parent
27b9b916
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
793 additions
and
419 deletions
esipkd/views/reports.py
esipkd/views/templates/report/report.pt
esipkd/views/templates/report/report_sspd.pt
esipkd/views/reports.py
View file @
acf4300
...
@@ -260,90 +260,7 @@ class ViewLaporan(BaseViews):
...
@@ -260,90 +260,7 @@ class ViewLaporan(BaseViews):
akhir
=
'akhir'
in
params
and
params
[
'akhir'
]
and
str
(
params
[
'akhir'
])
or
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
akhir
=
'akhir'
in
params
and
params
[
'akhir'
]
and
str
(
params
[
'akhir'
])
or
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
##----------------------- Query laporan -------------------------------------##
##----------------------- Query laporan -------------------------------------##
if
url_dict
[
'act'
]
==
'Laporan_98'
:
if
url_dict
[
'act'
]
==
'Laporan_1'
:
query
=
DBSession
.
query
(
ARTbp
.
kode
,
ARTbp
.
tahun_id
,
ARTbp
.
unit_id
,
ARTbp
.
unit_kode
,
ARTbp
.
unit_nama
,
ARTbp
.
no_id
,
ARTbp
.
subjek_pajak_id
,
ARTbp
.
wp_kode
,
ARTbp
.
wp_nama
,
ARTbp
.
wp_alamat_1
,
ARTbp
.
wp_alamat_2
,
ARTbp
.
rekening_id
,
ARTbp
.
rek_kode
,
ARTbp
.
rek_nama
,
ARTbp
.
objek_pajak_id
,
ARTbp
.
op_kode
,
ARTbp
.
op_nama
,
ARTbp
.
op_alamat_1
,
ARTbp
.
op_alamat_2
,
ARTbp
.
dasar
,
ARTbp
.
tarif
,
ARTbp
.
pokok
,
ARTbp
.
terutang
,
ARTbp
.
denda
,
ARTbp
.
bunga
,
ARTbp
.
jumlah
,
ARTbp
.
periode_1
,
ARTbp
.
periode_2
,
ARTbp
.
tgl_terima
,
ARTbp
.
jatuh_tempo
,
ARTbp
.
wilayah_id
,
ARTbp
.
status_invoice
,
ARTbp
.
invoice_id
,
ARTbp
.
invoice_kode
)
.
order_by
(
ARTbp
.
create_date
)
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
request
.
route_url
(
'report'
))
header
=
[
'kode'
,
'tahun_id'
,
'unit_id'
,
'unit_kode'
,
'unit_nama'
,
'no_id'
,
'subjek_pajak_id'
,
'wp_kode'
,
'wp_nama'
,
'wp_alamat_1'
,
'wp_alamat_2'
,
'rekening_id'
,
'rek_kode'
,
'rek_nama'
,
'objek_pajak_id'
,
'op_kode'
,
'op_nama'
,
'op_alamat_1'
,
'op_alamat_2'
,
'dasar'
,
'tarif'
,
'pokok'
,
'terutang'
,
'denda'
,
'bunga'
,
'jumlah'
,
'periode_1'
,
'periode_2'
,
'tgl_terima'
,
'jatuh_tempo'
,
'wilayah_id'
,
'status_invoice'
,
'invoice_id'
,
'invoice_kode'
]
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'E-Payment.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
elif
url_dict
[
'act'
]
==
'Laporan_99'
:
query
=
DBSession
.
query
(
ARSspd
.
tahun_id
,
ARSspd
.
unit_id
,
ARSspd
.
arinvoice_id
,
ARSspd
.
pembayaran_ke
,
ARSspd
.
bunga
,
ARSspd
.
bayar
,
ARSspd
.
tgl_bayar
,
ARSspd
.
create_date
,
ARSspd
.
ntb
,
ARSspd
.
ntp
,
ARSspd
.
bank_id
,
ARSspd
.
channel_id
,
ARSspd
.
denda_rekening_id
,
ARSspd
.
unit_kode
,
ARSspd
.
unit_nama
,
ARSspd
.
rekening_id
,
ARSspd
.
rek_kode
,
ARSspd
.
rek_nama
)
.
order_by
(
ARSspd
.
tgl_bayar
)
row
=
query
.
first
()
header
=
[
'tahun_id'
,
'unit_id'
,
'arinvoice_id'
,
'pembayaran_ke'
,
'bunga'
,
'bayar'
,
'tgl_bayar'
,
'create_date'
,
'ntb'
,
'ntp'
,
'bank_id'
,
'channel_id'
,
'denda_rekening_id'
,
'unit_kode'
,
'unit_nama'
,
'rekening_id'
,
'rek_kode'
,
'rek_nama'
]
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Penerimaan.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
elif
url_dict
[
'act'
]
==
'Laporan_1'
:
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
ARInvoice
.
unit_kode
.
label
(
'un_kd'
),
ARInvoice
.
unit_kode
.
label
(
'un_kd'
),
ARInvoice
.
unit_nama
.
label
(
'un_nm'
),
ARInvoice
.
unit_nama
.
label
(
'un_nm'
),
...
@@ -404,7 +321,21 @@ class ViewLaporan(BaseViews):
...
@@ -404,7 +321,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_1.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap1Generator
()
generator
=
lap1Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -460,7 +391,21 @@ class ViewLaporan(BaseViews):
...
@@ -460,7 +391,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_2.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap2Generator
()
generator
=
lap2Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -530,7 +475,21 @@ class ViewLaporan(BaseViews):
...
@@ -530,7 +475,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_3.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap3Generator
()
generator
=
lap3Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -586,7 +545,21 @@ class ViewLaporan(BaseViews):
...
@@ -586,7 +545,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_4.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap4Generator
()
generator
=
lap4Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -654,7 +627,21 @@ class ViewLaporan(BaseViews):
...
@@ -654,7 +627,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_5.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap5Generator
()
generator
=
lap5Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -723,7 +710,21 @@ class ViewLaporan(BaseViews):
...
@@ -723,7 +710,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_6.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap6Generator
()
generator
=
lap6Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -755,14 +756,6 @@ class ViewLaporan(BaseViews):
...
@@ -755,14 +756,6 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARTbp
.
unit_id
==
z
)
query
=
query
.
filter
(
ARTbp
.
unit_id
==
z
)
generator
=
lap8benGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
query
=
DBSession
.
query
(
ARTbp
.
unit_id
.
label
(
'un_id'
),
query
=
DBSession
.
query
(
ARTbp
.
unit_id
.
label
(
'un_id'
),
ARTbp
.
unit_kode
.
label
(
'un_kd'
),
ARTbp
.
unit_kode
.
label
(
'un_kd'
),
...
@@ -782,13 +775,28 @@ class ViewLaporan(BaseViews):
...
@@ -782,13 +775,28 @@ class ViewLaporan(BaseViews):
desc
(
ARTbp
.
tgl_terima
),
desc
(
ARTbp
.
tgl_terima
),
desc
(
ARTbp
.
kode
)
desc
(
ARTbp
.
kode
)
)
)
generator
=
lap8Generator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_8.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap8Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_9'
:
elif
url_dict
[
'act'
]
==
'Laporan_9'
:
if
group_in
(
req
,
'bendahara'
):
if
group_in
(
req
,
'bendahara'
):
...
@@ -813,14 +821,6 @@ class ViewLaporan(BaseViews):
...
@@ -813,14 +821,6 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
generator
=
lap9benGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
ARInvoice
.
unit_kode
.
label
(
'un_kd'
),
ARInvoice
.
unit_kode
.
label
(
'un_kd'
),
...
@@ -840,13 +840,28 @@ class ViewLaporan(BaseViews):
...
@@ -840,13 +840,28 @@ class ViewLaporan(BaseViews):
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
kode
)
desc
(
ARInvoice
.
kode
)
)
)
generator
=
lap9Generator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_9.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap9Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_7'
:
elif
url_dict
[
'act'
]
==
'Laporan_7'
:
query
=
DBSession
.
query
(
ARSspd
.
bayar
.
label
(
'bayar'
),
query
=
DBSession
.
query
(
ARSspd
.
bayar
.
label
(
'bayar'
),
...
@@ -889,14 +904,6 @@ class ViewLaporan(BaseViews):
...
@@ -889,14 +904,6 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
generator
=
lap7benGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
if
h2h
==
'1'
:
if
h2h
==
'1'
:
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
...
@@ -924,13 +931,28 @@ class ViewLaporan(BaseViews):
...
@@ -924,13 +931,28 @@ class ViewLaporan(BaseViews):
ARInvoice
.
kode
,
ARInvoice
.
kode
,
ARInvoice
.
rek_kode
ARInvoice
.
rek_kode
)
)
generator
=
lap7Generator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_7.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap7Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_10'
:
elif
url_dict
[
'act'
]
==
'Laporan_10'
:
query
=
DBSession
.
query
(
ARTbp
.
unit_id
.
label
(
'un_id'
),
query
=
DBSession
.
query
(
ARTbp
.
unit_id
.
label
(
'un_id'
),
...
@@ -960,24 +982,30 @@ class ViewLaporan(BaseViews):
...
@@ -960,24 +982,30 @@ class ViewLaporan(BaseViews):
if
group_in
(
req
,
'bendahara'
):
if
group_in
(
req
,
'bendahara'
):
query
=
query
.
filter
(
ARTbp
.
tgl_terima
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARTbp
.
tgl_terima
.
between
(
awal
,
akhir
),
ARTbp
.
unit_kode
.
ilike
(
'
%%%
s
%%
'
%
unit_kd
))
ARTbp
.
unit_kode
.
ilike
(
'
%%%
s
%%
'
%
unit_kd
))
generator
=
lap10Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
query
=
query
.
filter
(
ARTbp
.
tgl_terima
.
between
(
awal
,
akhir
))
query
=
query
.
filter
(
ARTbp
.
tgl_terima
.
between
(
awal
,
akhir
))
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
generator
=
lap10budGenerator
()
row
=
query
.
first
()
pdf
=
generator
.
generate
(
query
)
if
not
row
:
response
=
req
.
response
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_type
=
"application/pdf"
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
content_disposition
=
'filename=output.pdf'
header
=
row
.
keys
()
response
.
write
(
pdf
)
rows
=
[]
return
response
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_10.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap10budGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_11'
:
elif
url_dict
[
'act'
]
==
'Laporan_11'
:
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
query
=
DBSession
.
query
(
ARInvoice
.
unit_id
.
label
(
'un_id'
),
...
@@ -1029,14 +1057,6 @@ class ViewLaporan(BaseViews):
...
@@ -1029,14 +1057,6 @@ class ViewLaporan(BaseViews):
ARInvoice
.
rek_kode
,
ARInvoice
.
rek_kode
,
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
kode
))
desc
(
ARInvoice
.
kode
))
generator
=
lap11Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
## kondisi status Bayar ##
## kondisi status Bayar ##
cek_bayar
=
bayar
;
cek_bayar
=
bayar
;
...
@@ -1071,13 +1091,28 @@ class ViewLaporan(BaseViews):
...
@@ -1071,13 +1091,28 @@ class ViewLaporan(BaseViews):
ARInvoice
.
rek_kode
,
ARInvoice
.
rek_kode
,
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
tgl_tetap
),
desc
(
ARInvoice
.
kode
))
desc
(
ARInvoice
.
kode
))
generator
=
lap11budGenerator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_11.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap11budGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_12'
:
elif
url_dict
[
'act'
]
==
'Laporan_12'
:
if
group_in
(
req
,
'bendahara'
):
if
group_in
(
req
,
'bendahara'
):
...
@@ -1120,15 +1155,6 @@ class ViewLaporan(BaseViews):
...
@@ -1120,15 +1155,6 @@ class ViewLaporan(BaseViews):
elif
(
cek_bayar
==
'3'
):
elif
(
cek_bayar
==
'3'
):
query
=
query
.
filter
(
ARInvoice
.
tgl_tetap
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARInvoice
.
tgl_tetap
.
between
(
awal
,
akhir
),
ARInvoice
.
unit_kode
.
ilike
(
'
%
s
%%
'
%
unit_kd
))
ARInvoice
.
unit_kode
.
ilike
(
'
%
s
%%
'
%
unit_kd
))
generator
=
lap12Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
## kondisi status Bayar ##
## kondisi status Bayar ##
cek_bayar
=
bayar
;
cek_bayar
=
bayar
;
...
@@ -1168,14 +1194,28 @@ class ViewLaporan(BaseViews):
...
@@ -1168,14 +1194,28 @@ class ViewLaporan(BaseViews):
ARInvoice
.
status_bayar
==
bayar
)
ARInvoice
.
status_bayar
==
bayar
)
elif
(
cek_bayar
==
'3'
):
elif
(
cek_bayar
==
'3'
):
query
=
query
.
filter
(
ARInvoice
.
tgl_tetap
.
between
(
awal
,
akhir
))
query
=
query
.
filter
(
ARInvoice
.
tgl_tetap
.
between
(
awal
,
akhir
))
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
generator
=
lap12budGenerator
()
row
=
query
.
first
()
pdf
=
generator
.
generate
(
query
)
if
not
row
:
response
=
req
.
response
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_type
=
"application/pdf"
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
content_disposition
=
'filename=output.pdf'
header
=
row
.
keys
()
response
.
write
(
pdf
)
rows
=
[]
return
response
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_12.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap12budGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_13'
:
elif
url_dict
[
'act'
]
==
'Laporan_13'
:
subq
=
DBSession
.
query
(
Rekening
.
kode
.
label
(
'rek_kd'
),
subq
=
DBSession
.
query
(
Rekening
.
kode
.
label
(
'rek_kd'
),
...
@@ -1226,7 +1266,21 @@ class ViewLaporan(BaseViews):
...
@@ -1226,7 +1266,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_13.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap13Generator
()
generator
=
lap13Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -1246,6 +1300,7 @@ class ViewLaporan(BaseViews):
...
@@ -1246,6 +1300,7 @@ class ViewLaporan(BaseViews):
ARInvoice
.
jumlah
.
label
(
'jumlah'
),
ARInvoice
.
jumlah
.
label
(
'jumlah'
),
Wilayah
.
kode
.
label
(
'wil_kd'
),
Wilayah
.
kode
.
label
(
'wil_kd'
),
Wilayah
.
nama
.
label
(
'wil_nm'
)
Wilayah
.
nama
.
label
(
'wil_nm'
)
)
.
select_from
(
ARSspd
)
.
join
(
ARInvoice
)
.
join
(
ARInvoice
)
.
outerjoin
(
Wilayah
)
.
outerjoin
(
Wilayah
)
.
order_by
(
Wilayah
.
kode
,
)
.
order_by
(
Wilayah
.
kode
,
...
@@ -1277,7 +1332,21 @@ class ViewLaporan(BaseViews):
...
@@ -1277,7 +1332,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_14.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap14Generator
()
generator
=
lap14Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -1304,6 +1373,7 @@ class ViewLaporan(BaseViews):
...
@@ -1304,6 +1373,7 @@ class ViewLaporan(BaseViews):
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
)
==
11
,
"4"
),
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
)
==
11
,
"4"
),
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
)
==
12
,
"4"
)],
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
)
==
12
,
"4"
)],
else_
=
"4"
)
.
label
(
"triwulan"
),
else_
=
"4"
)
.
label
(
"triwulan"
),
)
.
select_from
(
ARSspd
)
.
join
(
ARInvoice
,
Rekening
)
.
join
(
ARInvoice
,
Rekening
)
.
order_by
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
),
)
.
order_by
(
func
.
extract
(
'month'
,
ARSspd
.
tgl_bayar
),
Rekening
.
kode
Rekening
.
kode
...
@@ -1336,7 +1406,21 @@ class ViewLaporan(BaseViews):
...
@@ -1336,7 +1406,21 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
row
=
query
.
first
()
if
not
row
:
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
header
=
row
.
keys
()
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_15.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap15Generator
()
generator
=
lap15Generator
()
pdf
=
generator
.
generate
(
query
)
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
=
req
.
response
...
@@ -1384,14 +1468,6 @@ class ViewLaporan(BaseViews):
...
@@ -1384,14 +1468,6 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
generator
=
lap16benGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
if
h2h
==
'1'
:
if
h2h
==
'1'
:
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
...
@@ -1404,13 +1480,28 @@ class ViewLaporan(BaseViews):
...
@@ -1404,13 +1480,28 @@ class ViewLaporan(BaseViews):
else
:
else
:
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
ARSspd
.
bayar
!=
0
)
ARSspd
.
bayar
!=
0
)
generator
=
lap16Generator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_16.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap16Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_17'
:
elif
url_dict
[
'act'
]
==
'Laporan_17'
:
query
=
DBSession
.
query
(
ARSspd
.
bayar
.
label
(
'jumlah'
),
query
=
DBSession
.
query
(
ARSspd
.
bayar
.
label
(
'jumlah'
),
...
@@ -1451,14 +1542,6 @@ class ViewLaporan(BaseViews):
...
@@ -1451,14 +1542,6 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
generator
=
lap17benGenerator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
else
:
else
:
if
h2h
==
'1'
:
if
h2h
==
'1'
:
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
...
@@ -1471,13 +1554,28 @@ class ViewLaporan(BaseViews):
...
@@ -1471,13 +1554,28 @@ class ViewLaporan(BaseViews):
else
:
else
:
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
query
=
query
.
filter
(
ARSspd
.
tgl_bayar
.
between
(
awal
,
akhir
),
ARSspd
.
bayar
!=
0
)
ARSspd
.
bayar
!=
0
)
generator
=
lap17Generator
()
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
pdf
=
generator
.
generate
(
query
)
row
=
query
.
first
()
response
=
req
.
response
if
not
row
:
response
.
content_type
=
"application/pdf"
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
response
.
content_disposition
=
'filename=output.pdf'
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
response
.
write
(
pdf
)
header
=
row
.
keys
()
return
response
rows
=
[]
for
item
in
query
.
all
():
rows
.
append
(
list
(
item
))
filename
=
'Laporan_17.csv'
value
=
{
'header'
:
header
,
'rows'
:
rows
,
}
return
csv_response
(
req
,
value
,
filename
)
generator
=
lap17Generator
()
pdf
=
generator
.
generate
(
query
)
response
=
req
.
response
response
.
content_type
=
"application/pdf"
response
.
content_disposition
=
'filename=output.pdf'
response
.
write
(
pdf
)
return
response
elif
url_dict
[
'act'
]
==
'Laporan_18'
:
elif
url_dict
[
'act'
]
==
'Laporan_18'
:
...
@@ -1560,47 +1658,40 @@ class ViewLaporan(BaseViews):
...
@@ -1560,47 +1658,40 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
rml_row
=
open_rml_row
(
'lap_dwmy.row.rml'
)
row
=
query
.
first
()
rows
=
[]
if
not
row
:
for
r
in
query
.
all
():
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
s
=
rml_row
.
format
(
cnt_daily
=
r
.
cnt_daily
,
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
header
=
row
.
keys
()
cnt_weekly
=
r
.
cnt_weekly
,
rows
=
[]
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
for
item
in
query
.
all
():
cnt_monthly
=
r
.
cnt_monthly
,
rows
.
append
(
list
(
item
))
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
filename
=
'Laporan_18.csv'
cnt_yearly
=
r
.
cnt_yearly
,
value
=
{
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
'header'
:
header
,
rows
.
append
(
s
)
'rows'
:
rows
,
}
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy.rml'
,
rows2
=
rows
,
return
csv_response
(
req
,
value
,
filename
)
tahun
=
tahun
,
un_nm
=
unit_nm
,
rml_row
=
open_rml_row
(
'lap_dwmy.row.rml'
)
un_al
=
unit_al
)
rows
=
[]
return
pdf_response
(
request
,
pdf
,
filename
)
for
r
in
query
.
all
():
s
=
rml_row
.
format
(
cnt_daily
=
r
.
cnt_daily
,
else
:
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
cnt_weekly
=
r
.
cnt_weekly
,
rml_row
=
open_rml_row
(
'lap_dwmy.row.rml'
)
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
rows
=
[]
cnt_monthly
=
r
.
cnt_monthly
,
for
r
in
query
.
all
():
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
s
=
rml_row
.
format
(
cnt_daily
=
r
.
cnt_daily
,
cnt_yearly
=
r
.
cnt_yearly
,
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
cnt_weekly
=
r
.
cnt_weekly
,
rows
.
append
(
s
)
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
cnt_monthly
=
r
.
cnt_monthly
,
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy.rml'
,
rows2
=
rows
,
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
tahun
=
tahun
,
cnt_yearly
=
r
.
cnt_yearly
,
un_nm
=
unit_nm
,
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
un_al
=
unit_al
)
rows
.
append
(
s
)
return
pdf_response
(
request
,
pdf
,
filename
)
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy.rml'
,
rows2
=
rows
,
tahun
=
tahun
,
un_nm
=
nm
,
un_al
=
al
)
return
pdf_response
(
request
,
pdf
,
filename
)
##----------------------------- End Laporan -----------------##
##----------------------------- End Laporan -----------------##
...
@@ -1692,51 +1783,42 @@ class ViewLaporan(BaseViews):
...
@@ -1692,51 +1783,42 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
rml_row
=
open_rml_row
(
'lap_dwmy_opd.row.rml'
)
row
=
query
.
first
()
rows
=
[]
if
not
row
:
for
r
in
query
.
all
():
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
unit_nama
=
r
.
unit_nama
,
header
=
row
.
keys
()
cnt_daily
=
r
.
cnt_daily
,
rows
=
[]
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
for
item
in
query
.
all
():
cnt_weekly
=
r
.
cnt_weekly
,
rows
.
append
(
list
(
item
))
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
filename
=
'Laporan_19.csv'
cnt_monthly
=
r
.
cnt_monthly
,
value
=
{
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
'header'
:
header
,
cnt_yearly
=
r
.
cnt_yearly
,
'rows'
:
rows
,
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
}
rows
.
append
(
s
)
return
csv_response
(
req
,
value
,
filename
)
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy_opd.rml'
,
rows2
=
rows
,
rml_row
=
open_rml_row
(
'lap_dwmy_opd.row.rml'
)
tahun
=
tahun
,
rows
=
[]
un_nm
=
unit_nm
,
for
r
in
query
.
all
():
un_al
=
unit_al
)
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
return
pdf_response
(
request
,
pdf
,
filename
)
unit_nama
=
r
.
unit_nama
,
cnt_daily
=
r
.
cnt_daily
,
else
:
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
cnt_weekly
=
r
.
cnt_weekly
,
rml_row
=
open_rml_row
(
'lap_dwmy_opd.row.rml'
)
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
rows
=
[]
cnt_monthly
=
r
.
cnt_monthly
,
for
r
in
query
.
all
():
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
cnt_yearly
=
r
.
cnt_yearly
,
unit_nama
=
r
.
unit_nama
,
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
cnt_daily
=
r
.
cnt_daily
,
rows
.
append
(
s
)
amt_daily
=
thousand
(
r
.
amt_daily
,
0
),
cnt_weekly
=
r
.
cnt_weekly
,
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy_opd.rml'
,
rows2
=
rows
,
amt_weekly
=
thousand
(
r
.
amt_weekly
,
0
),
tahun
=
tahun
,
cnt_monthly
=
r
.
cnt_monthly
,
un_nm
=
unit_nm
,
amt_monthly
=
thousand
(
r
.
amt_monthly
,
0
),
un_al
=
unit_al
)
cnt_yearly
=
r
.
cnt_yearly
,
return
pdf_response
(
request
,
pdf
,
filename
)
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
rows
.
append
(
s
)
pdf
,
filename
=
open_rml_pdf
(
'lap_dwmy_opd.rml'
,
rows2
=
rows
,
tahun
=
tahun
,
un_nm
=
nm
,
un_al
=
al
)
return
pdf_response
(
request
,
pdf
,
filename
)
##----------------------------- End Laporan -----------------##
##----------------------------- End Laporan -----------------##
...
@@ -1770,41 +1852,37 @@ class ViewLaporan(BaseViews):
...
@@ -1770,41 +1852,37 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
rml_row
=
open_rml_row
(
'lap_peringkat_opd.row.rml'
)
row
=
query
.
first
()
rows
=
[]
if
not
row
:
peringkat
=
0
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
for
r
in
query
.
all
():
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
peringkat
=
peringkat
+
1
header
=
row
.
keys
()
s
=
rml_row
.
format
(
peringkat
=
peringkat
,
rows
=
[]
unit_nama
=
r
.
unit_nama
,
for
item
in
query
.
all
():
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
rows
.
append
(
list
(
item
))
rows
.
append
(
s
)
filename
=
'Laporan_20.csv'
value
=
{
pdf
,
filename
=
open_rml_pdf
(
'lap_peringkat_opd.rml'
,
rows2
=
rows
,
'header'
:
header
,
tahun
=
tahun
,
'rows'
:
rows
,
un_nm
=
unit_nm
,
}
un_al
=
unit_al
)
return
csv_response
(
req
,
value
,
filename
)
return
pdf_response
(
request
,
pdf
,
filename
)
rml_row
=
open_rml_row
(
'lap_peringkat_opd.row.rml'
)
else
:
rows
=
[]
peringkat
=
0
rml_row
=
open_rml_row
(
'lap_peringkat_opd.row.rml'
)
for
r
in
query
.
all
():
rows
=
[]
peringkat
=
peringkat
+
1
peringkat
=
0
s
=
rml_row
.
format
(
peringkat
=
peringkat
,
for
r
in
query
.
all
():
unit_nama
=
r
.
unit_nama
,
peringkat
=
peringkat
+
1
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
s
=
rml_row
.
format
(
peringkat
=
peringkat
,
rows
.
append
(
s
)
unit_nama
=
r
.
unit_nama
,
amt_yearly
=
thousand
(
r
.
amt_yearly
,
0
))
pdf
,
filename
=
open_rml_pdf
(
'lap_peringkat_opd.rml'
,
rows2
=
rows
,
rows
.
append
(
s
)
tahun
=
tahun
,
un_nm
=
unit_nm
,
un_al
=
unit_al
)
pdf
,
filename
=
open_rml_pdf
(
'lap_peringkat_opd.rml'
,
rows2
=
rows
,
return
pdf_response
(
request
,
pdf
,
filename
)
tahun
=
tahun
,
un_nm
=
nm
,
un_al
=
al
)
return
pdf_response
(
request
,
pdf
,
filename
)
##----------------------------- End Laporan -----------------##
##----------------------------- End Laporan -----------------##
...
@@ -1831,41 +1909,37 @@ class ViewLaporan(BaseViews):
...
@@ -1831,41 +1909,37 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
rml_row
=
open_rml_row
(
'lap_opd_aktif.row.rml'
)
row
=
query
.
first
()
rows
=
[]
if
not
row
:
peringkat
=
0
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
for
r
in
query
.
all
():
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
header
=
row
.
keys
()
unit_nama
=
r
.
unit_nama
,
rows
=
[]
tgl_awal
=
dmy
(
r
.
tgl_awal
),
for
item
in
query
.
all
():
tgl_akhir
=
dmy
(
r
.
tgl_akhir
))
rows
.
append
(
list
(
item
))
rows
.
append
(
s
)
filename
=
'Laporan_21.csv'
value
=
{
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_aktif.rml'
,
rows2
=
rows
,
'header'
:
header
,
tahun
=
tahun
,
'rows'
:
rows
,
un_nm
=
unit_nm
,
}
un_al
=
unit_al
)
return
csv_response
(
req
,
value
,
filename
)
return
pdf_response
(
request
,
pdf
,
filename
)
rml_row
=
open_rml_row
(
'lap_opd_aktif.row.rml'
)
else
:
rows
=
[]
peringkat
=
0
rml_row
=
open_rml_row
(
'lap_opd_aktif.row.rml'
)
for
r
in
query
.
all
():
rows
=
[]
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
peringkat
=
0
unit_nama
=
r
.
unit_nama
,
for
r
in
query
.
all
():
tgl_awal
=
dmy
(
r
.
tgl_awal
),
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
tgl_akhir
=
dmy
(
r
.
tgl_akhir
))
unit_nama
=
r
.
unit_nama
,
rows
.
append
(
s
)
tgl_awal
=
dmy
(
r
.
tgl_awal
),
tgl_akhir
=
dmy
(
r
.
tgl_akhir
))
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_aktif.rml'
,
rows2
=
rows
,
rows
.
append
(
s
)
tahun
=
tahun
,
un_nm
=
unit_nm
,
un_al
=
unit_al
)
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_aktif.rml'
,
rows2
=
rows
,
return
pdf_response
(
request
,
pdf
,
filename
)
tahun
=
tahun
,
un_nm
=
nm
,
un_al
=
al
)
return
pdf_response
(
request
,
pdf
,
filename
)
##----------------------------- End Laporan -----------------##
##----------------------------- End Laporan -----------------##
elif
url_dict
[
'act'
]
==
'Laporan_22'
:
elif
url_dict
[
'act'
]
==
'Laporan_22'
:
...
@@ -1885,43 +1959,38 @@ class ViewLaporan(BaseViews):
...
@@ -1885,43 +1959,38 @@ class ViewLaporan(BaseViews):
y
=
'
%
s'
%
x
y
=
'
%
s'
%
x
z
=
int
(
y
)
z
=
int
(
y
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
query
=
query
.
filter
(
ARInvoice
.
unit_id
==
z
)
if
'cetak'
in
params
and
params
[
'cetak'
]
and
params
[
'cetak'
]
==
'csv'
:
rml_row
=
open_rml_row
(
'lap_opd_tdk_aktif.row.rml'
)
row
=
query
.
first
()
rows
=
[]
if
not
row
:
for
r
in
query
.
all
():
req
.
session
.
flash
(
'Data tidak ditemukan.'
)
u_nama
=
r
.
unit_nama
raise
HTTPFound
(
location
=
req
.
route_url
(
'report'
))
if
'&'
in
u_nama
:
header
=
row
.
keys
()
koreksi
=
u_nama
.
replace
(
'&'
,
'dan'
)
rows
=
[]
u_nama
=
koreksi
for
item
in
query
.
all
():
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
rows
.
append
(
list
(
item
))
unit_nama
=
r
.
unit_nama
)
filename
=
'Laporan_22.csv'
rows
.
append
(
s
)
value
=
{
'header'
:
header
,
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_tdk_aktif.rml'
,
rows2
=
rows
,
'rows'
:
rows
,
tahun
=
tahun
,
}
un_nm
=
unit_nm
,
return
csv_response
(
req
,
value
,
filename
)
un_al
=
unit_al
)
return
pdf_response
(
request
,
pdf
,
filename
)
rml_row
=
open_rml_row
(
'lap_opd_tdk_aktif.row.rml'
)
rows
=
[]
else
:
for
r
in
query
.
all
():
u_nama
=
r
.
unit_nama
rml_row
=
open_rml_row
(
'lap_opd_tdk_aktif.row.rml'
)
if
'&'
in
u_nama
:
rows
=
[]
koreksi
=
u_nama
.
replace
(
'&'
,
'dan'
)
for
r
in
query
.
all
():
u_nama
=
koreksi
u_nama
=
r
.
unit_nama
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
if
'&'
in
u_nama
:
unit_nama
=
r
.
unit_nama
)
koreksi
=
u_nama
.
replace
(
'&'
,
'dan'
)
rows
.
append
(
s
)
u_nama
=
koreksi
s
=
rml_row
.
format
(
unit_kode
=
r
.
unit_kode
,
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_tdk_aktif.rml'
,
rows2
=
rows
,
unit_nama
=
u_nama
)
tahun
=
tahun
,
rows
.
append
(
s
)
un_nm
=
unit_nm
,
un_al
=
unit_al
)
return
pdf_response
(
request
,
pdf
,
filename
)
pdf
,
filename
=
open_rml_pdf
(
'lap_opd_tdk_aktif.rml'
,
rows2
=
rows
,
tahun
=
tahun
,
un_nm
=
nm
,
un_al
=
al
)
return
pdf_response
(
request
,
pdf
,
filename
)
##----------------------------- End Laporan -----------------##
##----------------------------- End Laporan -----------------##
###################### USER
###################### USER
...
...
esipkd/views/templates/report/report.pt
View file @
acf4300
...
@@ -274,8 +274,199 @@
...
@@ -274,8 +274,199 @@
return
;
return
;
}
}
window
.
open
(
'/reports/act/Laporan_12?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
);
window
.
open
(
'/reports/act/Laporan_12?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
);
}
else
if
(
jenis
==
'98'
){
}
window
.
open
(
'/reports/act/Laporan_98'
);
});
$
(
'#btn_csv'
).
click
(
function
()
{
var
unit
=
$
(
'#unit_id'
).
val
();
var
rek
=
$
(
'#rekening_id'
).
val
();
var
jenis
=
$
(
'input[name="jenis"]:checked'
).
val
();
var
bayar
=
$
(
'input[name="bayar"]:checked'
).
val
();
var
awal
=
$
(
'#tanggal'
).
val
();
var
akhir
=
$
(
'#tanggal2'
).
val
();
if
(
jenis
==
undefined
)
{
alert
(
'Silahkan pilih jenis laporan yang akan ditampilkan!'
);
return
;
}
else
if
(
jenis
==
'1'
){
if
(
rek
!=
''
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_1?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&rek='
+
rek
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
{
alert
(
'Silahkan isikan Kode Rekening terlebih dahulu!'
);
return
;
}
}
else
if
(
jenis
==
'2'
){
if
(
rek
!=
''
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_2?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&rek='
+
rek
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
{
alert
(
'Silahkan isikan Kode Rekening terlebih dahulu!'
);
return
;
}
}
else
if
(
jenis
==
'3'
){
if
(
unit
!=
''
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_3?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&unit='
+
unit
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
{
alert
(
'Silahkan isikan OPD terlebih dahulu!'
);
return
;
}
}
else
if
(
jenis
==
'4'
){
if
(
unit
!=
''
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_4?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&unit='
+
unit
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
{
alert
(
'Silahkan isikan OPD terlebih dahulu!'
);
return
;
}
}
else
if
(
jenis
==
'5'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_5?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'6'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_6?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'7'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_7?jenis='
+
jenis
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'8'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_8?jenis='
+
jenis
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'9'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_9?jenis='
+
jenis
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'10'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_10?jenis='
+
jenis
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'11'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_11?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'12'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
bayar
==
undefined
)
{
alert
(
'Silahkan pilih Status Pembayaran yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_12?jenis='
+
jenis
+
'&bayar='
+
bayar
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
}
});
});
...
@@ -332,9 +523,6 @@
...
@@ -332,9 +523,6 @@
<div
class=
"radio"
>
<div
class=
"radio"
>
<label><input
type=
"radio"
name=
"jenis"
value=
"12"
>
Laporan Kode Rekening per OPD
</label>
<label><input
type=
"radio"
name=
"jenis"
value=
"12"
>
Laporan Kode Rekening per OPD
</label>
</div>
</div>
<div
class=
"radio"
>
<label><input
type=
"radio"
name=
"jenis"
value=
"98"
>
CSV
</label>
</div>
</div>
</div>
</div>
</div>
<!-- Rekening -->
<!-- Rekening -->
...
@@ -463,6 +651,8 @@
...
@@ -463,6 +651,8 @@
<div
class=
"col-md-9"
>
<div
class=
"col-md-9"
>
<button
id=
"btn_cetak"
name=
"btn_cetak"
type=
"button"
class=
"btn btn-primary "
<button
id=
"btn_cetak"
name=
"btn_cetak"
type=
"button"
class=
"btn btn-primary "
value=
"btn_cetak"
>
Cetak
</button>
value=
"btn_cetak"
>
Cetak
</button>
<button
id=
"btn_csv"
name=
"btn_csv"
type=
"button"
class=
"btn btn-primary "
value=
"btn_csv"
>
CSV
</button>
<button
id=
"btn_close"
name=
"btn_close"
type=
"button"
class=
"btn btn-warning"
<button
id=
"btn_close"
name=
"btn_close"
type=
"button"
class=
"btn btn-warning"
value=
"btn_close"
>
Tutup
</button>
value=
"btn_close"
>
Tutup
</button>
</div>
</div>
...
...
esipkd/views/templates/report/report_sspd.pt
View file @
acf4300
...
@@ -185,10 +185,126 @@
...
@@ -185,10 +185,126 @@
}
else
if
(
jenis
==
'22'
){
}
else
if
(
jenis
==
'22'
){
window
.
open
(
'/reports/act/Laporan_22'
);
window
.
open
(
'/reports/act/Laporan_22'
);
}
else
if
(
jenis
==
'99'
){
window
.
open
(
'/reports/act/Laporan_99'
);
}
}
});
$
(
'#btn_csv'
).
click
(
function
()
{
var
unit
=
$
(
'#unit_id'
).
val
();
var
rek
=
$
(
'#rekening_id'
).
val
();
var
jenis
=
$
(
'input[name="jenis"]:checked'
).
val
();
var
bayar
=
$
(
'input[name="bayar"]:checked'
).
val
();
var
h2h
=
$
(
'input[name="h2h"]:checked'
).
val
();
var
bulan
=
document
.
getElementById
(
"bulan"
).
value
;
var
thn
=
document
.
getElementById
(
"thn"
).
value
;
var
awal
=
$
(
'#tanggal'
).
val
();
var
akhir
=
$
(
'#tanggal2'
).
val
();
//alert(bulan);
if
(
jenis
==
undefined
)
{
alert
(
'Silahkan pilih jenis laporan yang akan ditampilkan!'
);
return
;
}
else
if
(
jenis
==
'7'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_7?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'13'
){
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
if
(
bulan
==
undefined
)
{
alert
(
'Silahkan pilih Masa Bulan yang akan ditampilkan!'
);
return
;
}
if
(
thn
==
undefined
)
{
alert
(
'Silahkan pilih Masa Tahun yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_13?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&bulan='
+
bulan
+
'&thn='
+
thn
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'14'
){
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
if
(
bulan
==
undefined
)
{
alert
(
'Silahkan pilih Masa Bulan yang akan ditampilkan!'
);
return
;
}
if
(
thn
==
undefined
)
{
alert
(
'Silahkan pilih Masa Tahun yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_14?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&bulan='
+
bulan
+
'&thn='
+
thn
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'15'
){
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
if
(
thn
==
undefined
)
{
alert
(
'Silahkan pilih Masa Tahun yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_15?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&thn='
+
thn
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'16'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_16?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'17'
){
if
(
$
(
'#tanggal'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal awal terlebih dahulu!'
);
return
;
}
if
(
$
(
'#tanggal2'
).
val
()
==
''
)
{
alert
(
'Silahkan isikan tanggal akhir terlebih dahulu!'
);
return
;
}
if
(
h2h
==
undefined
)
{
alert
(
'Silahkan pilih Status Penerimaan yang akan ditampilkan!'
);
return
;
}
window
.
open
(
'/reports/act/Laporan_17?jenis='
+
jenis
+
'&h2h='
+
h2h
+
'&awal='
+
awal
+
'&akhir='
+
akhir
+
'&cetak=csv'
);
}
else
if
(
jenis
==
'18'
){
window
.
open
(
'/reports/act/Laporan_18'
+
'?cetak=csv'
);
}
else
if
(
jenis
==
'19'
){
window
.
open
(
'/reports/act/Laporan_19'
+
'?cetak=csv'
);
}
else
if
(
jenis
==
'20'
){
window
.
open
(
'/reports/act/Laporan_20'
+
'?cetak=csv'
);
}
else
if
(
jenis
==
'21'
){
window
.
open
(
'/reports/act/Laporan_21'
+
'?cetak=csv'
);
}
else
if
(
jenis
==
'22'
){
window
.
open
(
'/reports/act/Laporan_22'
+
'?cetak=csv'
);
}
});
});
$
(
'input[name="jenis"]'
).
prop
(
'checked'
,
false
);
$
(
'input[name="jenis"]'
).
prop
(
'checked'
,
false
);
...
@@ -243,9 +359,6 @@
...
@@ -243,9 +359,6 @@
<div
class=
"radio"
>
<div
class=
"radio"
>
<label><input
type=
"radio"
name=
"jenis"
value=
"22"
>
Penerimaan OPD
<span
class=
"badge"
>
(Tidak Aktif)
</span></label>
<label><input
type=
"radio"
name=
"jenis"
value=
"22"
>
Penerimaan OPD
<span
class=
"badge"
>
(Tidak Aktif)
</span></label>
</div>
</div>
<div
class=
"radio"
>
<label><input
type=
"radio"
name=
"jenis"
value=
"99"
>
CSV
</label>
</div>
</div>
</div>
</div>
</div>
<!--Mulai S/d-->
<!--Mulai S/d-->
...
@@ -433,6 +546,8 @@
...
@@ -433,6 +546,8 @@
<div
class=
"col-md-9"
>
<div
class=
"col-md-9"
>
<button
id=
"btn_cetak"
name=
"btn_cetak"
type=
"button"
class=
"btn btn-primary "
<button
id=
"btn_cetak"
name=
"btn_cetak"
type=
"button"
class=
"btn btn-primary "
value=
"btn_cetak"
>
Cetak
</button>
value=
"btn_cetak"
>
Cetak
</button>
<button
id=
"btn_csv"
name=
"btn_csv"
type=
"button"
class=
"btn btn-primary "
value=
"btn_csv"
>
CSV
</button>
<button
id=
"btn_close"
name=
"btn_close"
type=
"button"
class=
"btn btn-warning"
<button
id=
"btn_close"
name=
"btn_close"
type=
"button"
class=
"btn btn-warning"
value=
"btn_close"
>
Tutup
</button>
value=
"btn_close"
>
Tutup
</button>
</div>
</div>
...
...
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