::use 'contractadmin/design.mtt'::

::_("Summary table per product")::

::if distribution!=null::

::set date = hDate(distribution.date):: ::raw __("Delivery of the ::date::",{date:date})::

::end::

::_("Be careful, if the price of the product was modified during the sale, every order of a member is taken into account with the price as it was at the time of the creation of the order")::

::set total = 0:: ::foreach m orders:: ::end::
::_("Weight/Vol."):: ::_("Quantities"):: ::_("Product"):: ::_("Reference"):: ::_("Unit Price incl. VAT"):: ::_("Total")::
::raw m.weightOrVolume:: ::formatNum(m.quantity):: ::m.pname:: $$nullSafe(::m.ref::) ::formatNum(m.priceTTC):: ::currency():: ::formatNum(m.totalTTC):: ::currency():: ::set total = total + m.totalTTC::
Total ::formatNum(total):: ::currency()::
::if distribution!=null:: $$export(/contractAdmin/ordersByProduct/::c.id::?csv=1&d=::distribution.id::) ::_("Order form"):: ::else:: $$export(/contractAdmin/ordersByProduct/::c.id::?csv=1) ::_("Order form"):: ::end:: ::end::