Dashboard scanline: treat partially_refunded as refundable for refund trace
This commit is contained in:
@@ -858,8 +858,11 @@
|
||||
|
||||
// 运营扫描用的“治理状态摘要”(不替代下方的治理提示入口,只用于快速判断)
|
||||
// 注意:为避免对“未支付订单”造成误导,回执/对账/退款在非 paid/refunded 时显示 "-"。
|
||||
$isPaid = ((string) $po->payment_status === 'paid');
|
||||
$isRefunded = ((string) $po->payment_status === 'refunded');
|
||||
$paymentStatus = (string) ($po->payment_status ?? '');
|
||||
$isPaid = ($paymentStatus === 'paid');
|
||||
$isRefunded = ($paymentStatus === 'refunded');
|
||||
// partially_refunded 属于“已支付但发生退款”的治理集合:扫描行应展示退款轨迹(避免显示 "-" 造成误判)。
|
||||
$isPartiallyRefunded = ($paymentStatus === 'partially_refunded');
|
||||
|
||||
$receiptStatusText = $isPaid ? ($hasReceiptEvidence ? '有' : '无') : '-';
|
||||
$reconcileStatusText = ($isPaid && $hasReceiptEvidence)
|
||||
@@ -872,7 +875,7 @@
|
||||
// - 有退款且一致:"有"(直达 #add-refund-receipt,便于核对退款轨迹)
|
||||
// - 无退款:"无"
|
||||
$hasRefundTrace = ((float) $po->refundTotal()) > 0;
|
||||
$refundStatusText = ($isPaid || $isRefunded)
|
||||
$refundStatusText = ($isPaid || $isRefunded || $isPartiallyRefunded)
|
||||
? ($po->isRefundInconsistent() ? '异常' : ($hasRefundTrace ? '有' : '无'))
|
||||
: '-';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user