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 34f1dbed
authored
Feb 23, 2022
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Jumlah digit Invoice ID harus sesuai struktur
1 parent
446924c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
CHANGES.txt
opensipkd/pad/services/default.py
CHANGES.txt
View file @
34f1dbe
0.4.1 2022-02-23
----------------
- Jumlah digit Invoice ID harus sama persis sesuai struktur
0.4 2022-01-22
0.4 2022-01-22
--------------
--------------
- is_available() tidak lagi digunakan saat hitung() melainkan saat __init__().
- is_available() tidak lagi digunakan saat hitung() melainkan saat __init__().
...
...
opensipkd/pad/services/default.py
View file @
34f1dbe
...
@@ -41,16 +41,21 @@ INVOICE_ID = [
...
@@ -41,16 +41,21 @@ INVOICE_ID = [
(
'Tahun'
,
4
,
'N'
),
(
'Tahun'
,
4
,
'N'
),
(
'SptNo'
,
6
,
'N'
),
(
'SptNo'
,
6
,
'N'
),
]
]
INVOICE_ID_LENGTH
=
0
for
name
,
size
,
typ
in
INVOICE_ID
:
INVOICE_ID_LENGTH
+=
size
class
BaseInquiry
:
class
BaseInquiry
:
invoice_id_structure
=
INVOICE_ID
invoice_id_structure
=
INVOICE_ID
def
__init__
(
self
,
invoice_id
,
conf
=
dict
()):
def
__init__
(
self
,
invoice_id
,
conf
=
dict
()):
self
.
invoice
=
None
real_inv_id
=
self
.
get_invoice_id
(
invoice_id
)
real_inv_id
=
self
.
get_invoice_id
(
invoice_id
)
if
len
(
real_inv_id
)
!=
INVOICE_ID_LENGTH
:
return
self
.
invoice_id
=
FixLength
(
self
.
invoice_id_structure
)
self
.
invoice_id
=
FixLength
(
self
.
invoice_id_structure
)
self
.
invoice_id
.
set_raw
(
real_inv_id
)
self
.
invoice_id
.
set_raw
(
real_inv_id
)
self
.
invoice
=
None
if
not
self
.
invoice_id
[
'SptNo'
]:
if
not
self
.
invoice_id
[
'SptNo'
]:
return
return
self
.
conf
=
conf
self
.
conf
=
conf
...
...
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