Commit b9c38824 by Solo Group
2 parents 6beb2674 70cc56c5
......@@ -235,11 +235,11 @@ class Vendor(VendorClass):
rincian['no_meter'] = data["number"]
if "power" in data:
rincian['power'] = data["power"]
if self.v_produk_kd[:3] == "PLN" and self.v_produk_kd != "PLNPASCA":
harga = "price" in data and data["price"] or 0
pokok = harga and int(re.sub("\D","", self.v_produk_kd))*1000 or 0
admin = int(self.vendor_produk.produk.harga)
#harga = "price" in data and data["price"] or 0
#pokok = harga and int(re.sub("\D","", self.v_produk_kd))*1000 or 0
pokok = int(self.vendor_produk.produk.harga)
admin = 0
rincian["pokok"] = pokok
rincian["admin"] = admin
rincian["denda"] = 0
......@@ -271,6 +271,20 @@ class Vendor(VendorClass):
i = 0
log.info(inquirieses)
for inquiries in inquirieses:
#odeo ngerubah data inquiry
if "tariff" in inquiries and inquiries["tariff"]:
rincian['tarif'] = inquiries["tariff"]
if "number" in inquiries:
rincian['no_meter'] = inquiries["number"]
if "power" in inquiries:
rincian['power'] = inquiries["power"]
if "subscriber_id" in inquiries and inquiries["subscriber_id"]:
result['id_pel'] = inquiries["subscriber_id"]
if "name" in inquiries and inquiries["name"]:
result['nama'] = inquiries["name"]
if "subscriber_name" in inquiries and inquiries["subscriber_name"]:
result['nama'] = inquiries["subscriber_name"]
if "base_price" in inquiries:
pokok += int(inquiries["base_price"])
if "fine" in inquiries:
......@@ -338,7 +352,7 @@ class Vendor(VendorClass):
i += 1
self.amt_buy = data["total"]
self.amt_buy = "total" in data and data["total"] or 0
rincian["pokok"] = pokok
rincian["denda"] = denda
admin = int(self.vendor_produk.produk.harga * i)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!