diff --git a/wwwroot/billing.dspy b/wwwroot/billing.dspy index 2e3b78b..2a472f3 100644 --- a/wwwroot/billing.dspy +++ b/wwwroot/billing.dspy @@ -19,7 +19,7 @@ ns = { async with get_sor_context(request._run_ns, 'accounting') as sor: sql = """select d.acc_date, d.acc_timestamp, -case when d.acc_dir = '0' then '借' else '贷' end as acc_dir, +d.acc_dir, d.amount, d.balance, s.name as subject_name, count(*) over() as _total, coalesce(sum(case when d.acc_dir = '0' then d.amount else 0 end) over(), 0) as _debit,