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 73cb49e4
authored
Jul 01, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Jadikan nol bila nilai tagihan negatif
1 parent
3fc5d462
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
sismiop/services/base.py
sismiop/services/base.py
View file @
73cb49e
...
@@ -220,7 +220,10 @@ class Inquiry(Query):
...
@@ -220,7 +220,10 @@ class Inquiry(Query):
denda_lalu
=
bayar
.
denda_sppt
or
0
denda_lalu
=
bayar
.
denda_sppt
or
0
sisa
=
float
(
self
.
total_bayar
-
denda_lalu
)
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
self
.
tagihan
=
round_up
(
tagihan
)
if
tagihan
<
0
:
self
.
tagihan
=
0
else
:
self
.
tagihan
=
round_up
(
tagihan
)
def
hitung_denda
(
self
):
def
hitung_denda
(
self
):
if
isinstance
(
self
.
tgl_bayar
,
datetime
):
if
isinstance
(
self
.
tgl_bayar
,
datetime
):
...
...
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