bugfix
This commit is contained in:
parent
a4fa0037fb
commit
567e451a32
@ -10,6 +10,19 @@ from .accounting_config import get_accounting_config, AccountingOrgs
|
|||||||
from .businessdate import get_business_date
|
from .businessdate import get_business_date
|
||||||
# from .settle import SettleAccounting
|
# from .settle import SettleAccounting
|
||||||
|
|
||||||
|
async def write_bill(sor, customerid, userid, orderid, business_op, amount):
|
||||||
|
bill = DictObject()
|
||||||
|
bill.customerid = customerid
|
||||||
|
bill.id = getID()
|
||||||
|
bill.userid = userid
|
||||||
|
bill.orderid = orderid
|
||||||
|
bill.business_op = business_op
|
||||||
|
bill.amount = amount
|
||||||
|
bill.bill_date = await get_business_date(sor)
|
||||||
|
bill_state = '0'
|
||||||
|
await sor.C('bill', bill.copy())
|
||||||
|
return bill
|
||||||
|
|
||||||
class BillAccounting:
|
class BillAccounting:
|
||||||
def __init__(self, bill):
|
def __init__(self, bill):
|
||||||
self.curdate = bill['bill_date']
|
self.curdate = bill['bill_date']
|
||||||
|
@ -2,7 +2,8 @@ from appPublic.registerfunction import RegisterFunction
|
|||||||
from appPublic.dictOBject import DictObject
|
from appPublic.dictOBject import DictObject
|
||||||
from appPublic.log import debug, exception, error
|
from appPublic.log import debug, exception, error
|
||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
from accounting_config import AccountingOrgs
|
from accounting.accounting_config import AccountingOrgs
|
||||||
|
from accounting.bill import write_bill
|
||||||
|
|
||||||
def load_accounting():
|
def load_accounting():
|
||||||
g = ServerEnv()
|
g = ServerEnv()
|
||||||
@ -14,4 +15,4 @@ def load_accounting():
|
|||||||
g.open_provider_account = open_provider_account
|
g.open_provider_account = open_provider_account
|
||||||
g.open_owner_account = open_owner_account
|
g.open_owner_account = open_owner_account
|
||||||
g.get_customer_balance = get_customer_balance
|
g.get_customer_balance = get_customer_balance
|
||||||
|
g.write_bill = write_bill
|
||||||
|
Loading…
Reference in New Issue
Block a user