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 a069c21b
authored
Jan 03, 2025
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Discount pokok Kota Tangerang Selatan
1 parent
4246d8a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
24 deletions
CHANGES.txt
pyproject.toml
sismiop/services/tangsel.py
CHANGES.txt
View file @
a069c21
0.3.26 2025-01-03
-----------------
- Discount pokok Kota Tangerang Selatan
0.3.25 2025-01-02
0.3.25 2025-01-02
-----------------
-----------------
- Discount denda 100% di Kabupaten Cirebon
- Discount denda 100% di Kabupaten Cirebon
...
...
pyproject.toml
View file @
a069c21
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
[project]
name
=
'sismiop-models'
name
=
'sismiop-models'
version
=
'
0.3.2
5
'
version
=
'
0.3.2
6
'
dependencies
=
[
dependencies
=
[
'sqlalchemy'
,
'sqlalchemy'
,
'zope.sqlalchemy'
,
'zope.sqlalchemy'
,
...
...
sismiop/services/tangsel.py
View file @
a069c21
...
@@ -23,8 +23,10 @@ from ..models.tangsel import (
...
@@ -23,8 +23,10 @@ from ..models.tangsel import (
)
)
AWAL_DISC
=
date
(
2024
,
9
,
1
)
DISC_POKOK
=
[
AKHIR_DISC
=
date
(
2024
,
12
,
28
)
(
date
(
2025
,
1
,
3
),
date
(
2025
,
4
,
30
),
'2025'
,
0.1
),
(
date
(
2025
,
5
,
1
),
date
(
2025
,
6
,
30
),
'2025'
,
0.05
),
]
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -56,17 +58,7 @@ class Inquiry(BaseInquiry):
...
@@ -56,17 +58,7 @@ class Inquiry(BaseInquiry):
super
()
.
hitung_denda
()
super
()
.
hitung_denda
()
self
.
denda_sblm_diskon
=
self
.
denda
self
.
denda_sblm_diskon
=
self
.
denda
def
hitung_discount_denda
(
self
):
if
self
.
invoice
.
thn_pajak_sppt
<=
'2023'
:
return
self
.
denda
return
0
def
hitung_discount_pokok
(
self
):
def
hitung_discount_pokok
(
self
):
# Abaikan faktor_pengurang_sppt
# (Kabid Jimmy via Eko Novianto, 6-8-2022)
# faktor_pengurang = self.invoice.faktor_pengurang_sppt or 0
# if faktor_pengurang > 0:
# return 0
DBSession
=
get_db_session
()
DBSession
=
get_db_session
()
nop
=
self
.
invoice_id_raw
[:
18
]
nop
=
self
.
invoice_id_raw
[:
18
]
tahun
=
self
.
invoice
.
thn_pajak_sppt
tahun
=
self
.
invoice
.
thn_pajak_sppt
...
@@ -74,12 +66,12 @@ class Inquiry(BaseInquiry):
...
@@ -74,12 +66,12 @@ class Inquiry(BaseInquiry):
if
q
.
first
():
if
q
.
first
():
print
(
'Tanpa Discount Pokok'
)
print
(
'Tanpa Discount Pokok'
)
return
0
return
0
if
self
.
invoice
.
thn_pajak_sppt
<=
'2014'
:
disc
=
0
disc
=
0.75
for
awal
,
akhir
,
tahun
,
disc_
in
DISC_POKOK
:
elif
self
.
invoice
.
thn_pajak_sppt
<=
'2022'
:
if
awal
<=
self
.
tgl_bayar
<=
akhir
:
disc
=
0.3
if
tahun
==
self
.
invoice
.
thn_pajak_sppt
:
else
:
disc
=
disc_
return
0
break
return
int
(
disc
*
self
.
tagihan
)
return
int
(
disc
*
self
.
tagihan
)
def
tahun_lunas
(
self
,
tahun
):
def
tahun_lunas
(
self
,
tahun
):
...
@@ -92,12 +84,8 @@ class Inquiry(BaseInquiry):
...
@@ -92,12 +84,8 @@ class Inquiry(BaseInquiry):
return
row
and
row
.
status_pembayaran_sppt
==
'1'
return
row
and
row
.
status_pembayaran_sppt
==
'1'
def
hitung_discount
(
self
):
# Override
def
hitung_discount
(
self
):
# Override
if
(
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
)
and
\
self
.
discount_denda
=
0
self
.
tahun_lunas
(
'2024'
):
self
.
discount_denda
=
self
.
hitung_discount_denda
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
self
.
discount_pokok
=
self
.
hitung_discount_pokok
()
else
:
self
.
discount_denda
=
self
.
discount_pokok
=
0
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
self
.
discount
=
self
.
discount_denda
+
self
.
discount_pokok
def
before_save
(
self
,
payment
):
# Override
def
before_save
(
self
,
payment
):
# Override
...
...
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