bugfix
This commit is contained in:
parent
d392edb8c1
commit
055463afc3
@ -15,7 +15,6 @@ class ConsumeBiz(PFBiz):
|
|||||||
self.db = DBPools()
|
self.db = DBPools()
|
||||||
self.action = od.action
|
self.action = od.action
|
||||||
self.orderid = od['orderid']
|
self.orderid = od['orderid']
|
||||||
self.curdate = await get_business_date(sor)
|
|
||||||
self.timestamp = timestampstr()
|
self.timestamp = timestampstr()
|
||||||
self.action = od['action']
|
self.action = od['action']
|
||||||
self.billid = getID()
|
self.billid = getID()
|
||||||
@ -46,9 +45,12 @@ class ConsumeBiz(PFBiz):
|
|||||||
async def consume_accounting(sor, orderid, order_details):
|
async def consume_accounting(sor, orderid, order_details):
|
||||||
ods = []
|
ods = []
|
||||||
billid = getID()
|
billid = getID()
|
||||||
|
env = ServerEnv()
|
||||||
|
curdate = await env.get_business_date(sor)
|
||||||
for od in order_details:
|
for od in order_details:
|
||||||
od['billid'] = billid
|
od['billid'] = billid
|
||||||
od['orderid'] = orderid
|
od['orderid'] = orderid
|
||||||
|
od['curdate'] = curdate
|
||||||
ods.append(ConsumeBiz(od))
|
ods.append(ConsumeBiz(od))
|
||||||
ao = Accounting(ods)
|
ao = Accounting(ods)
|
||||||
bill = {
|
bill = {
|
||||||
@ -58,7 +60,7 @@ async def consume_accounting(sor, orderid, order_details):
|
|||||||
'orderid':self.orderid,
|
'orderid':self.orderid,
|
||||||
'business_op':self.action,
|
'business_op':self.action,
|
||||||
'amount':log['transamt'],
|
'amount':log['transamt'],
|
||||||
'bill_date':self.curdate,
|
'bill_date':curdate,
|
||||||
'bill_timestamp':self.timestamp
|
'bill_timestamp':self.timestamp
|
||||||
}
|
}
|
||||||
await sor.C('bill', bill.copy())
|
await sor.C('bill', bill.copy())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user