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 904cda2b
authored
Feb 25, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Prefix pada invoice ID Kabupaten Bekasi
1 parent
31ecba36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
opensipkd/pad/services/bekasi_kab.py
opensipkd/pad/services/default.py
opensipkd/pad/services/bekasi_kab.py
View file @
904cda2
...
...
@@ -10,6 +10,13 @@ def dmy(tgl):
return
tgl
.
strftime
(
'
%
d-
%
m-
%
Y'
)
PREFIX
=
'3218'
INVOICE_ID
=
[
(
'Prefix'
,
4
,
'N'
),
(
'Tahun'
,
4
,
'N'
),
(
'SptNo'
,
5
,
'N'
),
]
AWAL_MASA
=
date
(
2020
,
3
,
1
)
AKHIR_MASA
=
date
(
2020
,
12
,
31
)
AWAL_TERIMA
=
date
(
2020
,
4
,
1
)
...
...
@@ -23,6 +30,8 @@ NOTE_TGL_TERIMA = 'field terimatgl {tgl} >= ' + dmy(AWAL_TERIMA)
class
Inquiry
(
BaseInquiry
):
invoice_id_structure
=
INVOICE_ID
def
get_discount_denda
(
self
):
# Override
self
.
notes
=
[]
rek
=
self
.
rekening
.
rekeningkd
...
...
@@ -57,5 +66,12 @@ class Inquiry(BaseInquiry):
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
invoice_id_structure
=
INVOICE_ID
def
get_inquiry_class
(
self
):
# Override
return
Inquiry
def
get_invoice_id
(
self
,
row
):
# Override
invoice_id
=
super
()
.
get_invoice_id
(
row
)
invoice_id
[
'Prefix'
]
=
PREFIX
return
invoice_id
opensipkd/pad/services/default.py
View file @
904cda2
...
...
@@ -41,9 +41,11 @@ INVOICE_ID = [
class
BaseInquiry
:
invoice_id_structure
=
INVOICE_ID
def
__init__
(
self
,
invoice_id
,
conf
=
dict
()):
real_inv_id
=
self
.
get_invoice_id
(
invoice_id
)
self
.
invoice_id
=
FixLength
(
INVOICE_ID
)
self
.
invoice_id
=
FixLength
(
self
.
invoice_id_structure
)
self
.
invoice_id
.
set_raw
(
real_inv_id
)
self
.
invoice
=
None
if
not
self
.
invoice_id
[
'SptNo'
]:
...
...
@@ -372,6 +374,8 @@ def date_from_str(s):
class
AvailableInvoice
:
invoice_id_structure
=
INVOICE_ID
def
__init__
(
self
,
conf
,
option
):
self
.
conf
=
conf
self
.
option
=
option
...
...
@@ -532,10 +536,14 @@ class AvailableInvoice:
Invoice
.
type_id
==
SptType
.
id
,
SptType
.
typenm
.
ilike
(
self
.
option
.
tipe
))
def
get_
message
(
self
,
row
):
invoice_id
=
FixLength
(
INVOICE_ID
)
def
get_
invoice_id
(
self
,
row
):
invoice_id
=
FixLength
(
self
.
invoice_id_structure
)
invoice_id
[
'Tahun'
]
=
row
.
tahun
invoice_id
[
'SptNo'
]
=
row
.
sptno
return
invoice_id
def
get_message
(
self
,
row
):
invoice_id
=
self
.
get_invoice_id
(
row
)
Inquiry
=
self
.
get_inquiry_class
()
inq
=
Inquiry
(
invoice_id
.
get_raw
(),
self
.
conf
)
if
not
inq
.
total
:
...
...
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