CaiWuXiTong/app/Utilities/FinanceLedgerAccountType.php
shanshi 20dc695549 feat: 完善财务台账账户维护与分页体验 (#412)
合并账户维护、筛选、列设置、无刷新分页、录入模板及批量映射工具。
2026-10-21 11:00:56 +08:00

32 lines
686 B
PHP

<?php
namespace App\Utilities;
final class FinanceLedgerAccountType
{
public const DEFAULT_OPTIONS = [
'个人卡',
'公户',
'支付宝',
'网商银行',
];
public static function options(array ...$groups): array
{
$types = self::DEFAULT_OPTIONS;
foreach ($groups as $group) {
foreach ($group as $type) {
$type = trim((string) $type);
if ($type !== '') {
$types[] = $type;
}
}
}
$types = array_values(array_unique($types));
sort($types, SORT_NATURAL | SORT_FLAG_CASE);
return $types;
}
}