style: Pint 포맷팅 적용

This commit is contained in:
김보곤
2026-02-25 11:45:01 +09:00
parent 68b1622a4e
commit 9a7c548246
199 changed files with 1420 additions and 1083 deletions

View File

@@ -227,7 +227,7 @@ public function summary(): JsonResponse
$adjustedDate = $this->getAdjustedPaymentDate($tenantId, $nextMonth->year, $nextMonth->month, $paymentDay);
}
$isAdjusted = !$originalDate->isSameDay($adjustedDate);
$isAdjusted = ! $originalDate->isSameDay($adjustedDate);
// 청구기간: 결제일 기준 전월 1일 ~ 결제일
$billingStart = $adjustedDate->copy()->subMonth()->startOfMonth();
@@ -283,7 +283,7 @@ public function updatePrepayment(Request $request): JsonResponse
$tenantId = session('selected_tenant_id', 1);
$yearMonth = $this->getBillingYearMonth($tenantId);
$items = collect($request->input('items', []))->filter(fn($item) => ($item['amount'] ?? 0) > 0)->values()->toArray();
$items = collect($request->input('items', []))->filter(fn ($item) => ($item['amount'] ?? 0) > 0)->values()->toArray();
$amount = collect($items)->sum('amount');
$prepayment = CorporateCardPrepayment::updateOrCreate(
@@ -328,6 +328,7 @@ private function getBillingYearMonth(int $tenantId): string
private function createPaymentDate(int $year, int $month, int $day): Carbon
{
$maxDay = Carbon::create($year, $month)->daysInMonth;
return Carbon::create($year, $month, min($day, $maxDay));
}
@@ -367,7 +368,7 @@ private function getAdjustedPaymentDate(int $tenantId, int $year, int $month, in
private function calculateBillingUsage(int $tenantId, string $startDate, string $endDate, array $cardNumbers): array
{
// 카드번호 정규화 (하이픈 제거) + 원본↔정규화 매핑
$normalizedNums = array_map(fn($num) => str_replace('-', '', $num), $cardNumbers);
$normalizedNums = array_map(fn ($num) => str_replace('-', '', $num), $cardNumbers);
if (empty($normalizedNums)) {
return ['total' => 0, 'perCard' => []];