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 446924c1
authored
Jan 22, 2022
by
sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rumus discount Kabupaten Cirebon
1 parent
04830631
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
2 deletions
.gitignore
CHANGES.txt
opensipkd/__init__.py
opensipkd/pad/services/cirebon_kab.py
opensipkd/pad/services/default.py
setup.py
.gitignore
View file @
446924c
...
@@ -2,3 +2,4 @@ build
...
@@ -2,3 +2,4 @@ build
dist
dist
*egg-info
*egg-info
test-*.ini
test-*.ini
__pycache__
CHANGES.txt
View file @
446924c
0.4 2022-01-22
--------------
- is_available() tidak lagi digunakan saat hitung() melainkan saat __init__().
Jadi bila field status_pembayaran bukan 0 atau 1 maka artinya sudah dihapus.
- Penggunaan pkgutil agar fleksibel saat pip install -e
- Rumus discount Kabupaten Cirebon
0.3.6 2021-07-05
0.3.6 2021-07-05
----------------
----------------
- Perubahan rumus denda pada Kabupaten Bekasi
- Perubahan rumus denda pada Kabupaten Bekasi
...
...
opensipkd/__init__.py
View file @
446924c
__path__
=
__import__
(
'pkgutil'
)
.
extend_path
(
__path__
,
__name__
)
opensipkd/pad/services/cirebon_kab.py
View file @
446924c
...
@@ -14,9 +14,18 @@ INVOICE_ID = [
...
@@ -14,9 +14,18 @@ INVOICE_ID = [
]
]
AKHIR_DISC
=
date
(
2022
,
3
,
31
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
invoice_id_structure
=
INVOICE_ID
invoice_id_structure
=
INVOICE_ID
def
get_discount_denda
(
self
):
# Override
tgl_bayar
=
self
.
tgl_bayar
.
date
()
if
tgl_bayar
<=
AKHIR_DISC
:
return
self
.
denda
return
0
class
Reversal
(
BaseReversal
):
class
Reversal
(
BaseReversal
):
invoice_id_structure
=
INVOICE_ID
invoice_id_structure
=
INVOICE_ID
...
...
opensipkd/pad/services/default.py
View file @
446924c
...
@@ -59,6 +59,8 @@ class BaseInquiry:
...
@@ -59,6 +59,8 @@ class BaseInquiry:
q
=
DBSession
.
query
(
Invoice
)
.
filter_by
(
q
=
DBSession
.
query
(
Invoice
)
.
filter_by
(
tahun
=
self
.
invoice_id
[
'Tahun'
],
sptno
=
self
.
invoice_id
[
'SptNo'
])
tahun
=
self
.
invoice_id
[
'Tahun'
],
sptno
=
self
.
invoice_id
[
'SptNo'
])
self
.
invoice
=
q
.
first
()
self
.
invoice
=
q
.
first
()
if
not
self
.
is_available
():
self
.
invoice
=
None
def
get_invoice_id
(
self
,
raw
):
def
get_invoice_id
(
self
,
raw
):
return
raw
return
raw
...
@@ -97,7 +99,7 @@ class BaseInquiry:
...
@@ -97,7 +99,7 @@ class BaseInquiry:
return
Payment
return
Payment
def
is_available
(
self
):
def
is_available
(
self
):
return
self
.
invoice
.
status_pembayaran
==
0
return
self
.
invoice
.
status_pembayaran
in
(
0
,
1
)
def
get_jatuh_tempo
(
self
):
def
get_jatuh_tempo
(
self
):
return
self
.
invoice
.
jatuhtempotgl
and
self
.
invoice
.
jatuhtempotgl
.
date
()
return
self
.
invoice
.
jatuhtempotgl
and
self
.
invoice
.
jatuhtempotgl
.
date
()
...
@@ -307,7 +309,7 @@ class Inquiry(BaseInquiry):
...
@@ -307,7 +309,7 @@ class Inquiry(BaseInquiry):
self
.
hitung_denda
()
self
.
hitung_denda
()
self
.
hitung_bayar
()
self
.
hitung_bayar
()
self
.
total
=
self
.
tagihan
+
self
.
denda
-
self
.
total_bayar
self
.
total
=
self
.
tagihan
+
self
.
denda
-
self
.
total_bayar
if
self
.
total
<
0
or
not
self
.
is_available
()
:
if
self
.
total
<
0
:
self
.
total
=
0
self
.
total
=
0
def
get_pay_seq
(
self
):
def
get_pay_seq
(
self
):
...
...
setup.py
View file @
446924c
...
@@ -15,6 +15,7 @@ requires = [
...
@@ -15,6 +15,7 @@ requires = [
'sqlalchemy'
,
'sqlalchemy'
,
'zope.sqlalchemy'
,
'zope.sqlalchemy'
,
'transaction'
,
'transaction'
,
'psycopg2-binary'
,
'opensipkd-hitung @ '
'opensipkd-hitung @ '
'git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git'
,
'git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git'
,
]
]
...
...
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