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 056ff80e
authored
Oct 12, 2020
by
pindya
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://git.opensipkd.com/taufik/esipkd
into master
2 parents
41c817a9
46b968e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
esipkd/views/__init__.py
esipkd/views/__init__.py
View file @
056ff80
...
@@ -15,6 +15,8 @@ from ..models.isipkd import(
...
@@ -15,6 +15,8 @@ from ..models.isipkd import(
ARSspd
,
ARInvoice
,
Unit
,
Rekening
ARSspd
,
ARInvoice
,
Unit
,
Rekening
)
)
from
pyramid.view
import
notfound_view_config
from
pyramid.view
import
notfound_view_config
import
logging
log
=
logging
.
getLogger
(
__name__
)
...
@@ -192,9 +194,9 @@ def view_home(request):
...
@@ -192,9 +194,9 @@ def view_home(request):
##REKENING##
##REKENING##
for
r
in
data_dashboard
[
'rek'
]:
for
r
in
data_dashboard
[
'rek'
]:
r
[
'persen'
]
=
r
[
'realisasi'
]
and
str
(
round
((
float
(
r
[
'realisasi'
])
/
float
(
r
[
'target'
]))
*
100
,
2
))
.
replace
(
'.0'
,
''
)
or
'0'
r
[
'persen'
]
=
r
[
'realisasi'
]
>
0
and
str
(
round
((
float
(
r
[
'realisasi'
])
/
float
(
r
[
'target'
]))
*
100
,
2
)
)
or
'0'
for
r
in
data_dashboard
[
'rekdet'
]:
for
r
in
data_dashboard
[
'rekdet'
]:
r
[
'persen'
]
=
r
[
'realisasi'
]
and
str
(
round
((
float
(
r
[
'realisasi'
])
/
float
(
r
[
'target'
]))
*
100
,
2
))
.
replace
(
'.0'
,
''
)
or
'0'
r
[
'persen'
]
=
r
[
'realisasi'
]
>
0
and
str
(
round
((
float
(
r
[
'realisasi'
])
/
float
(
r
[
'target'
]))
*
100
,
2
)
)
or
'0'
#Unit
#Unit
opds
=
Unit
.
query
()
.
filter
(
Unit
.
level_id
.
between
(
3
,
4
))
.
order_by
(
Unit
.
kode
)
.
all
()
opds
=
Unit
.
query
()
.
filter
(
Unit
.
level_id
.
between
(
3
,
4
))
.
order_by
(
Unit
.
kode
)
.
all
()
...
...
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