Commit 2b576d2f by Solo Group

VSI

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