First of all, I have seen similar topics where this feature is requested and I know it's not offered yet.
I also made the appropriate studying of the code and have gathered the pieces of code I need to utilize/replicate in order to check for the new availability, and also for any additional (if the new date is later), or less (if the new date is sooner) fees that may occur by changing the original departing date.
The problem is I can't find a proper screen to implement the feature while keeping it meaningful but also elegant. Let me explain what I mean.
- One candidate was the Bookings > Bookings page, but it, being a Viewing page, doesn't make much sense to offer Editing capabilities there. Also, technically, because it's using your Data Grid framework, I'm not sure it would be easy or even possible to implement.
- Another candidate was the Bookings > Bookings Editing page (the one opening when you click on the little edit/pen icon). The problems there are quite many. First, it doesn't include at all the arriving/departing dates. OK, they could be easily included by altering the appropriate queries, even though they are pulled from the bookings_rooms table. But still I'm not sure it makes sense to simply display the dates in two fields, and let the admin alter them once and make the script alter all departing dates of all rooms a single booking may contain.
- Then, I thought I should create again in the Bookings > Bookings Editing page a Reservation Details room table, similar to the one present in the Description or Invoice links where the dates would be editable for each of the rooms included within a single booking. However, that would still be technically impossible, as the Editing page is also utilizing the Data Grid framework, making what can be displayed (custom made) in the page extremely limited.
- Then, I thought to add a little calendar icon between the edit/pen icon and the recycle bin icon, which would open a new page where I could display the table mentioned above and change there the desired dates, performing also the necessary availability/cost checks. This, while seeming the best solution, it is again either very hard or not possible at all to implement, because adding this calendar icon without changing the Data Grid framework's class to display it is not possible.
As you see and as I said before, I want the implementation to also be elegant besides being functional.
So, I'm mostly addressing this to the script's devs. Where do you think I should implement the feature? Where would/will you implement it when/if you decide to offer it in a future version of the script?
Thanks in advance.