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.

62 lines
1.3 KiB

  1. ::use 'contractadmin/design.mtt'::
  2. <div>
  3. <a href="/contractAdmin/stats/::c.id::/?stat=0">
  4. ::_("Seniority of subscribers")::
  5. </a> |
  6. <a href="/contractAdmin/stats/::c.id::/?stat=1">
  7. ::_("Sharing between orders")::
  8. </a><br/>
  9. </div>
  10. ::if stat==0::
  11. <h3>
  12. ::__("Seniority of subscribers of ::contract::",{contract:c.name})::
  13. </h3>
  14. <table class="table" style="width:50%;">
  15. <tr>
  16. <th>::_("Number")::</th>
  17. <th>::_("Year")::</th>
  18. </tr>
  19. ::foreach a anciennete::
  20. <tr>
  21. <td>::a.cnt::</td>
  22. <td>::a.uyear::</td>
  23. </tr>
  24. ::end::
  25. </table>
  26. ::end::
  27. ::if stat==1::
  28. <h3>::_("Sharing between orders of"):: "::c.name::"</h3>
  29. <table class="table">
  30. <tr>
  31. <th>::_("Quantity")::</th>
  32. <th>::_("Product")::</th>
  33. <th>::_("Total price")::</th>
  34. <th>::_("% of orders")::</th>
  35. </tr>
  36. ::foreach r repartition::
  37. <tr>
  38. <td>::r.quantity::</td>
  39. <td>::r.name::</td>
  40. <td>::r.quantity*r.price:: ::currency()::</td>
  41. <td>::r.percent:: %</td>
  42. </tr>
  43. ::end::
  44. <tr>
  45. <th colspan="2">Total: ::totalQuantity:: ::_("products")::</th>
  46. <th>::totalPrice:: ::currency()::</th>
  47. <th></th>
  48. </tr>
  49. </table>
  50. $$export(/contractAdmin/stats/::c.id::?csv=1&stat=1)
  51. ::end::
  52. ::end::