HI Guys
I have what i think is a complex snippet and need to know if it can be replicated in TB.
Looking at docs i am sure there must be aware but a bit beyond my skill set.
Before committing just need to know its full potential
So it looks like this in code ( 20191009 • Order tracking Version 1 with #calendar/#input - without forms*
*){#settemp -name ##ordered_on -content {#calendar -f ddddd -head Order placed on… -manual -locale en-GB}}( *
*){#settemp -name ##day_offset -content {#input -head Ordered on {#gettemp ##ordered_on} • How many delivery time in days? -def +5 -single -required}}( *
Delivery time expired?*
*){#check -text {#datetime -a -value {#gettemp ##du_day} -locale en-GB} -case < {#datetime -a -locale en-GB} -output Hello Guys Please, could you get one of your Logistics Team members to chase up the shipping status for this order? The order was placed on {#datetime -f dddd, ddddd -value {#gettemp ##ordered_on} -locale en-GB}.
The website shows the shipping for this item is {#gettemp ##day_offset} business days.
This should have been delivered on {#datetime -f dddd, ddddd -value {#gettemp ##du_day} -locale en-GB}
The item is now {#datecalc -date2 {#gettemp ##du_day} -mode 3} business days late! The item is now {#calc {#datetime -a -value {#gettemp ##du_day} -locale en-GB}-{#datetime -a -locale en-GB} -round 0} calendar days late!
I need this to update my customer and avoid cancellation of the order.( *
Delivery time not yet expired → Windows Notification*
*) -else {#balloon -title Delivery time not yet expired: -text ##du_day: {#gettemp ##du_day} -onclick {#datetime -f ddd, ddddd -value {#gettemp ##du_day} -locale en-GB}}}
Hi Mansur
This does not accommodate business days Mon - Fri here in my country. Your cals are counting Weekends. Also is it possible to calculate the end dates
Here is a small adjustments to add end dates and count only business days.
The only part that might be complicated is counting how many business days a delivery is late. I will update this thread once I have a solution.
The order was placed on {formdate: DD/MM/YYYY; name=date}
shipping for this item is: {formtext: name=number; default=1} business days
This should have been delivered on {time: DD/MM/YYYY; shift={=number}D(skip=SAT, SUN); at={=date}; pattern=DD/MM/YYYY}
{calendar=round( (estimated - today) / 24 / 60 / 60); trim=left}
{=calendar} calendar days left
{=[x for x in seq(0, calendar) if {time: DD/MM/YYYY; shift={=x}D(skip=SAT, SUN); at={time: DD/MM/YYYY}; pattern=DD/MM/YYYY}==due][1]} business days left
{calendar=round( (estimated - today) / 24 / 60 / 60); trim=left}
{=calendar} calendar days left
{=[x for x in seq(0, calendar) if {time: DD/MM/YYYY; shift={=x}D(skip=SAT, SUN); at={time: DD/MM/YYYY}; pattern=DD/MM/YYYY}==due][1]} business days left