Supporting data : Supporting Data : Standard orders : Adding a standard order : Calculating the start and end date-time of an order based on a standard order
Calculating the start and end date-time of an order based on a standard order
When creating an order, for example a reservation, based on a standard order with subs that have a different start and end date/time, the value on the standard order template is not taken over in determining the start and end date-time of the suborders.
However, the values on the standard order are taken into account when adding the standard order to create a reservation, for example. That is, the start and end date-time of the sub reservations is calculated based upon the start and end date-time of the main reservation.
This means that when an order (reservation) is created (with subs), the delta of the start and end date-time of the main and sub orders as is defined on the standard order is carried through to all its subs.
For instance:
Standard Reservation
BeginDateTime 1.1.2013 9:00
EndDateTime 1.1.2013 17:00
Standard SubReservation
BeginDateTime 1.1.2013 8:30
EndDateTime 1.1.2013 17:30
Standard SubWorkorder
BeginDateTime 1.1.2013 10:00
EndDateTime 1.1.2013 10:15
When a reservation is made from 8:00 - 12:00 based upon the above standard reservation, the result will be:
Reservation
BeginDateTime 14.10.2013 8:00
EndDateTime 14.10.2013 12:00
Standard SubReservation
BeginDateTime 14.10.2013 7:30
EndDateTime 14.10.2013 12:30
Standard SubWorkorder
BeginDateTime 14.10.2013 9:00
EndDateTime 14.10.2013 9:15