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 2a8f9a52
authored
Oct 08, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Mengabaikan awalan 367602 pada Invoice ID
1 parent
7e0788cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
opensipkd/pad/services/default/__init__.py
opensipkd/pad/services/tangsel/__init__.py
opensipkd/pad/services/default/__init__.py
View file @
2a8f9a5
...
@@ -42,8 +42,9 @@ INVOICE_ID = [
...
@@ -42,8 +42,9 @@ INVOICE_ID = [
class
BaseInquiry
:
class
BaseInquiry
:
def
__init__
(
self
,
invoice_id
,
rekening_notes
=
[]):
def
__init__
(
self
,
invoice_id
,
rekening_notes
=
[]):
real_inv_id
=
self
.
get_invoice_id
(
invoice_id
)
self
.
invoice_id
=
FixLength
(
INVOICE_ID
)
self
.
invoice_id
=
FixLength
(
INVOICE_ID
)
self
.
invoice_id
.
set_raw
(
invoice
_id
)
self
.
invoice_id
.
set_raw
(
real_inv
_id
)
self
.
invoice
=
None
self
.
invoice
=
None
if
not
self
.
invoice_id
[
'SptNo'
]:
if
not
self
.
invoice_id
[
'SptNo'
]:
return
return
...
@@ -54,6 +55,9 @@ class BaseInquiry:
...
@@ -54,6 +55,9 @@ class BaseInquiry:
tahun
=
self
.
invoice_id
[
'Tahun'
],
sptno
=
self
.
invoice_id
[
'SptNo'
])
tahun
=
self
.
invoice_id
[
'Tahun'
],
sptno
=
self
.
invoice_id
[
'SptNo'
])
self
.
invoice
=
q
.
first
()
self
.
invoice
=
q
.
first
()
def
get_invoice_id
(
self
,
raw
):
return
raw
def
get_kecamatan_model
(
self
):
def
get_kecamatan_model
(
self
):
return
Kecamatan
return
Kecamatan
...
...
opensipkd/pad/services/tangsel/__init__.py
View file @
2a8f9a5
...
@@ -52,11 +52,16 @@ def satu_kalimat(notes):
...
@@ -52,11 +52,16 @@ def satu_kalimat(notes):
class
Inquiry
(
BaseInquiry
):
class
Inquiry
(
BaseInquiry
):
def
get_invoice_id
(
self
,
raw
):
# Override
if
raw
.
find
(
'367602'
)
==
0
:
# 3676: Tangsel, 02: PAD
return
raw
[
6
:]
return
raw
def
get_discount_denda
(
self
):
# Override
def
get_discount_denda
(
self
):
# Override
if
self
.
denda
<
1
:
if
self
.
denda
<
1
:
return
0
return
0
tgl_bayar
=
to_date
(
self
.
tgl_bayar
)
tgl_bayar
=
to_date
(
self
.
tgl_bayar
)
if
tgl_bayar
>
TGL_BAYAR_MAX
:
if
tgl_bayar
>
TGL_BAYAR_MAX
:
return
0
return
0
notes
=
[
ALASAN_TGL_BAYAR
]
notes
=
[
ALASAN_TGL_BAYAR
]
usaha
=
self
.
get_nama_jenis_usaha
()
usaha
=
self
.
get_nama_jenis_usaha
()
...
@@ -90,6 +95,11 @@ class Inquiry(BaseInquiry):
...
@@ -90,6 +95,11 @@ class Inquiry(BaseInquiry):
self
.
notes
=
satu_kalimat
(
notes
)
self
.
notes
=
satu_kalimat
(
notes
)
return
self
.
denda
return
self
.
denda
def
before_save
(
self
,
pay
):
# Override
pay
.
discount_denda
=
self
.
discount_denda
if
self
.
notes
is
not
None
:
pay
.
notes
=
self
.
notes
def
get_kecamatan_model
(
self
):
# Override
def
get_kecamatan_model
(
self
):
# Override
return
Kecamatan
return
Kecamatan
...
@@ -123,11 +133,6 @@ class Inquiry(BaseInquiry):
...
@@ -123,11 +133,6 @@ class Inquiry(BaseInquiry):
def
get_payment_model
(
self
):
# Override
def
get_payment_model
(
self
):
# Override
return
Payment
return
Payment
def
before_save
(
self
,
pay
):
pay
.
discount_denda
=
self
.
discount_denda
if
self
.
notes
is
not
None
:
pay
.
notes
=
self
.
notes
class
Reversal
(
BaseReversal
):
class
Reversal
(
BaseReversal
):
def
get_invoice_model
(
self
):
# Override
def
get_invoice_model
(
self
):
# 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