::contract._amap.name:: - ::__("Distribution of the ::date::, from ::from:: to ::to::",{date:dDate(distrib.date),from:hHour(distrib.date),to:hHour(distrib.end)})::

::distrib._contract.name:: - ::distrib._contract._vendor.name::

::_("Place"):: : ::distrib._place.toString()::, ::distrib._place.getAddress()::

::set c = contract._contact:: ::set v = contract._vendor:: ::_("Contact in charge of the contract") : ::c.firstName:: ::c.lastName::, ::c.email::, ::c.phone::

::_("Farmer"):: : ::v.name:: , ::if v.email!=null :: ::v.email:: ::end::, ::if v.phone!=null :: ::v.phone:: ::end::

::_("Members on duty"):: : ::if distrib._distributor1!=null:: ::distrib._distributor1.getName()::, ::end:: ::if distrib._distributor2!=null:: ::distrib._distributor2.getName()::, ::end:: ::if distrib._distributor3!=null:: ::distrib._distributor3.getName()::, ::end:: ::if distrib._distributor4!=null:: ::distrib._distributor4.getName():: ::end::

::raw nl2br(distrib._contract._amap.txtDistrib)::

::set total = 0:: ::set subtotal = 0:: ::foreach m orders:: ::set i = repeat.m.index:: ::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2:: ::end:: ::if (orders[i+1]==null || m.userName != orders[i+1].userName || m.userName2 != orders[i+1].userName2) :: ::if subtotal!=0:: ::set subtotal = 0:: ::end:: ::end:: ::end::
::set basket = getBasket(m.userId,distrib._place.id,distrib.date):: N°::basket.num:: - ::m.userName:: ::set u = getUser(m.userId):: ::if u !=null && u.phone!=null:: - Tél. $$nullSafe(::u.phone::) ::end:: ::if m.userName2 != null:: ::_("alternately with"):: ::m.userName2:: ::set u = getUser(m.userId2): ::if u !=null:: - Tél. $$nullSafe(::u.phone::) ::end:: ::end::
::_("Qty"):: ::_("Ref"):: ::_("Product"):: ::_("U.P."):: ::_("Sub-total"):: ::_("Fees"):: ::_("Total"):: ::_("Signature")::
::if(m.quantity==0 && m.canceled):: ::_("Canceled"):: ::else:: ::raw m.smartQt:: ::end:: $$nullSafe(::m.productRef::) ::m.productName:: ::formatNum(m.productPrice):: ::currency():: ::formatNum(m.subTotal):: ::currency():: ::if m.percentageValue!=null:: ::formatNum(m.fees):: ::currency():: ::end:: ::formatNum(m.total):: ::currency():: ::set total = total + m.total:: ::set subtotal = subtotal + m.total::
::_("TOTAL"):: ::formatNum(subtotal):: ::currency()::
::_("Total order:"):: ::formatNum(total):: ::currency()::