fix:납입일 변경 시 지급예정일(scheduled_payment_date)도 함께 재계산되도록 수정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-20 13:24:37 +09:00
parent 2430c39738
commit ef007a582a

View File

@@ -448,6 +448,11 @@ public function updateCommissionDate(int $id, Request $request)
$updateData[$autoField] = $autoDate;
}
// 납입일 변경 시 지급예정일(scheduled_payment_date)도 재계산
if (in_array($field, ['first_payment_at', 'second_payment_at'])) {
$updateData['scheduled_payment_date'] = \Carbon\Carbon::parse($date)->addMonth()->day(10)->format('Y-m-d');
}
$commission->update($updateData);
$response = [