Hi! I’m building a logistics app in Bubble called TruckPro Parking Manager for managing truck stop bookings.
I already have the booking form and database set up, but I need help fixing the billing logic, which must calculate:
R10/hour from 6 AM to 9 PM
R140 flat rate from 9 PM to 6 AM
I’d also like basic advice on how to complete the admin dashboard (viewing and marking bookings as paid).
The app is already built, and I can share the editor link. Please let me know your availability and cost to help finish this in the next day or two. Thank you!
I already have the booking form and database set up, with start_time and end_time as date fields. Now I need to calculate the total price based on these rules.
Suggested Logic:
Loop through the booking period and apply:
R$10 per hour for each hour between 6:00 and 21:00
R$140 flat for any overnight period between 21:00 and 6:00 (regardless of exact duration within that window)
Example pseudocode:
total = 0
current_time = start_time
WHILE current_time < end_time:
IF current_time is between 6 AM and 9 PM:
total += 10
current_time += 1 hour
ELSE:
next_morning = current_time changed to next 6 AM
total += 140
current_time = next_morning
How I plan to implement it:
Use a backend workflow or custom event in Bubble to loop through the time range
Use :extract hour, :change hours, :plus hours, and conditional steps to determine which rate to apply
Store the result in a price_total field
Admin Dashboard
Also, I want to finish a basic admin dashboard where I can:
View all bookings in a repeating group
See the calculated total
Mark bookings as paid (update a paid yes/no field)