pos_receipt.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <templates>
  2. <t t-extend="PosTicket">
  3. <t t-jquery="div.pos-sale-ticket" t-operation="replace">
  4. <div class="pos-sale-ticket" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 15px;'>
  5. <div class="pos-center-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
  6. Date.CultureInfo.formatPatterns.longTime)"/>
  7. <br/>
  8. <t t-esc="order.get('name')"/></div>
  9. <br/>
  10. <t t-if="widget.pos.config.receipt_header">
  11. <div style='text-align:center;font-size: 20px;'>
  12. <t t-esc="widget.pos.config.receipt_header" />
  13. </div>
  14. <br />
  15. </t>
  16. Vendedor: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/>
  17. <t t-if="order.attributes.client">
  18. <br/>
  19. Cliente: <t t-esc="order.attributes.client.name ? order.attributes.client.name : ''"/><br/>
  20. Teléfono: <t t-esc="order.attributes.client.phone ? order.attributes.client.phone : ''"/><br/><br/>
  21. <!-- Dirección: <t t-esc="order.attributes.client.address ? order.attributes.client.address : ''"/> -->
  22. </t>
  23. <table class="table table-condensed">
  24. <thead>
  25. <tr>
  26. <th>Producto</th>
  27. <th class="text-right">Cant.</th>
  28. <th class="text-right">Precio</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <colgroup>
  33. <col width='50%'/>
  34. <col width='20%'/>
  35. <col width='30%'/>
  36. </colgroup>
  37. <tr t-foreach="orderlines" t-as="orderline">
  38. <td>
  39. <t t-esc="orderline.get_product().display_name"/>
  40. <t t-if="orderline.get_discount() > 0">
  41. <div class="pos-disc-font">
  42. Con <t t-esc="orderline.get_discount()"/>% descuento
  43. </div>
  44. </t>
  45. </td>
  46. <td>
  47. <t t-esc="orderline.get_quantity_str_with_unit()"/>
  48. </td>
  49. <td class="pos-right-align">
  50. <t t-esc="widget.format_currency(orderline.get_display_price())"/>
  51. </td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. <br />
  56. <table>
  57. <tr>
  58. <td>Subtotal:</td>
  59. <td class="pos-right-align">
  60. <t t-esc="widget.format_currency(order.getTotalTaxExcluded())"/>
  61. </td>
  62. </tr>
  63. <t t-foreach="order.getTaxDetails()" t-as="taxdetail">
  64. <tr>
  65. <td><t t-esc="taxdetail.name" /></td>
  66. <td class="pos-right-align">
  67. <t t-esc="widget.format_currency(taxdetail.amount)"/>
  68. </td>
  69. </tr>
  70. </t>
  71. <tr>
  72. <td>Descuento:</td>
  73. <td class="pos-right-align">
  74. <t t-esc="widget.format_currency(order.getDiscountTotal())"/>
  75. </td>
  76. </tr>
  77. <tr class="emph">
  78. <td>Total:</td>
  79. <td class="pos-right-align" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 20px;'>
  80. <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>
  81. </td>
  82. </tr>
  83. </table>
  84. <br/>
  85. <table>
  86. <tr t-foreach="paymentlines" t-as="line">
  87. <td>
  88. <t t-esc="line.name"/>
  89. </td>
  90. <td class="pos-right-align">
  91. <t t-esc="widget.format_currency(line.get_amount())"/>
  92. </td>
  93. </tr>
  94. </table>
  95. <table>
  96. <tr><td>Change:</td><td class="pos-right-align">
  97. <t t-esc="widget.format_currency(order.getChange())"/>
  98. </td></tr>
  99. </table>
  100. <t t-if="widget.pos.config.receipt_footer">
  101. <br />
  102. <div style='text-align:center'>
  103. <t t-esc="widget.pos.config.receipt_footer" />
  104. </div>
  105. </t>
  106. </div>
  107. </t>
  108. </t>
  109. </templates>