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 8bd9da68
authored
Dec 12, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Perubahan rumus discount Kabupaten Tasik
1 parent
5812b05e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
CHANGES.txt
sismiop/__init__.py
sismiop/services/tasik_kab.py
CHANGES.txt
View file @
8bd9da6
0.1.29 2021-12-11
-----------------
- Perubahan rumus discount Kabupaten Tasik
- Penggunaan pkgutil agar fleksibel saat pip install -e
0.1.28 2021-06-16
-----------------
- Bug fixed available invoice pada Kabupaten Tasikmalaya
...
...
sismiop/__init__.py
View file @
8bd9da6
__path__
=
__import__
(
'pkgutil'
)
.
extend_path
(
__path__
,
__name__
)
sismiop/services/tasik_kab.py
View file @
8bd9da6
from
datetime
import
date
from
sqlalchemy
import
func
from
opensipkd.hitung
import
round_up
from
..models.tasik_kab
import
(
...
...
@@ -16,6 +17,9 @@ from .base import (
)
MAX_DISC_DATE
=
date
(
2021
,
12
,
24
)
class
Inquiry
(
BaseInquiry
):
def
get_op_model
(
self
):
# Override
return
ObjekPajak
...
...
@@ -54,6 +58,21 @@ class Inquiry(BaseInquiry):
else
:
self
.
tagihan
=
round_up
(
tagihan
)
def
hitung_discount
(
self
):
# Override
if
self
.
tgl_bayar
<=
MAX_DISC_DATE
and
\
self
.
invoice
.
thn_pajak_sppt
>=
'2014'
and
\
self
.
invoice
.
thn_pajak_sppt
<=
'2020'
:
self
.
discount
=
self
.
denda
else
:
self
.
discount
=
0
def
before_save
(
self
,
payment
):
# Override
payment
.
denda_sppt
=
self
.
denda
-
self
.
discount
# Sekedar catatan
payment
.
denda_sblm_diskon
=
self
.
denda
payment
.
discount_denda
=
self
.
discount
payment
.
descount
=
self
.
discount
class
Reversal
(
BaseReversal
):
def
get_invoice_model
(
self
):
...
...
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