This commit is contained in:
ping 2026-05-29 11:40:24 +08:00
parent c98b33c30f
commit ceb8fe28f3
2 changed files with 1245 additions and 4 deletions

View File

@ -1069,10 +1069,10 @@ async def finance_billing_overview(ns=None):
include_sub = _parse_bool(ns.get('include_sub_reseller_customers'), True)
only_accounted = _parse_bool(ns.get('only_accounted'), False)
try:
max_bills = int(ns.get('max_bills', 5000) or 5000)
max_bills = int(ns.get('max_bills', 50000) or 50000)
except (TypeError, ValueError):
max_bills = 5000
max_bills = max(100, min(max_bills, 20000))
max_bills = 50000
max_bills = max(100, min(max_bills, 200000))
db = DBPools()
async with db.sqlorContext(DBNAME) as sor:
@ -1228,11 +1228,13 @@ async def finance_billing_overview(ns=None):
return {'status': True, 'msg': 'ok', 'data': data}
_report = params_kw.get('report') or params_kw.get('api') or 'order_list'
# _report = params_kw.get('report') or params_kw.get('api') or 'order_list'
_report = None
if _report in ('overview', 'billing_overview', 'finance_billing_overview'):
ret = await finance_billing_overview(params_kw)
elif _report in ('detail', 'order_detail'):
ret = await finance_order_report_detail(params_kw)
else:
ret = await finance_order_report(params_kw)
return ret
return ret

File diff suppressed because it is too large Load Diff