1
0
forked from erp-dev/erp

feat: add discount_amount to payment_order and receipt_order, and change total_amount logic

This commit is contained in:
2025-12-04 09:36:59 +08:00
parent 0b8146d972
commit d8eb66821e
19 changed files with 1144 additions and 398 deletions

View File

@@ -13,7 +13,12 @@
| 对方主体 | `supplier` (供应商 ID) | `customer` (客户 ID) |
| 日期 | `payment_date` | `receipt_date` |
| 金额 | `amount`,必须 > 0 | `amount`,必须 > 0 |
| 其他 | `remarks`(可选) | `remarks`(可选) |
| 银行账户 | `bank_account`(可选,引用 `BankAccount` | `bank_account`(可选) |
| 附言 | `markup`(可选,记录票据附言) | `markup`(可选) |
| 备注 | `remarks`(可选,内部备注) | `remarks`(可选) |
| 折扣 | `discount_amount`可选≥0可大于 `amount` | 同左 |
> 结算金额 = `amount + discount_amount`,所有余额调整与对账单统计均以结算金额为准,响应中通过只读字段 `settlement_amount` 展示。
创建成功返回 `201`,包含新建单据 ID、状态默认 `PENDING`)与提示信息。