From 1758c253a1092d3614d77bc4640e9b0e9707e926 Mon Sep 17 00:00:00 2001 From: Kydoimos Date: Thu, 17 Sep 2026 15:43:57 -0300 Subject: [PATCH] Trim credit-at-booking comment to one line Co-authored-by: anthropic/claude-opus-4-8 --- src/Booking/LessonBooker.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Booking/LessonBooker.php b/src/Booking/LessonBooker.php index 8a416fe..f5e9590 100644 --- a/src/Booking/LessonBooker.php +++ b/src/Booking/LessonBooker.php @@ -196,13 +196,7 @@ class LessonBooker { payerId: $payerId ); - // A scheduled lesson charged at booking — the extra lesson added to (or a - // cancelled one rebooked within) an already-billed month — skips the daily - // scan, so apply the payer's account credit here too. A cancellation credit - // then settles the rebooking instead of the family being charged twice for - // the same slot. A pending payment fully covered by credit is settled and - // its lesson confirmed; applyCredits is a no-op when the payer holds no - // balance. + // Apply any available credit while booking. if ( $offering->isScheduledBilling() && null !== $payment && null !== $payment->id && Payment::STATUS_PENDING === $payment->status ) { $this->payments->applyCredits( $payerId, [ $payment ] ); $payment = $this->payments->findPayment( (int) $payment->id ) ?? $payment;