Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
eis
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f5daab4b
authored
Jul 11, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix calculation of YTD percentage and update template for clarity
1 parent
6d9048b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
eispajak/views/pcpd.py
eispajak/views/templates/pcpd_retribusi.pt
eispajak/views/pcpd.py
View file @
f5daab4
...
@@ -291,7 +291,7 @@ class Views(BaseView):
...
@@ -291,7 +291,7 @@ class Views(BaseView):
ytd_target
=
self
.
get_targets
(
"pbb"
)
ytd_target
=
self
.
get_targets
(
"pbb"
)
except
:
except
:
ytd_target
=
0
ytd_target
=
0
ytd_persen
=
round
(
ytd
/
ytd_target
*
100
,
2
)
if
ytd_target
>
0
else
0
ytd_persen
=
round
(
ytd
/
ytd_target
*
100
,
2
)
if
ytd_target
>
0
else
0
return
{
"today"
:
amt
,
return
{
"today"
:
amt
,
...
@@ -459,7 +459,7 @@ class Views(BaseView):
...
@@ -459,7 +459,7 @@ class Views(BaseView):
self
.
get_daily_data
(
PaymentWEBR
,
field
,
None
,
filter_exp
)
self
.
get_daily_data
(
PaymentWEBR
,
field
,
None
,
filter_exp
)
field
=
func
.
to_char
(
PaymentWEBR
.
tgl
,
'YYYY-WW'
)
field
=
func
.
to_char
(
PaymentWEBR
.
tgl
,
'YYYY-WW'
)
filter_exp
=
Payment
PAD
.
tgl
.
between
(
filter_exp
=
Payment
WEBR
.
tgl
.
between
(
today
-
timedelta
(
weeks
=
6
),
today
)
today
-
timedelta
(
weeks
=
6
),
today
)
week
,
weekTrx
,
weekly
,
weeklyTrx
,
weeklyAcc
,
weeklyAccTrx
=
\
week
,
weekTrx
,
weekly
,
weeklyTrx
,
weeklyAcc
,
weeklyAccTrx
=
\
self
.
get_daily_data
(
PaymentWEBR
,
field
,
None
,
filter_exp
)
self
.
get_daily_data
(
PaymentWEBR
,
field
,
None
,
filter_exp
)
...
...
eispajak/views/templates/pcpd_retribusi.pt
View file @
f5daab4
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<h2
class=
"primary"
>
<h2
class=
"primary"
>
<b>
Rp.
<h2
class=
"odometer sub-odometer bold primary"
id=
"ytd"
>
0
</h2></b>
<b>
Rp.
<h2
class=
"odometer sub-odometer bold primary"
id=
"ytd"
>
0
</h2></b>
<p></p>
<p></p>
Persentase
<span
class=
"odometer sub-odometer bold primary"
id=
"ytdPersen"
>
Persentase
<span
class=
"odometer sub-odometer bold primary"
id=
"ytdPersen"
>
</h2>
</h2>
<h3
class=
"primary bold"
><span
id=
"trxYtd"
>
1067
</span>
Transaksi
</h3>
<h3
class=
"primary bold"
><span
id=
"trxYtd"
>
1067
</span>
Transaksi
</h3>
</div>
</div>
...
@@ -363,8 +363,8 @@
...
@@ -363,8 +363,8 @@
trx
.
innerHTML
=
parseInt
(
newData
.
trx
).
toLocaleString
(
"id-ID"
);
trx
.
innerHTML
=
parseInt
(
newData
.
trx
).
toLocaleString
(
"id-ID"
);
odytd
.
update
(
newData
.
ytd
);
odytd
.
update
(
newData
.
ytd
);
trxYtd
.
innerHTML
=
parseInt
(
newData
.
trxYtd
).
toLocaleString
(
"id-ID"
);
trxYtd
.
innerHTML
=
parseInt
(
newData
.
trxYtd
).
toLocaleString
(
"id-ID"
);
ytdTarget
.
innerHTML
=
parseInt
(
newData
.
ytdTarget
).
toLocaleString
(
"id-ID"
);
//
ytdTarget.innerHTML = parseInt(newData.ytdTarget).toLocaleString("id-ID");
ytdPersen
.
innerHTML
=
parseFloat
(
newData
.
ytdPersen
).
toFixed
(
2
)
+
"%"
;
//
ytdPersen.innerHTML = parseFloat(newData.ytdPersen).toFixed(2) + "%";
time
.
innerHTML
=
formatter
.
format
(
date
);
time
.
innerHTML
=
formatter
.
format
(
date
);
time
.
style
.
fontWeight
=
'bold'
;
time
.
style
.
fontWeight
=
'bold'
;
addData
(
pieChart
,
newData
.
pie
);
addData
(
pieChart
,
newData
.
pie
);
...
...
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