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.
 
 
 
 
 
 

137 lines
3.4 KiB

::use 'design.mtt'::
<div id="content" class="col-md-8">
<div class="article">
<h2>::_("Order"):: ::c.name::</h2>
<!--::if distribution!=null::
::_("For the delivery of the"):: <b>::hDate(distribution.date)::</b>
::end::
<hr/>-->
<p>
::raw _("Key-in here your orders in advance for this supplier.<br/>You can check your current orders any time on the following page <a href=\"/contract\">my account</a>.<br/>Tip: to remove an order please key-in the quantity 0")::
</p>
<form name="order" id="order" method="POST" action="">
<input type="hidden" name="token" value="::token::"/>
<!--::if distribution!=null::
<input type="hidden" name="distribution" value="::distribution.id::"/>
::end::-->
<table class="table table-bordered table-striped" style="background:white;" >
<tr>
<td></td>
<th>::_("Product")::</th>
<th>::_("Price")::</th>
::foreach d userOrders::
::if d.distrib==null::
<th>::_("Qty")::</th>
::else::
<th class="text-center">::dDate(d.distrib.date)::</th>
::end::
::end::
</tr>
::if userOrders.length>0::
::foreach uo userOrders[0].datas::
<tr>
<td>
<img src="::uo.product.getImage()::" style="width:32px;height:32px;" />
</td>
<td>
<span ::cond uo.product.organic:: title ="Agriculture biologique" data-toggle="tooltip" data-placement="bottom">
<img src="/img/AB.png"/>&nbsp;
</span>
<a href="#" onclick="_.overlay('/shop/productInfo/::uo.product.id::','::escapeJS(uo.product.getName())::')">
::uo.product.getName()::
</a>
</td>
<td>
::set price = uo.product.price + uo.product._contract.computeFees(uo.product.price)::
::formatNum(price)::&nbsp;::currency()::
</td>
::set i = repeat.uo.index::
::foreach d userOrders::
<td class="text-center">
::set o = d.datas[i]::
::if o.order==null::
::if d.distrib==null::
<!-- contrat amap-->
<input type="text" class="form-control" name="::"d-p"+o.product.id::" id="product::o.product.id::" value="" />
::else::
<input type="text" class="form-control" name="::"d"+d.distrib.id+"-p"+o.product.id::" id="product::o.product.id::" value="" />
::end::
::else::
::o.order.quantity::
::end::
</td>
::end::
</tr>
::end::
::else::
<tr>
<td colspan="4">::_("There is currently no open order")::</td>
</tr>
::end::
<tr>
<th colspan="3" class="text-right">Total</th>
::foreach d userOrders::
<th>
::set total=0::
::foreach o d.datas::
::if o.order!=null::
::set q = o.order.quantity::
::set price = o.product.price + o.product._contract.computeFees(o.product.price)::
::set total = total+(q*price)::
::end::
::end::
::formatNum(total)::&nbsp;::currency()::
</th>
::end::
</tr>
</table>
<input type="submit" class="btn btn-primary" value="::_("Validate the order")::" name="submit" id="submit" />
</form>
</div>
</div>
<div class="col-md-4">
<div class="article">
<p>
::_("Supplier:"):: <b>::c._vendor.name::</b>
</p>
<p>
::_("Contact in charge:"):: $$contact(::c._contact::)
</p>
</div>
</div>
::end::