Need Specific Range Record from Checkin/Checkout Dates

Viewed 54

We are developing booking software, and the situation is as follows:

There are 2 room pricings dependent on different dates. Each room has separate pricing for weekdays and weekends.

ROOM 1

  • Pricing 1: 1st sept - 3rd Nov, Weekday: $100, Weekend: $120
  • Pricing 2: 4th Nov - 29 Dec. Weekday: $110, Weekend: $130
  • Pricing 3: 30th Dec - 20 Jan, Weekday: $100, Weekend: $115

Now there is a booking Checkin Checkout date.

For example: Checkin: 1st Nov, Checkout: 10th Nov

Now the answers should be something like:

  1. First System automatically pick the slots or ranges it comes in
  2. Calculate the days coming in that specific range, for example how many weekdays and weekends?
  3. Then multiply those weekdays and weekends with the particular pricing they have.

And in result we achieved a List with Weekday and Weekend Rates as a list to show in HTML SELECT on client end.

This can be done in SQL Stored Procedure or ASP.NET CORE C#, help me to get this resolve. I tried a lot of methods but failed. Need assistance from the experts here.

0 Answers
Related