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 2bd65cc6
authored
Sep 25, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah field discount_denda
1 parent
0fde535a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
opensipkd/pad/models/default.py
opensipkd/pad/services/tangsel.py
opensipkd/pad/models/default.py
View file @
2bd65cc
...
@@ -377,6 +377,7 @@ class Payment(Base):
...
@@ -377,6 +377,7 @@ class Payment(Base):
denda
=
Column
(
Integer
)
denda
=
Column
(
Integer
)
jml_bayar
=
Column
(
Integer
)
jml_bayar
=
Column
(
Integer
)
is_valid
=
Column
(
Integer
)
is_valid
=
Column
(
Integer
)
discount_denda
=
Column
(
Float
)
__table_args__
=
(
__table_args__
=
(
UniqueConstraint
(
'tahun'
,
'sspdno'
),
UniqueConstraint
(
'tahun'
,
'sspdno'
),
dict
(
schema
=
'pad'
))
dict
(
schema
=
'pad'
))
...
...
opensipkd/pad/services/tangsel.py
View file @
2bd65cc
...
@@ -24,10 +24,11 @@ from ..models.tangsel import (
...
@@ -24,10 +24,11 @@ from ..models.tangsel import (
from
.base
import
satu_kalimat
from
.base
import
satu_kalimat
AWAL_DISC
=
date
(
202
2
,
8
,
1
)
AWAL_DISC
=
date
(
202
3
,
9
,
1
)
AKHIR_DISC
=
date
(
202
2
,
12
,
31
)
AKHIR_DISC
=
date
(
202
3
,
12
,
28
)
MASA_PAJAK
=
date
(
2022
,
6
,
30
)
MASA_PAJAK_NON_REKLAME
=
date
(
2023
,
8
,
31
)
MASA_PAJAK_REKLAME
=
date
(
2023
,
8
,
31
)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
...
@@ -58,10 +59,16 @@ class Inquiry(BaseInquiry):
...
@@ -58,10 +59,16 @@ class Inquiry(BaseInquiry):
tgl_pajak
=
None
tgl_pajak
=
None
if
self
.
is_reklame
():
if
self
.
is_reklame
():
tgl_pajak
=
self
.
get_tgl_kohir
()
tgl_pajak
=
self
.
get_tgl_kohir
()
if
not
tgl_pajak
:
return
0
if
tgl_pajak
<=
MASA_PAJAK_REKLAME
:
return
self
.
denda
else
:
else
:
tgl_pajak
=
self
.
invoice
.
masasd
.
date
()
tgl_pajak
=
self
.
invoice
.
masasd
.
date
()
if
tgl_pajak
and
tgl_pajak
<=
MASA_PAJAK
:
if
not
tgl_pajak
:
return
self
.
denda
return
0
if
tgl_pajak
<=
MASA_PAJAK_NON_REKLAME
:
return
self
.
denda
return
0
return
0
def
before_save
(
self
,
pay
):
# Override
def
before_save
(
self
,
pay
):
# 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