diff --git a/accounting/consume.py b/accounting/consume.py index b37d576..2acf74b 100644 --- a/accounting/consume.py +++ b/accounting/consume.py @@ -51,15 +51,16 @@ async def consume_accounting(sor, orderid, order_details): od['curdate'] = curdate ods.append(ConsumeBiz(od)) ao = Accounting(ods) + od = order_details[0] bill = { 'id':billid, - 'customerid':self.customerid, - 'resellerid':self.resellerid, - 'orderid':self.orderid, - 'business_op':self.action, - 'amount':log['transamt'], - 'bill_date':curdate, - 'bill_timestamp':self.timestamp + 'customerid':od.customerid, + 'resellerid':od.resellerid, + 'orderid':od.orderid, + 'business_op':od.action, + 'amount':od.transamt, + 'bill_date':od.curdate, + 'bill_timestamp':od.timestamp } await sor.C('bill', bill.copy()) await ao.do_accounting(sor)