pos.xml 5.3 KB

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