Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
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 9474b854
authored
Aug 03, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
VSI
1 parent
c36f2f48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/agratek/api/merchant/views/odeo/__init__.py
src/agratek/api/merchant/views/odeo/__init__.py
View file @
9474b85
...
@@ -92,7 +92,7 @@ class Vendor(VendorClass):
...
@@ -92,7 +92,7 @@ class Vendor(VendorClass):
elif
resp
.
status_code
==
400
:
elif
resp
.
status_code
==
400
:
self
.
status
=
-
1
self
.
status
=
-
1
message
=
"data"
in
result
and
result
[
"data"
]
or
""
message
=
"data"
in
result
and
result
[
"data"
]
or
{}
message
=
message
and
"errors"
in
message
and
message
[
"errors"
]
or
message
message
=
message
and
"errors"
in
message
and
message
[
"errors"
]
or
message
message
=
type
(
message
)
is
list
and
", "
.
join
(
message
)
or
message
message
=
type
(
message
)
is
list
and
", "
.
join
(
message
)
or
message
...
@@ -404,7 +404,11 @@ class Vendor(VendorClass):
...
@@ -404,7 +404,11 @@ class Vendor(VendorClass):
self
.
amt_buy
=
result
[
"total"
]
self
.
amt_buy
=
result
[
"total"
]
adm_jual
=
self
.
vendor_produk
.
produk
.
harga
*
i
adm_jual
=
self
.
vendor_produk
.
produk
.
harga
*
i
product_id
=
self
.
invoice_det
.
produk
.
id
product_id
=
self
.
invoice_det
.
produk
.
id
partner_id
=
self
.
invoice_det
.
h2h_ar_invoice
.
customer_id
if
hasattr
(
self
.
invoice_det
,
"customer_id"
):
partner_id
=
self
.
invoice_det
.
customer_id
else
:
partner_id
=
self
.
invoice_det
.
h2h_ar_invoice
.
customer_id
discount
=
PartnerProduk
.
get_discount
(
partner_id
,
product_id
)
discount
=
PartnerProduk
.
get_discount
(
partner_id
,
product_id
)
self
.
discount
=
discount
*
i
self
.
discount
=
discount
*
i
harga_pokok
=
self
.
amt_buy
-
rincian
[
"admin"
]
harga_pokok
=
self
.
amt_buy
-
rincian
[
"admin"
]
...
...
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