feat(finance): 历史订单退款按退款日入账
- 迁移 116 新增 refund_adjustment 渠道值,并允许该类行净收入为负 - 销售事实按退款日聚合 archived 订单的已确认退款,写冲减行 - 退款后同时回填原销售日与退款日的事实与总账 - 退款同时重算相关订单项的费用快照(比例费按净收入) - 前端渠道筛选与标签支持「历史退款冲减」
This commit is contained in:
@@ -41,6 +41,7 @@ const FULFILLMENT_MODE_OPTIONS = [
|
||||
{ value: 'third_party_voucher', label: '第三方卡券' },
|
||||
{ value: 'manual', label: '人工客服' },
|
||||
{ value: 'unclassified', label: '未分类' },
|
||||
{ value: 'refund_adjustment', label: '历史退款冲减' },
|
||||
{ value: 'archived', label: '历史归档' },
|
||||
]
|
||||
|
||||
@@ -52,6 +53,7 @@ const FULFILLMENT_MODE_LABEL: Record<string, string> = {
|
||||
manual: '人工客服',
|
||||
archived: '历史归档',
|
||||
unclassified: '未分类',
|
||||
refund_adjustment: '历史退款冲减',
|
||||
}
|
||||
|
||||
const COST_STAGE_LABEL: Record<string, { label: string; color: string }> = {
|
||||
|
||||
@@ -52,6 +52,7 @@ const FULFILLMENT_MODE_LABELS: Record<string, string> = {
|
||||
pending: '待分类',
|
||||
archived: '历史归档',
|
||||
unclassified: '未分类',
|
||||
refund_adjustment: '历史退款冲减',
|
||||
}
|
||||
|
||||
const REASON_LABELS: Record<string, string> = {
|
||||
|
||||
@@ -8,6 +8,7 @@ export type FulfillmentChannel =
|
||||
| 'third_party_voucher'
|
||||
| 'legacy_platform'
|
||||
| 'manual'
|
||||
| 'refund_adjustment'
|
||||
|
||||
/** 商品来源:由 canonical_sku 前缀推导,空串表示未分类。 */
|
||||
export type ProductSource = 'affiliate_dash' | 'work_order' | 'third_party_voucher' | 'manual' | ''
|
||||
|
||||
Reference in New Issue
Block a user