You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

156 lines
4.2 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>::_("Attendance sheet")::</title>
<link href="/css/print.css" rel="stylesheet"/>
</head>
<body>
<h2>
::contract._amap.name:: -
::__("Distribution of the ::date::, from ::from:: to ::to::",{date:dDate(distrib.date),from:hHour(distrib.date),to:hHour(distrib.end)})::
</h2>
<h2>
::distrib._contract.name:: - ::distrib._contract._vendor.name::
</h2>
<p>
<span class="glyphicon glyphicon-map-marker"></span><b>::_("Place"):: : </b>
::distrib._place.toString()::, ::distrib._place.getAddress()::
</p>
<p>
::set c = contract._contact::
::set v = contract._vendor::
<b>::_("Contact in charge of the contract") :</b> ::c.firstName:: ::c.lastName::, ::c.email::, ::c.phone::
</p>
<p>
<b>::_("Farmer"):: : </b>
::v.name:: ,
::if v.email!=null :: ::v.email:: ::end::,
::if v.phone!=null :: ::v.phone:: ::end::
</p>
<p>
<b>::_("Members on duty"):: : </b>
::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::
</p>
<p>::raw nl2br(distrib._contract._amap.txtDistrib)::</p>
<table class="table table-bordered table-hover" style="width:100%;">
::set total = 0:: <!-- big total -->
::set subtotal = 0:: <!-- total per user -->
::foreach m orders::
::set i = repeat.m.index::
<!-- name change -->
::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2::
<tr class="name">
<td colspan="8">
<span style="font-size:1.3em;">
::set basket = getBasket(m.userId,distrib._place.id,distrib.date)::
<span ::cond basket!=null::>N°::basket.num:: - </span>
::m.userName::
</span>
::set u = getUser(m.userId)::
::if u !=null && u.phone!=null::
- Tél. $$nullSafe(::u.phone::)
::end::
::if m.userName2 != null::
::_("alternately with")::
<span style="font-size:1.3em;">
::m.userName2::
</span>
::set u = getUser(m.userId2):
::if u !=null::
- Tél. $$nullSafe(::u.phone::)
::end::
::end::
</td>
</tr>
<tr>
<th>::_("Qty")::</th>
<th>::_("Ref")::</th>
<th>::_("Product")::</th>
<th>::_("U.P.")::</th>
<th>::_("Sub-total")::</th>
<th>::_("Fees")::</th>
<th>::_("Total")::</th>
<th>::_("Signature")::</th>
</tr>
::end::
<!-- 1 order line -->
<tr class="order">
<td>
::if(m.quantity==0 && m.canceled)::
::_("Canceled")::
::else::
::raw m.smartQt::
::end::
</td>
<td>
$$nullSafe(::m.productRef::)
</td>
<td>
::m.productName::
</td>
<td>
::formatNum(m.productPrice)::&nbsp;::currency()::
</td>
<td>
::formatNum(m.subTotal)::&nbsp;::currency()::
</td>
<td>
<!-- frais -->
::if m.percentageValue!=null::
::formatNum(m.fees)::&nbsp;::currency()::
::end::
</td>
<td>
<!-- total -->
::formatNum(m.total)::&nbsp;::currency()::
::set total = total + m.total::
::set subtotal = subtotal + m.total::
</td>
<td style="width:20%;">
</td>
</tr>
<!-- member total -->
::if (orders[i+1]==null || m.userName != orders[i+1].userName || m.userName2 != orders[i+1].userName2) ::
::if subtotal!=0::
<tr>
<td colspan="5"></td>
<td class="total text-right">::_("TOTAL")::</td>
<td class="total">::formatNum(subtotal)::&nbsp;::currency()::</td>
<td></td>
::set subtotal = 0::
</tr>
::end::
::end::
::end::
<!-- big total -->
<tr style="font-size:1.3em;">
<td class="text-right">::_("Total order:"):: </td>
<td>::formatNum(total)::&nbsp;::currency()::</td>
<td colspan="6"></td>
</tr>
</table>
<p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
</body>
</html>