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.

70 lines
1.9 KiB

  1. ::use 'contractadmin/design.mtt'::
  2. <h3>::_("Summary table per product")::</h3>
  3. ::if distribution!=null::
  4. <p>
  5. ::set date = hDate(distribution.date)::
  6. ::raw __("Delivery of the <b>::date::</b>",{date:date})::
  7. </p>
  8. ::end::
  9. <p>
  10. ::_("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")::
  11. </p>
  12. ::set total = 0::
  13. <table class="table table-bordered table-hover" style="width:100%;">
  14. <tr>
  15. <th>::_("Weight/Vol.")::</th>
  16. <th>::_("Quantities")::</th>
  17. <th>::_("Product")::</th>
  18. <th>::_("Reference")::</th>
  19. <th>::_("Unit Price incl. VAT")::</th>
  20. <th>::_("Total")::</th>
  21. </tr>
  22. ::foreach m orders::
  23. <tr>
  24. <td>
  25. ::raw m.weightOrVolume::
  26. </td>
  27. <td>
  28. ::formatNum(m.quantity)::
  29. </td>
  30. <td>
  31. ::m.pname::
  32. </td>
  33. <td class="ref">
  34. $$nullSafe(::m.ref::)
  35. </td>
  36. <td>
  37. ::formatNum(m.priceTTC)::&nbsp;::currency()::
  38. </td>
  39. <td>
  40. ::formatNum(m.totalTTC)::&nbsp;::currency()::
  41. ::set total = total + m.totalTTC::
  42. </td>
  43. </tr>
  44. ::end::
  45. <tr style="background:#DDD;">
  46. <th colspan="5">Total</th>
  47. <th>::formatNum(total)::&nbsp;::currency()::</th>
  48. </tr>
  49. </table>
  50. ::if distribution!=null::
  51. $$export(/contractAdmin/ordersByProduct/::c.id::?csv=1&d=::distribution.id::)
  52. <a href="/contractAdmin/ordersByProductList/::c.id::?d=::distribution.id::" class="btn btn-default btn-sm">
  53. <span class="glyphicon glyphicon-list"></span> ::_("Order form")::</a>
  54. ::else::
  55. $$export(/contractAdmin/ordersByProduct/::c.id::?csv=1)
  56. <a href="/contractAdmin/ordersByProductList/::c.id::" class="btn btn-default btn-sm">
  57. <span class="glyphicon glyphicon-list"></span> ::_("Order form")::</a>
  58. ::end::
  59. ::end::