parent
fd7078182c
commit
26c86df915
@ -142,16 +142,19 @@ class ProcessDetails extends Controller
|
||||
/** @return array<string,string> */
|
||||
private function filters(Request $request): array
|
||||
{
|
||||
$paidDate = trim((string) $request->query('paid_date', ''));
|
||||
$status = trim((string) $request->query('status', ''));
|
||||
$paidDateValid = preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $paidDate, $dateParts) === 1
|
||||
&& checkdate((int) $dateParts[2], (int) $dateParts[3], (int) $dateParts[1]);
|
||||
[$paidStart, $paidEnd] = ProcessDetailsPageData::normalizePaidDateRange(
|
||||
$request->query('paid_start'),
|
||||
$request->query('paid_end'),
|
||||
$request->query('paid_date'),
|
||||
);
|
||||
$paymentState = DingProcessDetailMirrorRepository::normalizePaymentStateFilter(
|
||||
$request->query('payment_state'),
|
||||
);
|
||||
|
||||
return [
|
||||
'paid_date' => $paidDateValid ? $paidDate : '',
|
||||
'paid_start' => $paidStart,
|
||||
'paid_end' => $paidEnd,
|
||||
'document_type' => mb_substr(trim((string) $request->query('document_type', '')), 0, 100),
|
||||
'status' => mb_substr($status, 0, 20),
|
||||
'payment_state' => $paymentState,
|
||||
|
||||
@ -279,9 +279,24 @@ class DingProcessDetailMirrorRepository
|
||||
{
|
||||
$query->where('ding_process_detail_mirror.source_scope', $this->scope());
|
||||
|
||||
$paidDate = trim((string) ($filters['paid_date'] ?? ''));
|
||||
if (preg_match('/^\d{4}-\d{2}-\d{2}$/', $paidDate) === 1) {
|
||||
$query->where('ding_process_detail_mirror.paid_at', 'like', $paidDate . '%');
|
||||
$paidStart = $this->filterDate($filters['paid_start'] ?? '');
|
||||
$paidEnd = $this->filterDate($filters['paid_end'] ?? '');
|
||||
if ($paidStart === '' && $paidEnd === '') {
|
||||
$paidStart = $this->filterDate($filters['paid_date'] ?? '');
|
||||
$paidEnd = $paidStart;
|
||||
}
|
||||
if ($paidStart !== '' && $paidEnd !== '' && $paidStart > $paidEnd) {
|
||||
[$paidStart, $paidEnd] = [$paidEnd, $paidStart];
|
||||
}
|
||||
if ($paidStart !== '') {
|
||||
$query->where('ding_process_detail_mirror.paid_at', '>=', $paidStart);
|
||||
}
|
||||
if ($paidEnd !== '') {
|
||||
$query->where(
|
||||
'ding_process_detail_mirror.paid_at',
|
||||
'<',
|
||||
Carbon::createFromFormat('Y-m-d', $paidEnd)->addDay()->toDateString(),
|
||||
);
|
||||
}
|
||||
|
||||
foreach ([
|
||||
@ -341,6 +356,17 @@ class DingProcessDetailMirrorRepository
|
||||
END";
|
||||
}
|
||||
|
||||
private function filterDate(mixed $value): string
|
||||
{
|
||||
$date = trim((string) $value);
|
||||
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $date, $parts) !== 1
|
||||
|| ! checkdate((int) $parts[2], (int) $parts[3], (int) $parts[1])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string,string> $filters
|
||||
* @return list<string>
|
||||
|
||||
@ -25,15 +25,6 @@ class DingProcessDetailMirrorSynchronizer
|
||||
|
||||
private const APPROVAL_API_FALLBACK_LIMIT = 50;
|
||||
|
||||
private const STATUS_MAP = [
|
||||
'COMPLETED' => '已完成',
|
||||
'RUNNING' => '审批中',
|
||||
'TERMINATED' => '已终止',
|
||||
'CANCELED' => '已撤销',
|
||||
'CANCELLED' => '已撤销',
|
||||
'REVOKED' => '已撤销',
|
||||
];
|
||||
|
||||
private readonly ConnectionInterface $connection;
|
||||
|
||||
private int $approvalApiAttempts = 0;
|
||||
@ -869,7 +860,7 @@ class DingProcessDetailMirrorSynchronizer
|
||||
$originator = $employees[(string) ($workflow['originatorUserId'] ?? '')]
|
||||
?? $this->originatorFromTitle($title);
|
||||
$documentType = $this->documentType($process, $title);
|
||||
$status = $this->status((string) ($workflow['status'] ?? ''));
|
||||
$status = $this->status($workflow);
|
||||
$businessMonth = $this->businessMonth($businessId, (string) ($workflow['joinAt'] ?? ''));
|
||||
$paymentSourceState = $this->paymentSourceState($process, $fields);
|
||||
$needsPaymentApi = $this->needsApprovalApiFallback(
|
||||
@ -1661,11 +1652,21 @@ class DingProcessDetailMirrorSynchronizer
|
||||
return trim((string) ($process['document_type'] ?? '')) ?: '其他';
|
||||
}
|
||||
|
||||
private function status(string $status): string
|
||||
/** @param array<string,mixed> $workflow */
|
||||
private function status(array $workflow): string
|
||||
{
|
||||
$status = strtoupper(trim($status));
|
||||
$key = DingPayableWorkflowStatus::key($workflow);
|
||||
|
||||
return self::STATUS_MAP[$status] ?? ($status !== '' ? $status : '未知');
|
||||
return match ($key) {
|
||||
'RUNNING' => '审批中',
|
||||
'COMPLETED' => '已完成',
|
||||
'REJECTED' => '已拒绝',
|
||||
'WITHDRAWN' => '已终止',
|
||||
'FAILED' => '失败',
|
||||
'EXPIRED' => '已过期',
|
||||
'DELETED' => '已删除',
|
||||
default => $key !== '' && $key !== 'UNKNOWN' ? $key : '未知',
|
||||
};
|
||||
}
|
||||
|
||||
private function businessMonth(string $businessId, string $joinAt): string
|
||||
|
||||
@ -26,6 +26,26 @@ class ProcessDetailsPageData
|
||||
: self::DEFAULT_PER_PAGE;
|
||||
}
|
||||
|
||||
/** @return array{0:string,1:string} */
|
||||
public static function normalizePaidDateRange(
|
||||
mixed $start,
|
||||
mixed $end,
|
||||
mixed $legacyDate = '',
|
||||
): array {
|
||||
$start = self::normalizeFilterDate($start);
|
||||
$end = self::normalizeFilterDate($end);
|
||||
if ($start === '' && $end === '') {
|
||||
$legacyDate = self::normalizeFilterDate($legacyDate);
|
||||
$start = $legacyDate;
|
||||
$end = $legacyDate;
|
||||
}
|
||||
if ($start !== '' && $end !== '' && $start > $end) {
|
||||
[$start, $end] = [$end, $start];
|
||||
}
|
||||
|
||||
return [$start, $end];
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
public function page(Request $request): array
|
||||
{
|
||||
@ -97,16 +117,19 @@ class ProcessDetailsPageData
|
||||
/** @return array<string,string> */
|
||||
private function filters(Request $request): array
|
||||
{
|
||||
$paidDate = trim((string) $request->query('paid_date', ''));
|
||||
$status = trim((string) $request->query('status', ''));
|
||||
$paidDateValid = preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $paidDate, $dateParts) === 1
|
||||
&& checkdate((int) $dateParts[2], (int) $dateParts[3], (int) $dateParts[1]);
|
||||
[$paidStart, $paidEnd] = self::normalizePaidDateRange(
|
||||
$request->query('paid_start'),
|
||||
$request->query('paid_end'),
|
||||
$request->query('paid_date'),
|
||||
);
|
||||
$paymentState = DingProcessDetailMirrorRepository::normalizePaymentStateFilter(
|
||||
$request->query('payment_state'),
|
||||
);
|
||||
|
||||
return [
|
||||
'paid_date' => $paidDateValid ? $paidDate : '',
|
||||
'paid_start' => $paidStart,
|
||||
'paid_end' => $paidEnd,
|
||||
'document_type' => mb_substr(trim((string) $request->query('document_type', '')), 0, 100),
|
||||
'status' => mb_substr($status, 0, 20),
|
||||
'payment_state' => $paymentState,
|
||||
@ -115,4 +138,15 @@ class ProcessDetailsPageData
|
||||
'keyword' => mb_substr(trim((string) $request->query('keyword', '')), 0, 100),
|
||||
];
|
||||
}
|
||||
|
||||
private static function normalizeFilterDate(mixed $value): string
|
||||
{
|
||||
$date = trim((string) $value);
|
||||
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $date, $parts) !== 1
|
||||
|| ! checkdate((int) $parts[2], (int) $parts[3], (int) $parts[1])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $date;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
$statusClass ??= static fn (string $status): string => match ($status) {
|
||||
'已完成' => 'is-success',
|
||||
'审批中' => 'is-warning',
|
||||
'已终止', '已撤销' => 'is-danger',
|
||||
'已拒绝', '已终止', '已撤销', '失败' => 'is-danger',
|
||||
default => 'is-neutral',
|
||||
};
|
||||
$paymentStateClass = static fn (string $state): string => match ($state) {
|
||||
@ -41,6 +41,8 @@
|
||||
. ($exportFilters === [] ? '' : '?' . http_build_query($exportFilters));
|
||||
@endphp
|
||||
|
||||
@include('business.pages.partials.date-range-picker')
|
||||
|
||||
<style>
|
||||
.process-details-page {
|
||||
display: flex;
|
||||
@ -98,8 +100,16 @@
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.process-details-field.is-date-range {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
.process-details-field.is-business {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.process-details-field.is-keyword {
|
||||
grid-column: span 8;
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.process-details-field label {
|
||||
@ -121,40 +131,8 @@
|
||||
font-size: .8125rem;
|
||||
}
|
||||
|
||||
.process-details-field input[type="date"] {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
.process-details-field input[type="date"]::-webkit-calendar-picker-indicator {
|
||||
cursor: pointer;
|
||||
opacity: .72;
|
||||
}
|
||||
|
||||
.process-details-date-control {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 2.125rem;
|
||||
gap: .35rem;
|
||||
}
|
||||
|
||||
.process-details-date-picker {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2.125rem;
|
||||
height: 2.125rem;
|
||||
padding: 0;
|
||||
border: 1px solid var(--vip-border, #D8D2C7);
|
||||
border-radius: .5rem;
|
||||
background: #fff;
|
||||
color: var(--vip-content-accent-dark, #856632);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.process-details-date-picker:hover,
|
||||
.process-details-date-picker:focus-visible {
|
||||
border-color: var(--vip-content-accent-dark, #856632);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px rgba(133, 102, 50, .2);
|
||||
.process-details-field.is-date-range .upstream-data-date input {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.process-details-field input:focus,
|
||||
@ -548,11 +526,16 @@
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.process-details-field.is-date-range,
|
||||
.process-details-field.is-keyword,
|
||||
.process-details-actions {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.process-details-field.is-business {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.process-details-actions {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
@ -581,6 +564,8 @@
|
||||
|
||||
.process-details-field,
|
||||
.process-details-field.is-wide,
|
||||
.process-details-field.is-business,
|
||||
.process-details-field.is-date-range,
|
||||
.process-details-field.is-keyword,
|
||||
.process-details-actions {
|
||||
grid-column: 1;
|
||||
@ -647,28 +632,52 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="GET" action="{{ $pageUrl }}" class="process-details-toolbar" aria-label="OA流程筛选">
|
||||
<form id="process-details-filter-form" method="GET" action="{{ $pageUrl }}" class="process-details-toolbar" aria-label="OA流程筛选">
|
||||
<input type="hidden" name="per_page" value="{{ $processRows->perPage() }}">
|
||||
<div class="process-details-field">
|
||||
<label for="process-details-paid-date">打款时间</label>
|
||||
<div class="process-details-date-control">
|
||||
<input
|
||||
id="process-details-paid-date"
|
||||
type="date"
|
||||
name="paid_date"
|
||||
value="{{ $filters['paid_date'] ?? '' }}"
|
||||
lang="zh-CN"
|
||||
title="选择打款日期"
|
||||
>
|
||||
<button
|
||||
class="process-details-date-picker"
|
||||
type="button"
|
||||
data-process-date-picker="paid-date"
|
||||
title="打开日历选择打款日期"
|
||||
aria-label="打开日历选择打款日期"
|
||||
>
|
||||
<span class="material-icons-outlined" aria-hidden="true">calendar_today</span>
|
||||
</button>
|
||||
<div class="process-details-field is-date-range">
|
||||
<label for="process-details-paid-start">打款时间</label>
|
||||
<div class="upstream-data-date-range" role="group" aria-label="打款开始至结算时间">
|
||||
<span class="upstream-data-date" data-date-picker>
|
||||
<input
|
||||
id="process-details-paid-start"
|
||||
type="text"
|
||||
name="paid_start"
|
||||
value="{{ $filters['paid_start'] ?? '' }}"
|
||||
readonly
|
||||
autocomplete="off"
|
||||
placeholder="开始日期"
|
||||
aria-label="打款开始日期"
|
||||
data-date-input
|
||||
>
|
||||
<button type="button" class="upstream-data-date__clear" data-date-clear hidden aria-label="清除打款开始日期">
|
||||
<span class="material-icons-outlined" aria-hidden="true">close</span>
|
||||
</button>
|
||||
<button type="button" class="upstream-data-date__pick" data-date-toggle aria-label="选择打款开始日期">
|
||||
<span class="material-icons-outlined" aria-hidden="true">calendar_today</span>
|
||||
</button>
|
||||
<div class="upstream-data-calendar" role="dialog" aria-label="打款开始日期日历" data-date-calendar hidden></div>
|
||||
</span>
|
||||
<b class="upstream-data-date-range__sep">至</b>
|
||||
<span class="upstream-data-date" data-date-picker>
|
||||
<input
|
||||
id="process-details-paid-end"
|
||||
type="text"
|
||||
name="paid_end"
|
||||
value="{{ $filters['paid_end'] ?? '' }}"
|
||||
readonly
|
||||
autocomplete="off"
|
||||
placeholder="结算日期"
|
||||
aria-label="打款结算日期"
|
||||
data-date-input
|
||||
>
|
||||
<button type="button" class="upstream-data-date__clear" data-date-clear hidden aria-label="清除打款结算日期">
|
||||
<span class="material-icons-outlined" aria-hidden="true">close</span>
|
||||
</button>
|
||||
<button type="button" class="upstream-data-date__pick" data-date-toggle aria-label="选择打款结算日期">
|
||||
<span class="material-icons-outlined" aria-hidden="true">calendar_today</span>
|
||||
</button>
|
||||
<div class="upstream-data-calendar" role="dialog" aria-label="打款结算日期日历" data-date-calendar hidden></div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process-details-field">
|
||||
@ -698,7 +707,7 @@
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="process-details-field is-wide">
|
||||
<div class="process-details-field is-business">
|
||||
<label for="process-details-business-id">审批编号</label>
|
||||
<input id="process-details-business-id" type="search" name="business_id" value="{{ $filters['business_id'] ?? '' }}" placeholder="支持包含查询">
|
||||
</div>
|
||||
@ -884,24 +893,9 @@
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const input = document.getElementById('process-details-paid-date');
|
||||
const picker = document.querySelector('[data-process-date-picker="paid-date"]');
|
||||
if (!input || !picker) {
|
||||
return;
|
||||
const form = document.getElementById('process-details-filter-form');
|
||||
if (form && window.CaiWuDatePicker) {
|
||||
window.CaiWuDatePicker.setup(form);
|
||||
}
|
||||
|
||||
picker.addEventListener('click', () => {
|
||||
if (typeof input.showPicker === 'function') {
|
||||
try {
|
||||
input.showPicker();
|
||||
return;
|
||||
} catch (error) {
|
||||
// Fall back to focus when the browser blocks showPicker().
|
||||
}
|
||||
}
|
||||
|
||||
input.focus();
|
||||
input.click();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
@ -82,12 +82,13 @@ class ProcessDetailsPageTest extends FeatureTestCase
|
||||
->assertSee('发起人')
|
||||
->assertSee('单据类型')
|
||||
->assertSee('打款时间')
|
||||
->assertSee('name="paid_date"', false)
|
||||
->assertSee('lang="zh-CN"', false)
|
||||
->assertSee('title="选择打款日期"', false)
|
||||
->assertSee('data-process-date-picker="paid-date"', false)
|
||||
->assertSee('aria-label="打开日历选择打款日期"', false)
|
||||
->assertSee('calendar_today', false)
|
||||
->assertSee('name="paid_start"', false)
|
||||
->assertSee('name="paid_end"', false)
|
||||
->assertSee('placeholder="开始日期"', false)
|
||||
->assertSee('placeholder="结算日期"', false)
|
||||
->assertSee('aria-label="选择打款开始日期"', false)
|
||||
->assertSee('aria-label="选择打款结算日期"', false)
|
||||
->assertSee('CaiWuDatePicker.setup', false)
|
||||
->assertSee('name="payment_state"', false)
|
||||
->assertSee('审批状态')
|
||||
->assertSee('付款状态')
|
||||
|
||||
@ -75,7 +75,7 @@ class DingProcessDetailMirrorRepositoryTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function test_paginate_applies_paid_date_status_and_keyword_filters(): void
|
||||
public function test_paginate_applies_paid_date_range_status_and_keyword_filters(): void
|
||||
{
|
||||
$this->assertSame(
|
||||
1,
|
||||
@ -85,6 +85,20 @@ class DingProcessDetailMirrorRepositoryTest extends TestCase
|
||||
1,
|
||||
$this->repository->paginate(['paid_date' => '2026-02-03'], 1, 50)['total'],
|
||||
);
|
||||
$this->assertSame(
|
||||
2,
|
||||
$this->repository->paginate([
|
||||
'paid_start' => '2026-01-10',
|
||||
'paid_end' => '2026-02-10',
|
||||
], 1, 50)['total'],
|
||||
);
|
||||
$this->assertSame(
|
||||
2,
|
||||
$this->repository->paginate([
|
||||
'paid_start' => '2026-02-10',
|
||||
'paid_end' => '2026-01-10',
|
||||
], 1, 50)['total'],
|
||||
);
|
||||
$this->assertSame(
|
||||
2,
|
||||
$this->repository->paginate(['status' => '审批中'], 1, 50)['total'],
|
||||
|
||||
@ -147,6 +147,37 @@ class DingProcessDetailMirrorSynchronizerTest extends TestCase
|
||||
$this->assertEqualsWithDelta(0.20, (float) $row->payment_difference, 0.001);
|
||||
}
|
||||
|
||||
public function test_completed_but_refused_workflow_is_not_labelled_completed(): void
|
||||
{
|
||||
$this->query->workflows = [[
|
||||
'processInstanceId' => 'process-cashier-refused',
|
||||
'processCode' => 'PROC-ACF09A14-B094-46B1-A9E2-8BB1F4E1FDCF',
|
||||
'businessId' => '202610261048000410425',
|
||||
'title' => '勇武提交的店铺日常报销',
|
||||
'status' => 'COMPLETED',
|
||||
'result' => 'REFUSE',
|
||||
'originatorUserId' => 'user-1',
|
||||
'joinAt' => '2026-10-26 10:49:07',
|
||||
]];
|
||||
$this->query->scheme = [
|
||||
'收款费用明细' => json_encode([[
|
||||
'rowValue' => [
|
||||
['label' => '代发订单金额', 'value' => '1.00'],
|
||||
],
|
||||
]], JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR),
|
||||
'收款合计' => 1,
|
||||
'付款明细' => '[]',
|
||||
];
|
||||
|
||||
$this->synchronizer->sync(true);
|
||||
|
||||
$row = app(DingProcessDetailMirrorRepository::class)
|
||||
->paginate(['business_id' => '202610261048000410425'], 1, 50)['data'][0];
|
||||
$this->assertSame('已拒绝', $row->status);
|
||||
$this->assertSame('terminated', $row->cashier_status);
|
||||
$this->assertSame('不涉及付款', $row->payment_state);
|
||||
}
|
||||
|
||||
public function test_running_workflow_detects_cashier_returned_from_official_tasks(): void
|
||||
{
|
||||
$this->query->workflows = [[
|
||||
|
||||
@ -49,7 +49,8 @@ class ProcessDetailsPageDataTest extends TestCase
|
||||
$repository->expects($this->once())
|
||||
->method('paginate')
|
||||
->with($this->callback(static fn (array $filters): bool =>
|
||||
$filters['paid_date'] === '2026-10-24'
|
||||
$filters['paid_start'] === '2026-10-20'
|
||||
&& $filters['paid_end'] === '2026-10-24'
|
||||
&& $filters['payment_state'] === '已付款'
|
||||
), 2, 50)
|
||||
->willReturn([
|
||||
@ -83,7 +84,12 @@ class ProcessDetailsPageDataTest extends TestCase
|
||||
$data = (new ProcessDetailsPageData($repository))->page(Request::create(
|
||||
'/1/workspace/process-data/oa-process',
|
||||
'GET',
|
||||
['paid_date' => '2026-10-24', 'payment_state' => '出纳已打款', 'page' => 2],
|
||||
[
|
||||
'paid_start' => '2026-10-20',
|
||||
'paid_end' => '2026-10-24',
|
||||
'payment_state' => '出纳已打款',
|
||||
'page' => 2,
|
||||
],
|
||||
));
|
||||
|
||||
$this->assertInstanceOf(LengthAwarePaginator::class, $data['processRows']);
|
||||
@ -93,7 +99,8 @@ class ProcessDetailsPageDataTest extends TestCase
|
||||
$this->assertSame($row, $data['processRows']->items()[0]);
|
||||
$this->assertSame('succeeded', $data['mirrorStatus']);
|
||||
$this->assertSame(11331, $data['summary']['rows']);
|
||||
$this->assertSame('2026-10-24', $data['filters']['paid_date']);
|
||||
$this->assertSame('2026-10-20', $data['filters']['paid_start']);
|
||||
$this->assertSame('2026-10-24', $data['filters']['paid_end']);
|
||||
$this->assertSame('已付款', $data['filters']['payment_state']);
|
||||
$this->assertSame(
|
||||
[
|
||||
@ -110,6 +117,22 @@ class ProcessDetailsPageDataTest extends TestCase
|
||||
$this->assertNull($data['error']);
|
||||
}
|
||||
|
||||
public function test_paid_date_range_accepts_legacy_date_and_normalizes_reversed_range(): void
|
||||
{
|
||||
$this->assertSame(
|
||||
['2026-10-24', '2026-10-24'],
|
||||
ProcessDetailsPageData::normalizePaidDateRange('', '', '2026-10-24'),
|
||||
);
|
||||
$this->assertSame(
|
||||
['2026-10-20', '2026-10-24'],
|
||||
ProcessDetailsPageData::normalizePaidDateRange('2026-10-24', '2026-10-20'),
|
||||
);
|
||||
$this->assertSame(
|
||||
['', ''],
|
||||
ProcessDetailsPageData::normalizePaidDateRange('2026-02-30', 'invalid'),
|
||||
);
|
||||
}
|
||||
|
||||
public function test_unavailable_payment_state_filter_is_cleared_before_querying(): void
|
||||
{
|
||||
$repository = $this->createMock(DingProcessDetailMirrorRepository::class);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user