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.

156 lines
4.2 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>::_("Attendance sheet")::</title>
  6. <link href="/css/print.css" rel="stylesheet"/>
  7. </head>
  8. <body>
  9. <h2>
  10. ::contract._amap.name:: -
  11. ::__("Distribution of the ::date::, from ::from:: to ::to::",{date:dDate(distrib.date),from:hHour(distrib.date),to:hHour(distrib.end)})::
  12. </h2>
  13. <h2>
  14. ::distrib._contract.name:: - ::distrib._contract._vendor.name::
  15. </h2>
  16. <p>
  17. <span class="glyphicon glyphicon-map-marker"></span><b>::_("Place"):: : </b>
  18. ::distrib._place.toString()::, ::distrib._place.getAddress()::
  19. </p>
  20. <p>
  21. ::set c = contract._contact::
  22. ::set v = contract._vendor::
  23. <b>::_("Contact in charge of the contract") :</b> ::c.firstName:: ::c.lastName::, ::c.email::, ::c.phone::
  24. </p>
  25. <p>
  26. <b>::_("Farmer"):: : </b>
  27. ::v.name:: ,
  28. ::if v.email!=null :: ::v.email:: ::end::,
  29. ::if v.phone!=null :: ::v.phone:: ::end::
  30. </p>
  31. <p>
  32. <b>::_("Members on duty"):: : </b>
  33. ::if distrib._distributor1!=null:: ::distrib._distributor1.getName()::, ::end::
  34. ::if distrib._distributor2!=null:: ::distrib._distributor2.getName()::, ::end::
  35. ::if distrib._distributor3!=null:: ::distrib._distributor3.getName()::, ::end::
  36. ::if distrib._distributor4!=null:: ::distrib._distributor4.getName():: ::end::
  37. </p>
  38. <p>::raw nl2br(distrib._contract._amap.txtDistrib)::</p>
  39. <table class="table table-bordered table-hover" style="width:100%;">
  40. ::set total = 0:: <!-- big total -->
  41. ::set subtotal = 0:: <!-- total per user -->
  42. ::foreach m orders::
  43. ::set i = repeat.m.index::
  44. <!-- name change -->
  45. ::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2::
  46. <tr class="name">
  47. <td colspan="8">
  48. <span style="font-size:1.3em;">
  49. ::set basket = getBasket(m.userId,distrib._place.id,distrib.date)::
  50. <span ::cond basket!=null::>N°::basket.num:: - </span>
  51. ::m.userName::
  52. </span>
  53. ::set u = getUser(m.userId)::
  54. ::if u !=null && u.phone!=null::
  55. - Tél. $$nullSafe(::u.phone::)
  56. ::end::
  57. ::if m.userName2 != null::
  58. ::_("alternately with")::
  59. <span style="font-size:1.3em;">
  60. ::m.userName2::
  61. </span>
  62. ::set u = getUser(m.userId2):
  63. ::if u !=null::
  64. - Tél. $$nullSafe(::u.phone::)
  65. ::end::
  66. ::end::
  67. </td>
  68. </tr>
  69. <tr>
  70. <th>::_("Qty")::</th>
  71. <th>::_("Ref")::</th>
  72. <th>::_("Product")::</th>
  73. <th>::_("U.P.")::</th>
  74. <th>::_("Sub-total")::</th>
  75. <th>::_("Fees")::</th>
  76. <th>::_("Total")::</th>
  77. <th>::_("Signature")::</th>
  78. </tr>
  79. ::end::
  80. <!-- 1 order line -->
  81. <tr class="order">
  82. <td>
  83. ::if(m.quantity==0 && m.canceled)::
  84. ::_("Canceled")::
  85. ::else::
  86. ::raw m.smartQt::
  87. ::end::
  88. </td>
  89. <td>
  90. $$nullSafe(::m.productRef::)
  91. </td>
  92. <td>
  93. ::m.productName::
  94. </td>
  95. <td>
  96. ::formatNum(m.productPrice)::&nbsp;::currency()::
  97. </td>
  98. <td>
  99. ::formatNum(m.subTotal)::&nbsp;::currency()::
  100. </td>
  101. <td>
  102. <!-- frais -->
  103. ::if m.percentageValue!=null::
  104. ::formatNum(m.fees)::&nbsp;::currency()::
  105. ::end::
  106. </td>
  107. <td>
  108. <!-- total -->
  109. ::formatNum(m.total)::&nbsp;::currency()::
  110. ::set total = total + m.total::
  111. ::set subtotal = subtotal + m.total::
  112. </td>
  113. <td style="width:20%;">
  114. </td>
  115. </tr>
  116. <!-- member total -->
  117. ::if (orders[i+1]==null || m.userName != orders[i+1].userName || m.userName2 != orders[i+1].userName2) ::
  118. ::if subtotal!=0::
  119. <tr>
  120. <td colspan="5"></td>
  121. <td class="total text-right">::_("TOTAL")::</td>
  122. <td class="total">::formatNum(subtotal)::&nbsp;::currency()::</td>
  123. <td></td>
  124. ::set subtotal = 0::
  125. </tr>
  126. ::end::
  127. ::end::
  128. ::end::
  129. <!-- big total -->
  130. <tr style="font-size:1.3em;">
  131. <td class="text-right">::_("Total order:"):: </td>
  132. <td>::formatNum(total)::&nbsp;::currency()::</td>
  133. <td colspan="6"></td>
  134. </tr>
  135. </table>
  136. <p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
  137. </body>
  138. </html>