Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
sismiop-models
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 a70c2520
authored
Feb 06, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed total bayar perlu ditambah discount
1 parent
c22f4a4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
sismiop/services/base.py
sismiop/services/base.py
View file @
a70c252
...
...
@@ -240,13 +240,16 @@ class Inquiry(Query):
func
.
sum
(
Payment
.
jml_sppt_yg_dibayar
)
.
label
(
'jml_sppt_yg_dibayar'
),
func
.
sum
(
Payment
.
denda_sppt
)
.
label
(
'denda_sppt'
))
label
(
'denda_sppt'
),
func
.
sum
(
Payment
.
discount
)
.
label
(
'discount'
))
q
=
self
.
get_filter
(
q
)
bayar
=
q
.
first
()
self
.
total_bayar
=
bayar
.
jml_sppt_yg_dibayar
or
0
denda_lalu
=
bayar
.
denda_sppt
or
0
discount_lalu
=
float
(
bayar
.
discount
or
0
)
sisa
=
float
(
self
.
total_bayar
-
denda_lalu
)
tagihan
=
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
-
sisa
tagihan
=
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
-
sisa
-
discount_lalu
if
tagihan
<
0
:
self
.
tagihan
=
0
else
:
...
...
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