114 Commits

Author SHA1 Message Date
8a3f1955d3 fix: collation mismatch in SQL JOINs + billing date fields use uitype:date 2026-05-31 11:44:58 +08:00
78ff190789 feat(credit): redesign credit limit UI with dashboard, overview and management views
- Add hub.ui as main entry with stat cards (total/used/available/usage%)
- Add credit_overview.ui for user's own credit visualization with progress bars
- Add credit_manage.ui for distributor sales to manage customer credits
- Add set_credit_form.ui and set_customer_credit.dspy for credit adjustment
- Add credit_summary.dspy API for stats data
- Enhance creditlimit.py with get_credit_stats, get_my_credit_list, get_all_customer_credits
- Register new functions in init.py with ServerEnv
2026-05-30 21:00:27 +08:00
5fa058add9 fix: correct indentation in leg_accounting credit limit block
Two bugs fixed:
1. FATAL: lines 213-278 were indented inside the 'if new_balance < 0' block,
   causing all normal (positive balance) accounting operations to be skipped.
   All post-credit-check code now correctly at method body level (2 tabs).

2. LOGIC: added else clause to reset used_credit to 0 when balance returns
   to non-negative (e.g. after recharge). Previously used_credit stayed
   stale after account recovered from overdraft.
2026-05-28 23:05:23 +08:00
5da6ddd7d5 feat: expose credit limit functions via ServerEnv and register RBAC paths 2026-05-28 22:39:48 +08:00
9696d4334b feat: 添加信用额度功能
- 新增 credit_limit 表定义和DDL
- 修改 accounting_config.py 支持信用额度透支检查
- 新增 creditlimit.py 信用额度管理模块
- 新增信用额度管理界面和CRUD API
- 支持设置/查询/更新客户信用额度
2026-05-28 19:09:04 +08:00
16163ecdc3 feat: add accounting module stat cards - total balance, daily/monthly consumption, account count
- Create stats.py with get_accounting_stats() helper function
- Add 4 stat widgets: stat_total_balance, stat_today_consumption, stat_month_consumption, stat_account_count
- Update index.ui to display stat cards row above navigation cards
- Register get_accounting_stats in load_accounting()
2026-05-25 18:40:40 +08:00
202fe6b578 bugfix 2026-05-14 17:45:56 +08:00
b2e4b03b82 bugfix 2026-04-15 12:09:14 +08:00
0132b8133d bugfix 2026-04-15 12:05:24 +08:00
48a64a34c7 bugfix 2026-04-15 12:02:12 +08:00
5670126a8e bugfix 2026-04-14 11:47:32 +08:00
e6002ec4a0 bugfix 2026-04-14 11:40:51 +08:00
23f1e62024 bugfix 2026-04-14 11:26:27 +08:00
dfd16e9a7b bugfix 2026-04-14 11:25:42 +08:00
afef7fb9fc bugifx 2026-04-14 11:21:38 +08:00
a833fa6790 bugfix 2026-04-14 10:56:02 +08:00
656205bac2 bugfix 2026-04-14 10:40:02 +08:00
cc8cb54a8a bugfix 2026-04-10 22:40:52 +08:00
4882b1f8a1 bugfix 2026-04-10 22:03:42 +08:00
3328c2fbc1 bugfix 2026-04-10 22:03:04 +08:00
6854b58ff7 bugfix 2026-04-10 22:01:40 +08:00
ac4784bd74 bugfix 2026-04-10 21:59:52 +08:00
9d0ef3ba83 bugfix 2026-04-10 21:58:36 +08:00
fdf33882d7 bugfix 2026-04-10 21:55:23 +08:00
34d45b88e1 bugfix 2026-04-10 21:53:07 +08:00
d933f933ab bugfix 2026-04-10 21:51:35 +08:00
d06e46eec8 bugfix 2026-04-10 21:50:47 +08:00
59755053fc bugfix 2026-04-10 21:48:35 +08:00
9ed93d8969 bugfix 2026-04-10 21:45:03 +08:00
c7d926e8bd bugfix 2026-04-10 21:37:44 +08:00
d1ba7cc808 bugfix 2026-04-10 21:22:53 +08:00
201989d230 bugfix 2026-04-10 21:22:27 +08:00
144f396017 bugfix 2026-04-10 21:20:50 +08:00
2ce679f477 bugfix 2026-04-10 21:19:53 +08:00
9d1dc0880b bugfix 2026-04-10 21:17:48 +08:00
2dffd76d05 bugfix 2026-04-10 21:15:38 +08:00
8613abf6c0 bugfix 2026-04-10 20:45:55 +08:00
905ac8a392 Merge branch 'main' of git.opencomputing.cn:yumoqing/accounting 2026-03-31 13:43:43 +08:00
5a3b7489c0 bugfix 2026-03-31 13:43:21 +08:00
f1074cc3ae bugfix 2026-03-31 10:44:31 +08:00
0a01dd9e69 bugfix 2026-03-30 17:16:47 +08:00
3dec5e2601 bugfix 2026-03-30 14:11:19 +08:00
a302540a7a bugfix 2026-03-30 13:34:53 +08:00
b9fd12d043 bugfix 2026-02-12 15:07:28 +08:00
32c5fa8662 bugfix 2026-02-12 15:01:30 +08:00
dadcced995 bugfix 2026-02-12 14:33:00 +08:00
0ed1678a0f bugfix 2026-02-12 14:31:24 +08:00
0d8440390c bugfix 2026-02-12 14:16:28 +08:00
9c98265898 bugfix 2026-01-29 17:49:00 +08:00
1777e550be bugfix 2026-01-06 16:52:44 +08:00