Use accrued amount for booking detail pending
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-29 23:40:44 +05:30
parent a946521c5a
commit 3a2afa264f

View File

@@ -251,8 +251,9 @@ class BookingFlow(
val totalNightlyRate = roomsToShow.sumOf { it.nightlyRate ?: 0L }
val expectedPay = computeExpectedPayTotal(stays, booking.expectedCheckoutAt, booking.property.timezone)
val accruedPay = computeExpectedPay(stays, booking.property.timezone)
val amountCollected = paymentRepo.sumAmountByBookingId(bookingId)
val pending = expectedPay - amountCollected
val pending = accruedPay - amountCollected
return BookingDetailResponse(
id = booking.id!!,