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 aae460a4
authored
Dec 16, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah Kabupaten Magelang
1 parent
0172b515
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
CHANGES.txt
opensipkd/pad/scripts/common.py
opensipkd/pad/services/default.py
opensipkd/pad/services/magelang_kab.py
pyproject.toml
CHANGES.txt
View file @
aae460a
0.5.18 2024-12-15
-----------------
- Tambah Kabupaten Magelang
0.5.17 2024-12-08
-----------------
- Discount denda Kabupaten Serang
...
...
opensipkd/pad/scripts/common.py
View file @
aae460a
from
configparser
import
ConfigParser
from
sqlalchemy
import
create_engine
from
sqlalchemy
import
engine_from_config
from
sqlalchemy.orm
import
sessionmaker
from
zope.sqlalchemy
import
register
from
.logger
import
setup_logging
...
...
@@ -19,7 +19,7 @@ def init(option):
module_name
=
cf
[
'module'
]
module
=
__import__
(
'opensipkd.pad.services.'
+
module_name
)
db_url
=
cf
[
'db_url'
]
engine
=
create_engine
(
db_url
)
engine
=
engine_from_config
(
cf
,
'db_'
)
session_factory
=
sessionmaker
(
bind
=
engine
)
dbs
=
module
.
pad
.
services
.
base
.
DBSession
=
session_factory
()
register
(
dbs
)
...
...
opensipkd/pad/services/default.py
View file @
aae460a
...
...
@@ -256,6 +256,9 @@ class BaseInquiry:
def
get_masa_2
(
self
,
fmt
=
'
%
d
%
m
%
Y'
):
return
self
.
invoice
.
masasd
.
strftime
(
fmt
)
def
get_tgl_terima
(
self
,
fmt
=
'
%
d
%
m
%
Y'
):
return
self
.
invoice
.
terimatgl
.
strftime
(
fmt
)
def
get_nama_jenis_usaha
(
self
):
jenis
=
self
.
get_jenis_usaha
()
return
jenis
.
usahanm
...
...
opensipkd/pad/services/magelang_kab.py
0 → 100644
View file @
aae460a
from
.default
import
(
Inquiry
as
BaseInquiry
,
Reversal
as
BaseReversal
,
AvailableInvoice
as
BaseAvailableInvoice
,
)
from
..models.tangerang_kab
import
(
Kohir
,
Payment
,
)
class
Inquiry
(
BaseInquiry
):
def
get_kohir_model
(
self
):
# Override
return
Kohir
def
get_payment_model
(
self
):
# Override
return
Payment
class
Reversal
(
BaseReversal
):
def
get_kohir_model
(
self
):
# Override
return
Kohir
def
get_payment_model
(
self
):
# Override
return
Payment
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
# Override
return
Inquiry
pyproject.toml
View file @
aae460a
...
...
@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name
=
'opensipkd-pad-models'
version
=
'
0.5.1
7
'
version
=
'
0.5.1
8
'
dependencies
=
[
'sqlalchemy'
,
'zope.sqlalchemy'
,
...
...
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