CaiWuXiTong/app/Utilities/FinanceLedgerFlowSummaryDataSource.php
shanshi 92554baf0f feat(财务台账): 增加数据来源未填写筛选 (#1197)
账户资金汇总数据来源筛选新增未填写选项,并准确区分空白与已维护数据。
2026-11-16 16:09:46 +08:00

22 lines
456 B
PHP

<?php
namespace App\Utilities;
final class FinanceLedgerFlowSummaryDataSource
{
public const MANUAL = '手动';
public const DIRECT = '银企直连';
public const FILTER_UNFILLED = '__empty__';
public const OPTIONS = [self::MANUAL, self::DIRECT];
public static function normalize(mixed $value): string
{
$text = trim((string) ($value ?? ''));
return in_array($text, self::OPTIONS, true) ? $text : '';
}
}