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 8caf32b2
authored
Aug 06, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Kota Tangerang Selatan discount periode 1 September - 28 Desember
1 parent
307957d5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
CHANGES.txt
pyproject.toml
sismiop/services/base.py
sismiop/services/tangsel.py
CHANGES.txt
View file @
8caf32b
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
bin/pbb_inquiry
bin/pbb_inquiry
- bin/pbb_inquiry tambah pilihan --nominal saat --payment
- bin/pbb_inquiry tambah pilihan --nominal saat --payment
- bin/pbb_inquiry tambah pilihan --update-denda
- bin/pbb_inquiry tambah pilihan --update-denda
- Kota Tangerang Selatan discount periode 1 September - 28 Desember.
0.3.13 2024-07-31
0.3.13 2024-07-31
-----------------
-----------------
...
...
pyproject.toml
View file @
8caf32b
...
@@ -11,7 +11,7 @@ dependencies = [
...
@@ -11,7 +11,7 @@ dependencies = [
'psycopg
2
-binary'
,
'psycopg
2
-binary'
,
'opensipkd-hitung
@
git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git'
,
'opensipkd-hitung
@
git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git'
,
]
]
requires-python
=
'>=
3.
6
'
requires-python
=
'>=
3.
9
'
authors
=
[
authors
=
[
{name='Owo
Sugiana'
,
email='sugiana@gmail.com'}
,
{name='Owo
Sugiana'
,
email='sugiana@gmail.com'}
,
]
]
...
...
sismiop/services/base.py
View file @
8caf32b
...
@@ -44,7 +44,7 @@ def get_db_session():
...
@@ -44,7 +44,7 @@ def get_db_session():
def
thousand
(
n
):
def
thousand
(
n
):
return
locale
.
format
(
'
%0
.f'
,
n
,
True
)
return
locale
.
format
_string
(
'
%0
.f'
,
n
,
True
)
def
get_nop
(
row
):
def
get_nop
(
row
):
...
...
sismiop/services/tangsel.py
View file @
8caf32b
...
@@ -23,10 +23,8 @@ from ..models.tangsel import (
...
@@ -23,10 +23,8 @@ from ..models.tangsel import (
)
)
AWAL_DISC_1
=
date
(
2024
,
1
,
3
)
AWAL_DISC
=
date
(
2024
,
9
,
1
)
AKHIR_DISC_1
=
date
(
2024
,
4
,
30
)
AKHIR_DISC
=
date
(
2024
,
12
,
28
)
AWAL_DISC_2
=
date
(
2024
,
5
,
1
)
AKHIR_DISC_2
=
date
(
2024
,
6
,
30
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -59,6 +57,11 @@ class Inquiry(BaseInquiry):
...
@@ -59,6 +57,11 @@ 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
# Abaikan faktor_pengurang_sppt
# (Kabid Jimmy via Eko Novianto, 6-8-2022)
# (Kabid Jimmy via Eko Novianto, 6-8-2022)
...
@@ -72,12 +75,12 @@ class Inquiry(BaseInquiry):
...
@@ -72,12 +75,12 @@ class Inquiry(BaseInquiry):
if
q
.
first
():
if
q
.
first
():
print
(
'Tanpa Discount Pokok'
)
print
(
'Tanpa Discount Pokok'
)
return
0
return
0
disc
=
0
if
self
.
invoice
.
thn_pajak_sppt
<=
'2014'
:
if
self
.
invoice
.
thn_pajak_sppt
==
'2024'
:
disc
=
0.75
if
AWAL_DISC_1
<=
self
.
tgl_bayar
<=
AKHIR_DISC_1
:
elif
self
.
invoice
.
thn_pajak_sppt
<=
'2022'
:
disc
=
0.1
disc
=
0.3
elif
AWAL_DISC_2
<=
self
.
tgl_bayar
<=
AKHIR_DISC_2
:
else
:
disc
=
0.05
return
0
return
int
(
disc
*
self
.
tagihan
)
return
int
(
disc
*
self
.
tagihan
)
def
tahun_lunas
(
self
,
tahun
):
def
tahun_lunas
(
self
,
tahun
):
...
@@ -90,8 +93,12 @@ class Inquiry(BaseInquiry):
...
@@ -90,8 +93,12 @@ 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
self
.
discount_pokok
=
self
.
discount_denda
=
0
if
(
AWAL_DISC
<=
self
.
tgl_bayar
<=
AKHIR_DISC
)
and
\
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