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 886ddf66
authored
May 03, 2021
by
iwan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah Kabupaten Kuningan
1 parent
4801e774
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
CHANGES.txt
opensipkd/pad/services/default.py
opensipkd/pad/services/kuningan.py
CHANGES.txt
View file @
886ddf6
0.3.3 2021-04-29
----------------
- Tambah Kabupaten Kuningan
0.3.2 2021-04-06
----------------
- Maksimum denda 0,48 dari tagihan pokok hanya untuk denda waktu.
...
...
opensipkd/pad/services/default.py
View file @
886ddf6
...
...
@@ -439,6 +439,7 @@ class AvailableInvoice:
q
=
q
.
filter
(
Invoice
.
pajak_id
==
Pajak
.
id
,
Pajak
.
rekening_id
==
Rekening
.
id
,
Invoice
.
status_pembayaran
==
0
)
q
=
self
.
get_filter_tahun
(
q
)
q
=
self
.
get_filter_rekening
(
q
)
q
=
self
.
get_filter_usaha
(
q
)
q
=
self
.
get_filter_nominal
(
q
)
...
...
@@ -449,6 +450,11 @@ class AvailableInvoice:
q
=
self
.
get_filter_type
(
q
)
return
q
def
get_filter_tahun
(
self
,
q
):
if
self
.
option
.
tahun
:
return
q
.
filter
(
Invoice
.
tahun
==
self
.
option
.
tahun
)
return
q
def
get_filter_rekening
(
self
,
q
):
if
self
.
option
.
rekening
:
q
=
q
.
filter
(
Rekening
.
rekeningkd
==
self
.
option
.
rekening
)
...
...
opensipkd/pad/services/kuningan.py
0 → 100644
View file @
886ddf6
from
datetime
import
date
from
.default
import
(
Inquiry
as
BaseInquiry
,
Reversal
,
AvailableInvoice
as
BaseAvailableInvoice
,
)
def
dmy
(
tgl
):
return
tgl
.
strftime
(
'
%
d-
%
m-
%
Y'
)
AWAL_TAHUN
=
2016
AKHIR_TAHUN
=
2020
AKHIR_TGL_BAYAR
=
date
(
2021
,
12
,
31
)
NOTE_TGL_BAYAR
=
'Tanggal bayar {tgl} <= '
+
dmy
(
AKHIR_TGL_BAYAR
)
NOTE_TAHUN
=
str
(
AWAL_TAHUN
)
+
' <= field tahun {tahun} <= '
+
str
(
AKHIR_TAHUN
)
class
Inquiry
(
BaseInquiry
):
def
get_discount_denda
(
self
):
# Override
tgl_bayar
=
self
.
tgl_bayar
.
date
()
if
tgl_bayar
>
AKHIR_TGL_BAYAR
:
return
0
notes
=
[
NOTE_TGL_BAYAR
.
format
(
tgl
=
dmy
(
tgl_bayar
))]
if
AWAL_TAHUN
<=
self
.
invoice
.
tahun
<=
AKHIR_TAHUN
:
s
=
NOTE_TAHUN
.
format
(
tahun
=
self
.
invoice
.
tahun
)
notes
.
append
(
s
)
self
.
notes
=
notes
return
self
.
denda
return
0
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
# Override
return
Inquiry
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