Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Taufik Yulianto
/
esipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 596ba0e8
authored
Aug 27, 2020
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
revisi rpc sipandu
1 parent
3f7eed58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
esipkd/views/rpc.py
esipkd/views/rpc.py
View file @
596ba0e
...
...
@@ -180,8 +180,9 @@ def set_invoice(request, data):
values
[
'periode_1'
]
=
date_from_str
(
values
[
'periode_1'
])
if
'periode_2'
in
values
and
values
[
'periode_2'
]:
values
[
'periode_2'
]
=
date_from_str
(
values
[
'periode_2'
])
if
not
'status_bayar'
in
values
or
not
values
[
'status_bayar'
]:
values
[
'status_bayar'
]
=
0
# if not 'status_bayar' in values or not values['status_bayar']:
# values['status_bayar'] = 0
values
[
'status_bayar'
]
=
0
op
=
ObjekPajak
.
get_by_kode
(
values
[
'op_kode'
])
if
not
op
:
return
custom_error
(
-
1
,
'Objek Pajak not found'
)
...
...
@@ -210,6 +211,7 @@ def set_invoice(request, data):
return
custom_error
(
-
1
,
'Rekening not found, contact admin'
)
values
[
'rekening_id'
]
=
rek
.
id
values
[
'rek_nama'
]
=
rek
.
nama
rdata
=
{}
for
v
in
values
:
v
=
v
.
strip
()
row_invoice
=
DBSession
.
query
(
ARInvoice
)
.
\
...
...
@@ -225,18 +227,18 @@ def set_invoice(request, data):
else
:
invoice
=
save_invoice
(
request
,
values
)
# Save Departemen_Route
values
[
'kode'
]
=
invoice
.
kode
values
[
'tgl_skrd'
]
=
invoice
.
tgl_tetap
values
[
'ar_invoice_id'
]
=
invoice
.
id
save_departemen_route
(
request
,
values
)
rdata
=
dict
(
kd_bayar
=
invoice
.
kode
)
# Save Departemen_Route
values
[
'kode'
]
=
invoice
.
kode
values
[
'tgl_skrd'
]
=
invoice
.
tgl_tetap
values
[
'ar_invoice_id'
]
=
invoice
.
id
save_departemen_route
(
request
,
values
)
if
not
save_departemen_route
:
return
dict
(
code
=-
32603
,
message
=
'Gagal menambahkan Invoice'
,
data
=
rdata
)
if
not
save_departemen_route
:
return
dict
(
code
=-
32603
,
message
=
'Gagal menambahkan Invoice'
,
data
=
rdata
)
rdata
[
'kd_bayar'
]
=
invoice
.
kode
return
dict
(
code
=
0
,
message
=
'Sukses menambahkan Invoice'
,
data
=
rdata
)
...
...
@@ -318,7 +320,8 @@ def send_payment(request, data):
DepartemenRoute
.
id
)
.
\
join
(
DepartemenRoute
,
DepartemenRoute
.
ar_invoice_id
==
ARSspd
.
arinvoice_id
)
.
\
join
(
ARInvoice
,
ARInvoice
.
id
==
ARSspd
.
arinvoice_id
)
.
\
filter
(
DepartemenRoute
.
status
==
0
)
.
\
filter
(
DepartemenRoute
.
status
==
0
,
ARInvoice
.
status_bayar
==
1
)
.
\
order_by
(
ARSspd
.
pembayaran_ke
)
.
all
()
if
row_payment
:
for
k
in
row_payment
:
...
...
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