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 ed2ea3d9
authored
Jan 03, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Penyesuaian struktur tabel Kabupaten Cirebon
1 parent
bd23c557
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
opensipkd/pad/models/cirebon_kab.py
opensipkd/pad/services/cirebon_kab.py
opensipkd/pad/models/cirebon_kab.py
0 → 100644
View file @
ed2ea3d
from
sqlalchemy
import
(
Column
,
Integer
,
DateTime
,
ForeignKey
,
)
from
sqlalchemy.ext.declarative
import
declarative_base
from
.default
import
Invoice
Base
=
declarative_base
()
class
Kohir
(
Base
):
__tablename__
=
'pad_kohir'
tahun
=
Column
(
Integer
,
nullable
=
False
)
kohirno
=
Column
(
Integer
,
nullable
=
False
)
spt_id
=
Column
(
Integer
,
ForeignKey
(
Invoice
.
id
),
nullable
=
False
)
kohirtgl
=
Column
(
DateTime
,
nullable
=
False
)
id
=
Column
(
Integer
,
primary_key
=
True
)
enabled
=
Column
(
Integer
)
create_date
=
Column
(
DateTime
)
create_uid
=
Column
(
Integer
)
write_date
=
Column
(
DateTime
)
write_uid
=
Column
(
Integer
)
posted
=
Column
(
Integer
)
__table_args__
=
(
dict
(
schema
=
'pad'
),)
opensipkd/pad/services/cirebon_kab.py
View file @
ed2ea3d
from
datetime
import
date
from
datetime
import
date
from
..models.cirebon_kab
import
Kohir
from
.default
import
(
from
.default
import
(
Inquiry
as
BaseInquiry
,
Inquiry
as
BaseInquiry
,
Reversal
as
BaseReversal
,
Reversal
as
BaseReversal
,
...
@@ -20,12 +21,19 @@ AKHIR_DISC = date(2022, 3, 31)
...
@@ -20,12 +21,19 @@ AKHIR_DISC = date(2022, 3, 31)
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
invoice_id_structure
=
INVOICE_ID
invoice_id_structure
=
INVOICE_ID
# Cekal 2024, Pak Yasir, 2-1-2024
def
is_available
(
self
):
return
super
()
.
is_available
()
and
self
.
tahun_terbit
<
2024
def
get_discount_denda
(
self
):
# Override
def
get_discount_denda
(
self
):
# Override
tgl_bayar
=
self
.
tgl_bayar
.
date
()
tgl_bayar
=
self
.
tgl_bayar
.
date
()
if
tgl_bayar
<=
AKHIR_DISC
:
if
tgl_bayar
<=
AKHIR_DISC
:
return
self
.
denda
return
self
.
denda
return
0
return
0
def
get_kohir_model
(
self
):
return
Kohir
class
Reversal
(
BaseReversal
):
class
Reversal
(
BaseReversal
):
invoice_id_structure
=
INVOICE_ID
invoice_id_structure
=
INVOICE_ID
...
...
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