Hi Everyone,
Just got my first takeaway setup,
I have used a formula I found on the forum to help me put the requested time of the delivery or pickup on the Ticket as below:
<J11>Requested: | [=Math.floor((TN(FD('{TICKET TIME}','HH')) * 60 + TN(FD('{TICKET TIME}','mm')) + {TICKET TAG:Pickup Minutes}) / 60) + ':' + (TN(FD('{TICKET TIME}','HH')) * 60 + TN(FD('{TICKET TIME}','mm')) + {TICKET TAG:Pickup Minutes}) % 60] [=Math.floor((TN(FD('{TICKET TIME}','HH')) * 60 + TN(FD('{TICKET TIME}','mm')) + {TICKET TAG:Delivery Minutes}) / 60) + ':' + (TN(FD('{TICKET TIME}','HH')) * 60 + TN(FD('{TICKET TIME}','mm')) + {TICKET TAG:Delivery Minutes}) % 60]
as you can see, due to I have Pickup minutes and delivery minutes as tags ( as a result of matching online order tags from gloria food) I only managed to use a duplication of the same formula to calculate them seperatly.
My question is,
- is there any better ways to do this? or a complish the calculation with a single formula?
- this calculation works fine until we have a 0 in the time, it doesn’t display 0 for some reason. eg. 18:30 displayed on the ticket as 18:3 , or 18:08 on the ticket it will be displayed as 18:8. is there anyway I can force the format in order for it to display correctly?
Thank you for your help.