::use 'design.mtt'::

::_("Last orders")::

::if constOrders.length>0::

::_("CSA Contracts")::

::foreach c constOrders::

::c.contract.name::

::set total = 0:: ::foreach m c.orders:: ::end::
::_("Qty||short version for quantity"):: ::_("Product"):: ::_("U.P||short version of price per unit"):: ::_("Sub-total"):: ::_("Fees"):: ::_("Total"):: ::_("Paid")::
::raw m.smartQt:: ::m.productName:: ::if m.userName2 != null::
::_("Order alternated with"):: ::if user.id == m.userId:: ::m.userName2:: ::else:: ::m.userName:: ::end:: ::end::
::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:: ::if m.paid==true:: ::_("Paid"):: ::else:: ::_("Unpaid"):: ::end::
Total : ::formatNum(total):: ::currency():: ::set d = c.contract.getDistribs(false,null).length:: ( soit ::formatNum(d*total):: ::currency():: pour ::d:: livraisons )
::end::
::end:: ::if count(varOrders)>0::
::foreach d varOrders::

::_("Order delivered on"):: ::hDate(d.date)::

::set total = 0:: ::foreach o d.orders:: ::end::
::_("Qty||short version for quantity"):: ::_("Product"):: ::_("U.P||short version of price per unit"):: ::_("Sub-total"):: ::_("Fees"):: ::_("Total"):: ::_("Paid")::
::raw o.smartQt:: ::o.productName:: ::formatNum(o.productPrice):: ::currency():: ::formatNum(o.subTotal):: ::currency():: $$nullSafe(::formatNum(o.fees)::) ::formatNum(o.total):: ::currency():: ::set total = total + o.total:: ::if o.paid==true:: ::_("Paid"):: ::else:: ::_("Unpaid"):: ::end::
::if !user._amap.hasPayments():: $$edit(Modifier cette commande,/contract/editOrderByDate/::d.date::) ::end:: TOTAL ::formatNum(total):: ::currency()::
::end::
::end::

::_("Profile")::

$$contact(::user::)

$$edit(::_("Edit")::,/account/edit)
::if user.getAmap().hasPayments()::

::_("Payments")::

::_("Balance"):: : ::if userAmap.balance<0:: ::set color = "C00":: ::else:: ::set color = "0C0":: ::end:: ::userAmap.balance:: ::currency():: ::_("Payments details")::
::end:: ::if user.isAmapManager()::

::_("Tutorials")::

::foreach t tutos:: ::end::
::t.name:: ::if t.completion==null:: ::_("Start"):: ::else:: ::_("Stop"):: ::end::
::if stopTuto::
::end::
::end::

::_("Language")::

::_("Display the interface in another language"):: (beta) :

::_("Current language is"):: ::langText::

::end::