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 404b1850
authored
Jun 20, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah tangsel
1 parent
a8d6e05d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
4 deletions
sismiop/services/base.py
sismiop/services/tangsel/__init__.py
sismiop/services/base.py
View file @
404b185
...
@@ -321,10 +321,13 @@ class AvailableInvoice(Query):
...
@@ -321,10 +321,13 @@ class AvailableInvoice(Query):
if
inq
.
is_paid
():
if
inq
.
is_paid
():
continue
continue
no
+=
1
no
+=
1
msg
=
'#{} {} Pokok Rp {} + Denda Rp {} = Rp {}'
.
format
(
msg
=
self
.
get_msg
(
inq
)
str
(
no
)
.
zfill
(
2
),
inq
.
invoice_id_raw
,
msg
=
'#{} {}'
.
format
(
str
(
no
)
.
zfill
(
2
),
msg
)
thousand
(
inq
.
tagihan
),
thousand
(
inq
.
denda
),
thousand
(
inq
.
total
))
print
(
msg
)
print
(
msg
)
if
no
==
self
.
count
:
if
no
==
self
.
count
:
break
break
def
get_msg
(
self
,
inq
):
return
'{} Pokok Rp {} + Denda Rp {} = Rp {}'
.
format
(
inq
.
invoice_id_raw
,
thousand
(
inq
.
tagihan
),
thousand
(
inq
.
denda
),
thousand
(
inq
.
total
))
sismiop/services/tangsel/__init__.py
0 → 100644
View file @
404b185
from
datetime
import
date
from
..base
import
thousand
from
..default
import
(
Inquiry
as
BaseInquiry
,
Reversal
,
AvailableInvoice
as
BaseAvailableInvoice
,
)
AKHIR_DISC
=
date
(
2020
,
12
,
31
)
THN_DISC
=
[]
for
i
in
range
(
2014
,
2020
):
# 2014 - 2019
THN_DISC
.
append
(
str
(
i
))
class
Inquiry
(
BaseInquiry
):
def
hitung_denda
(
self
):
# Override
BaseInquiry
.
hitung_denda
(
self
)
self
.
denda_sblm_diskon
=
self
.
denda
if
self
.
tgl_bayar
.
date
()
>
AKHIR_DISC
:
return
if
self
.
invoice
.
thn_pajak_sppt
not
in
THN_DISC
:
return
self
.
denda
-=
int
(
0.5
*
self
.
denda
)
def
before_save
(
self
,
bayar
):
# Override
bayar
.
denda_sblm_diskon
=
self
.
denda_sblm_diskon
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
return
Inquiry
def
get_msg
(
self
,
inq
):
s
=
BaseAvailableInvoice
.
get_msg
(
self
,
inq
)
if
inq
.
denda
==
inq
.
denda_sblm_diskon
:
return
s
return
'{}, Denda Sebelum Discount Rp {}'
.
format
(
s
,
thousand
(
inq
.
denda_sblm_diskon
))
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