feat(settlement): 合伙人账单生成后直接同步并支持打款凭证
去掉总部发送与合伙人确认,财务打款后上传凭证,合伙人即可查看状态。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- 应付大于 0 的合伙人账单直接同步为未打款(去掉发送 / 合伙人确认 / 驳回)。
|
||||
-- 零元账单保持 PENDING_REVIEW,不同步给合伙人。
|
||||
-- 打款凭证照片列与门店账单一致。
|
||||
|
||||
ALTER TABLE `partner_bill`
|
||||
ADD COLUMN `payment_proof_urls` JSON NULL AFTER `payment_ref`;
|
||||
|
||||
UPDATE `partner_bill`
|
||||
SET `status` = 'UNPAID',
|
||||
`reject_reason` = NULL,
|
||||
`sent_at` = COALESCE(`sent_at`, CURRENT_TIMESTAMP(3))
|
||||
WHERE `total_amount` > 0
|
||||
AND `status` IN ('PENDING_REVIEW', 'AWAITING_CONFIRM', 'REJECTED');
|
||||
Reference in New Issue
Block a user