Use accrued amount for booking detail pending
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -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!!,
|
||||
|
||||
Reference in New Issue
Block a user