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 1431ba15
authored
Aug 04, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
VSI
1 parent
5bf44aae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
src/agratek/api/merchant/views/odeo/__init__.py
src/agratek/api/merchant/views/odeo/__init__.py
View file @
1431ba1
...
@@ -402,18 +402,23 @@ class Vendor(VendorClass):
...
@@ -402,18 +402,23 @@ class Vendor(VendorClass):
i
+=
1
i
+=
1
self
.
amt_buy
=
result
[
"total"
]
self
.
amt_buy
=
result
[
"total"
]
adm_jual
=
self
.
vendor_produk
.
produk
.
harga
*
i
harga_pokok
=
result
[
"subtotal"
]
-
rincian
[
"admin"
]
admin
=
self
.
vendor_produk
.
produk
.
harga
*
i
rincian
[
"admin"
]
=
admin
result
[
"subtotal"
]
=
int
(
harga_pokok
)
+
admin
product_id
=
self
.
invoice_det
.
produk
.
id
product_id
=
self
.
invoice_det
.
produk
.
id
if
hasattr
(
self
.
invoice_det
,
"customer_id"
):
if
hasattr
(
self
.
invoice_det
,
"customer_id"
):
partner_id
=
self
.
invoice_det
.
customer_id
partner_id
=
self
.
invoice_det
.
customer_id
else
:
else
:
partner_id
=
self
.
invoice_det
.
h2h_ar_invoice
.
customer_id
partner_id
=
self
.
invoice_det
.
h2h_ar_invoice
.
customer_id
# hitung discount jika discount awal negatif discount + discount awal
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"
]
if
result
[
"discount"
]
<
0
:
self
.
amt_sell
=
int
(
harga_pokok
)
+
adm_jual
self
.
discount
+=
result
[
"discount"
]
result
[
"discount"
]
=
self
.
discount
result
[
"discount"
]
=
self
.
discount
self
.
amt_sell
=
int
(
harga_pokok
)
+
admin
-
self
.
discount
result
[
"total"
]
=
self
.
amt_sell
result
[
"total"
]
=
self
.
amt_sell
result
[
'jml_data'
]
=
i
result
[
'jml_data'
]
=
i
result
[
'rincian'
]
=
rincian
result
[
'rincian'
]
=
rincian
...
...
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