Compare commits
No commits in common. "d97dbec22b499c1de1d2dcc16eb3a50f0b259f31" and "da2f6c19fd78942fe00eab760533a0d84ff359fb" have entirely different histories.
d97dbec22b
...
da2f6c19fd
@ -10,19 +10,6 @@ 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,8 +2,7 @@ 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.accounting_config import AccountingOrgs
|
from accounting_config import AccountingOrgs
|
||||||
from accounting.bill import write_bill
|
|
||||||
|
|
||||||
def load_accounting():
|
def load_accounting():
|
||||||
g = ServerEnv()
|
g = ServerEnv()
|
||||||
@ -15,4 +14,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