Align refund status transitions with tolerance config
This commit is contained in:
@@ -68,11 +68,11 @@ class AdminPlatformOrderRefundReceiptAccumulateToFullyRefundedTest extends TestC
|
||||
$order->refresh();
|
||||
$this->assertSame('partially_refunded', $order->payment_status);
|
||||
|
||||
// 第二次退款 20 -> 累计 30,应推进到 refunded
|
||||
// 第二次退款 20.01 -> 累计 30.01(超过 tol=0.01),应推进到 refunded
|
||||
$this->post('/admin/platform-orders/' . $order->id . '/add-refund-receipt', [
|
||||
'type' => 'refund',
|
||||
'channel' => 'wechat',
|
||||
'amount' => 20,
|
||||
'amount' => 20.01,
|
||||
'refunded_at' => now()->addMinute()->format('Y-m-d H:i:s'),
|
||||
'note' => '第二次退款',
|
||||
])->assertRedirect();
|
||||
@@ -83,6 +83,6 @@ class AdminPlatformOrderRefundReceiptAccumulateToFullyRefundedTest extends TestC
|
||||
$this->assertNotNull($order->refunded_at);
|
||||
|
||||
$refundSummaryTotal = (float) data_get($order->meta, 'refund_summary.total_amount');
|
||||
$this->assertSame(30.0, $refundSummaryTotal);
|
||||
$this->assertSame(30.01, $refundSummaryTotal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user