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;