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 70cc56c5
authored
Oct 07, 2019
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pln pre odeo
1 parent
13f3f078
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
src/agratek/api/merchant/views/odeo/__init__.py
src/agratek/api/merchant/views/odeo/__init__.py
View file @
70cc56c
...
...
@@ -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
)
...
...
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