I have an issue where users are starting to change reservation dates for existing equipment reservations, this has the potential to cause double booking.
I would like to implement an equipment conflict field in the resvmodel that is updated if there is a reservation conflict after a change of the datetime fields. I believe it is possible to do this before saving the record. Can someone confirm?
Conditions below are evaluated after a change in the start or end datetime fields. If true I would like the conflict field to be updated with the reservation ID of the conflicting reservation, a popup notice and maybe even change the table row color.
(resvmodel1 record id != resvmodel2 record id) & (resvmodel1 eqip_id == resvmodel2 eqip_id)
resvmodel1 reservation start < resvmodel2 reservation end
resvmodel1 reservation end > resvmodel2 reservation start
What is the best practice for implementing this. Thanks