Commit 2b576d2f by Solo Group

VSI

1 parent 61bbc928
......@@ -78,7 +78,7 @@ ERROR#0056#[56] Nomor Telpon tidak diketahui
import requests
import xmltodict
from ..tools import log
from ..tools import log, JsonRpcError
from .vsi import Vendor as VendorClass
......@@ -99,9 +99,14 @@ class Vendor(VendorClass):
:return:
"""
code = "rc" in data and int(data["rc"]) or 0
if code:
discount = PartnerProduk.get_discount(self.invoice_det)
if code==0:
product_id = self.invoice_det.produk.id
partner_id = self.invoice_det.ar_invoice.customer_id
discount = PartnerProduk.get_discount(partner_id, product_id)
harga = self.vendor_produk.produk.harga
if not harga:
raise JsonRpcError()
else:
discount = 0
harga = 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!