confirm(::if text==null::'Confirmer cette action ?'::else::'::escapeJS(text)::'::end::) ::if id == null && def != null:: ::def:: ::else:: /file/::makeFileSign(id)::.jpg ::end:: $$browseCustom(::b::,::url::,Page ::b.page:: ::if b.pages::/::b.pages:: ::end::) < ::if b.prev::::_("Previous")::::else:: ::_("Previous"):: ::end:: | ::custom:: | ::if b.next::::_("Next")::::else:: ::_("Next"):: ::end:: > ::if text==null::::else::::text::::end::  ::text::  ::text:: ::if text!=null && text!=""::  ::text:: ::end:: ::_("Excel/CSV Export"):: ::if v==true:: ::else:: ::end:: ::if(v==true || v==1):: ::else:: ::end::
::dow::
::d::
::m::
::if place!=null::
::place::
::end::
::place::
$$nullSafe(::place.address1::) $$nullSafe(::place.address2::) $$nullSafe(::place.zipCode::) $$nullSafe(::place.city::)
::if Std.parseInt(h)<=12:: ::_("THIS MORNING"):: ::elseif Std.parseInt(h)<18:: CET
::_("AFTERNOON")::
::else:: ::_("THIS EVENING"):: ::end::
::if place!=null::
::place::
::end::
::if u!=null:: ::u.firstName:: ::u.lastName::
::u.email::
::u.phone::
::else:: ::_("No contact"):: ::end::
::raw msg::
::set x = t.getTypeIndex():: ::if x==0::  ::_("Order"):: ::elseif x==1::  ::raw _("CSA contract"):: ::elseif x==2:: ::_("Payment"):: ::t.getPaymentTypeName():: ::else:: ::_("Subscription"):: ::end:: ::if t.pending==true:: ::else:: ::end:: ::t.name::
::if x==2 && t.pending==true:: ::if(t.getPaymentType()=="check"):: ::_("Check to be given at the collection of products"):: ::elseif(t.getPaymentType()=="cash"):: ::_("Cash to be given at the collection of products"):: ::elseif(t.getPaymentType()=="transfer"):: ::_("This transfer must be validated by a coordinator"):: ::else:: ::t.name::
::hDate(t.date):: ::end:: ::else:: ::hDate(t.date):: ::end:: ::if(t.amount<0):: - ::end:: ::formatNum(Math.abs(t.amount)):: ::currency():: ::set class=""::
::_("Back"):: ::set now = Date.now()::
::set open = 0:: ::set notyetopened = 0:: ::set closed = 0:: ::foreach d k:: ::if d.orderStartDate!=null:: ::if now.getTime() > d.orderStartDate.getTime() && now.getTime() < d.orderEndDate.getTime():: ::set open = open+1:: ::elseif now.getTime() > d.orderEndDate.getTime():: ::set closed = closed+1:: ::else:: ::set notyetopened = notyetopened+1:: ::end:: ::else:: ::set closed = closed+1:: ::end:: ::end::
::set x = getDate(k[0].date):: $$date(::x.dow::,::x.d::,::x.m::,::x.y::,::k[0]._place::)
::x.h+":"+x.i::
::if (open==k.length):: ::elseif(closed==k.length):: ::elseif(notyetopened==k.length):: ::else:: ::end:: ::k[0]._contract._amap.name::
::foreach d k:: ::end::
::if d.orderStartDate!=null:: ::if now.getTime() > d.orderStartDate.getTime() && now.getTime() < d.orderEndDate.getTime():: ::elseif now.getTime() > d.orderEndDate.getTime():: ::else:: ::end:: ::else:: ::end:: ::set c = getCatalog(d):: ::c.name::   ::if showBtns:: ::end::