Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-pad-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 cd2fc093
authored
Aug 01, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Kabupaten Cirebon denda 1% sejak Agustus
1 parent
56b8d89b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
CHANGES.txt
opensipkd/pad/services/cirebon_kab.py
CHANGES.txt
View file @
cd2fc09
0.5.10 2024-08-01
-----------------
- Kabupaten Cirebon denda 1% sejak Agustus.
0.5.9 2024-07-28
----------------
- Kota Serang discount denda 100% periode 1 Agustus - 31 Agustus 2024.
...
...
opensipkd/pad/services/cirebon_kab.py
View file @
cd2fc09
from
datetime
import
date
from
opensipkd.hitung
import
hitung_denda
from
..models.cirebon_kab
import
Kohir
from
..models.subang
import
Payment
from
.banjar
import
(
Inquiry
as
BaseInquiry
,
Reversal
as
BaseReversal
,
...
...
@@ -15,6 +15,8 @@ INVOICE_ID = [
(
'SptNo'
,
5
,
'N'
),
]
AKHIR_MARET
=
date
(
2024
,
3
,
31
)
AKHIR_JULI
=
date
(
2024
,
7
,
31
)
AWAL_DISC
=
date
(
2024
,
1
,
15
)
AKHIR_DISC
=
date
(
2024
,
12
,
31
)
...
...
@@ -23,22 +25,31 @@ AKHIR_DISC = date(2024, 12, 31)
class
Inquiry
(
BaseInquiry
):
invoice_id_structure
=
INVOICE_ID
def
hitung_denda_waktu
(
self
):
# Override
tahun_terbit
=
self
.
get_jatuh_tempo
()
.
year
tgl_bayar
=
self
.
tgl_bayar
.
date
()
if
tahun_terbit
>
2023
:
persen_denda
=
1
elif
tgl_bayar
<=
AKHIR_JULI
:
persen_denda
=
2
else
:
persen_denda
=
1
self
.
bln_tunggakan
,
self
.
denda_waktu
=
hitung_denda
(
self
.
tagihan
,
self
.
invoice
.
jatuhtempotgl
,
persen_denda
,
tgl_bayar
)
def
get_discount_denda
(
self
):
# Override
tgl_bayar
=
self
.
tgl_bayar
.
date
()
if
AWAL_DISC
<=
tgl_bayar
<=
AKHIR_DISC
:
tgl
=
self
.
get_tgl_kohir
()
if
not
tgl
:
tgl
=
self
.
invoice
.
masadari
.
date
()
if
tgl
.
year
<
2024
:
if
tgl
<=
AKHIR_MARET
:
return
self
.
denda
return
0
def
get_kohir_model
(
self
):
# Override
return
Kohir
def
get_payment_model
(
self
):
# Override
return
Payment
class
Reversal
(
BaseReversal
):
invoice_id_structure
=
INVOICE_ID
...
...
@@ -46,9 +57,6 @@ class Reversal(BaseReversal):
def
get_kohir_model
(
self
):
# Override
return
Kohir
def
get_payment_model
(
self
):
# Override
return
Payment
class
AvailableInvoice
(
BaseAvailableInvoice
):
invoice_id_structure
=
INVOICE_ID
...
...
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