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.

67 lines
1.6 KiB

  1. ::use 'design.mtt'::
  2. <div class="col-md-12">
  3. <div class="article">
  4. <h2>::_("Global view of orders - from"):: ::hDate(from):: ::_("to"):: ::hDate(to)::</h2>
  5. <div class="text-center">
  6. $$export(/contractAdmin/vendorsByTimeFrame/::from.toString().substr(0,10)::/::to.toString().substr(0,10)::?csv=1)
  7. </div>
  8. <hr/>
  9. ::foreach o orders::
  10. ::set total = 0::
  11. <table class="table table-bordered table-hover table-striped" style="width:100%;">
  12. <tr>
  13. <th colspan="6">
  14. <!--<div class="pull-right">$$export(::"/contractAdmin/ordersByProduct/"+o.contract.id+"?csv=1&d="+o.distrib.id::)</div>-->
  15. <h4>::o.contract.name:: - ::o.contract._vendor.name::</h4>
  16. </th>
  17. </tr>
  18. <tr>
  19. <th>::_("Quantities")::</th>
  20. <th>::_("Product")::</th>
  21. <th>::_("Reference")::</th>
  22. <th>::_("Unit price incl. VAT")::</th>
  23. <th>::_("Total HT")::</th>
  24. <th>::_("Total TTC")::</th>
  25. </tr>
  26. ::foreach m o.orders::
  27. <tr>
  28. <td class="col-md-1">
  29. ::formatNum(m.quantity)::
  30. </td>
  31. <td class="col-md-4">
  32. ::m.pname::
  33. </td>
  34. <td class="col-md-1 ref">
  35. $$nullSafe(::m.ref::)
  36. </td>
  37. <td class="col-md-2">
  38. ::formatNum(m.priceTTC)::&nbsp;::currency()::
  39. </td>
  40. <td class="col-md-2">
  41. ::formatNum(m.totalHT)::&nbsp;::currency()::
  42. </td>
  43. <td class="col-md-2">
  44. ::formatNum(m.totalTTC)::&nbsp;::currency()::
  45. </td>
  46. ::set total = total + m.totalTTC::
  47. </tr>
  48. ::end::
  49. <tr style="background:#DDD;">
  50. <th colspan="5">::_("Total")::</th>
  51. <th>::formatNum(total)::&nbsp;::currency()::</th>
  52. </tr>
  53. </table>
  54. ::end::
  55. </div>
  56. </div>
  57. ::end::