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.

178 lines
4.4 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. <!-- page head-->
  10. ::fill head::
  11. <td >
  12. <h1 style='text-align:right;'>::user._amap.name::</h1>
  13. <h2 style='text-align:right;'>::_("Delivery of the"):: ::hDate(date)::</h2>
  14. </td>
  15. ::end::
  16. <!-- table header -->
  17. ::fill tableHeader::
  18. <tr>
  19. <th>::_("Contract")::</th>
  20. <th>::_("Qty")::</th>
  21. <th>::_("Product")::</th>
  22. <th>::_("U.P.")::</th>
  23. <th>::_("Fees")::</th>
  24. <th>::_("Total")::</th>
  25. <th>::_("Signature")::</th>
  26. </tr>
  27. ::end::
  28. ::set name = ""::
  29. ::set name2 = ""::
  30. ::set total = 0::
  31. ::set productNum = 0::
  32. ::set currentContract = ""::
  33. ::foreach m orders::
  34. ::if m.userName != name || m.userName2 != name2::
  35. ::if name != ""::
  36. ::raw "</table> <hr />"::
  37. ::end::
  38. ::raw "<table style='width:100%;'>" ::
  39. <tr>
  40. <td style='width:33%;'>
  41. <b style="font-size:150%;">
  42. ::set basket = getBasket(m.userId,place.id,date)::
  43. <span ::cond basket!=null::>N°::basket.num:: - </span>
  44. ::m.userName::
  45. </b>
  46. ::set total = 0::
  47. ::set productNum = 0::
  48. </td>
  49. <td>
  50. ::set u = getUser(m.userId):
  51. ::if u!=null && u.phone!=null::
  52. Tél: $$nullSafe(::u.phone::)
  53. ::end::
  54. </td>
  55. <td style='text-align:right;'>
  56. <b>::user._amap.name::</b>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>
  61. ::if m.userName2 != null::
  62. ::_("alternately with")::<br/>
  63. <b>::m.userName2::</b>
  64. ::set total = 0::
  65. ::set productNum = 0::
  66. ::end::
  67. </td>
  68. <td>
  69. ::if m.userName2 != null::
  70. ::set u = getUser(m.userId2):
  71. ::if u !=null::
  72. $$nullSafe(::u.phone::)
  73. ::end::
  74. ::end::
  75. </td>
  76. <td style='text-align:right;'>
  77. <b>::_("Delivery of the"):: ::hDate(date)::</b>
  78. </td>
  79. </tr>
  80. ::raw "</table>" ::
  81. ::raw "<table style='width:100%;'>"::
  82. ::raw tableHeader::
  83. ::end::
  84. ::if m.userName != name || m.userName2 != name2::
  85. ::set class="name"::
  86. ::set currentContract = ""::
  87. ::else::
  88. ::set class=""::
  89. ::end::
  90. <tr class="::class::">
  91. ::if currentContract != short(m.contractName,40) ::
  92. ::if currentContract == "" ::
  93. ::set td_style="font-size:" + fontRatio + "%" ::
  94. ::else::
  95. ::set td_style="font-size:" + fontRatio + "%;border-top: 2px solid #AAA;" ::
  96. ::end::
  97. <td style="::td_style::" >
  98. ::short(m.contractName,40)::
  99. </td>
  100. ::set currentContract = short(m.contractName,40)::
  101. ::else::
  102. <td> </td>
  103. ::end::
  104. <td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
  105. ::if(m.quantity==0 && m.canceled)::
  106. ::_("Canceled")::
  107. ::else::
  108. ::raw m.smartQt::
  109. ::end::
  110. ::set productNum = productNum+m.quantity::
  111. </td>
  112. <td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
  113. ::m.productName::
  114. </td>
  115. <td>
  116. ::formatNum(m.productPrice)::&nbsp;::currency()::
  117. </td>
  118. <td>
  119. ::if m.fees!=null::
  120. ::formatNum(m.fees)::&nbsp;::currency()::
  121. ::end::
  122. </td>
  123. <td>
  124. ::formatNum(m.total)::&nbsp;::currency()::
  125. ::set total = total + m.total::
  126. </td>
  127. <td style="width:20%;"></td>
  128. </tr>
  129. ::set name = m.userName ::
  130. ::set name2 = m.userName2 ::
  131. <!--TOTAL-->
  132. ::set next = orders[repeat.m.index+1]::
  133. ::if next==null || next.userName!=name || next.userName2!=name2::
  134. <tr>
  135. <td style="border-top: 2px solid #AAA;"></td>
  136. <td class="total">::formatNum(productNum)::</td>
  137. <td class="total" colspan="2"></td>
  138. <td class="total">::_("TOTAL")::</td>
  139. <td class="total" style="font-size: ::fontRatio::%;">::formatNum(total)::&nbsp;::currency()::</td>
  140. <td></td>
  141. </tr>
  142. ::end::
  143. ::end::
  144. <p>::raw nl2br(user.getAmap().txtDistrib)::</p>
  145. <p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
  146. <table class="" ::cond sqlLog::>
  147. ::foreach r sqlLog::
  148. <tr ::attr class if(r.bad) 'badSql'::>
  149. <td>::r.t::ms</td>
  150. <td>::r.length::</td>
  151. <td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
  152. <td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
  153. <td>::r.sql::</td>
  154. </tr>
  155. ::end::
  156. </table>
  157. </body>
  158. </html>