::fill head::

::user._amap.name::

::_("Delivery of the"):: ::hDate(date)::

::end:: ::fill tableHeader:: ::_("Contract"):: ::_("Qty"):: ::_("Product"):: ::_("U.P."):: ::_("Fees"):: ::_("Total"):: ::_("Signature"):: ::end:: ::set name = "":: ::set name2 = "":: ::set total = 0:: ::set productNum = 0:: ::set currentContract = "":: ::foreach m orders:: ::if m.userName != name || m.userName2 != name2:: ::if name != "":: ::raw "
":: ::end:: ::raw "" :: ::raw "
::set basket = getBasket(m.userId,place.id,date):: N°::basket.num:: - ::m.userName:: ::set total = 0:: ::set productNum = 0:: ::set u = getUser(m.userId): ::if u!=null && u.phone!=null:: Tél: $$nullSafe(::u.phone::) ::end:: ::user._amap.name::
::if m.userName2 != null:: ::_("alternately with")::
::m.userName2:: ::set total = 0:: ::set productNum = 0:: ::end::
::if m.userName2 != null:: ::set u = getUser(m.userId2): ::if u !=null:: $$nullSafe(::u.phone::) ::end:: ::end:: ::_("Delivery of the"):: ::hDate(date)::
" :: ::raw "":: ::raw tableHeader:: ::end:: ::if m.userName != name || m.userName2 != name2:: ::set class="name":: ::set currentContract = "":: ::else:: ::set class="":: ::end:: ::if currentContract != short(m.contractName,40) :: ::if currentContract == "" :: ::set td_style="font-size:" + fontRatio + "%" :: ::else:: ::set td_style="font-size:" + fontRatio + "%;border-top: 2px solid #AAA;" :: ::end:: ::set currentContract = short(m.contractName,40):: ::else:: ::end:: ::set name = m.userName :: ::set name2 = m.userName2 :: ::set next = orders[repeat.m.index+1]:: ::if next==null || next.userName!=name || next.userName2!=name2:: ::end:: ::end::

::raw nl2br(user.getAmap().txtDistrib)::

::short(m.contractName,40):: ::if(m.quantity==0 && m.canceled):: ::_("Canceled"):: ::else:: ::raw m.smartQt:: ::end:: ::set productNum = productNum+m.quantity:: ::m.productName:: ::formatNum(m.productPrice):: ::currency():: ::if m.fees!=null:: ::formatNum(m.fees):: ::currency():: ::end:: ::formatNum(m.total):: ::currency():: ::set total = total + m.total::
::formatNum(productNum):: ::_("TOTAL"):: ::formatNum(total):: ::currency()::
::foreach r sqlLog:: ::end::
::r.t::ms ::r.length:: Exp Stack ::r.sql::