Find Last receiving date from receiving transaction header
2. If last receiving date is equal or earlier than expected delivery date then the program will use expected delivery date for calculation else the program will use last receiving date for calculation
3. If last receiving date/expected delivery date + Cancel order day is earlier than current date then the program will update order status as Closed-partially received in Order head and Order detail, order status date and time is current date and current time in Order head else the program will skip this order and process the next order