report_view.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_venta_jemachuca"
  5. model="account.invoice"
  6. string="Factura Legal"
  7. report_type="qweb-html"
  8. name="factura_venta_jemachuca.report_invoice_jemachuca"
  9. file="factura_venta_jemachuca.report_invoice_jemachuca"
  10. />
  11. <template id="report_invoice_jemachuca">
  12. <t t-call="report.html_container">
  13. <t t-foreach="[1,2,3]" t-as="i">
  14. <div class="page">
  15. <style>
  16. .borderless td, .borderless th {
  17. border: none !important;
  18. }
  19. .table-condensed>tbody>tr>td {
  20. padding: 1px !important;
  21. }
  22. .table-super-condensed>tbody>tr>td {
  23. padding: 5px !important;
  24. }
  25. </style>
  26. <t t-foreach="docs" t-as="o">
  27. <div class="pagina">
  28. <!--
  29. ======================================================================
  30. CABECERA
  31. ======================================================================
  32. -->
  33. <div style="height:3.3cm;">
  34. <div style="padding-left:8.6cm;padding-top:0.4cm;padding-right:5.0cm;font-size:9px;">
  35. <div>Fecha de Emisión: <span t-field="o.date_invoice" t-field-options='{"format": "dd/MM/yyyy"}'/></div>
  36. <div>Nombre / Razón Social: <span t-field="o.partner_id.name"/></div>
  37. <div>
  38. R.U.C: <span t-field="o.partner_id.ruc"/>
  39. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  40. Cond de Venta: <t t-if="o.contado">Contado</t><t t-if="o.credito">Crédito</t>
  41. </div>
  42. <div>Dir.: <span t-field="o.partner_id.street"/>,<span t-field="o.partner_id.street2"/></div>
  43. <div><span t-field="o.partner_id.state_id.display_name"/>,<span t-field="o.partner_id.country_id.name"/></div>
  44. <div>Nota de Remisión: </div>
  45. </div>
  46. </div>
  47. <!--
  48. ======================================================================
  49. TABLA
  50. ======================================================================
  51. -->
  52. <div style="height:3.5cm;padding-right:0.6cm;">
  53. <div style="font-size:9px;">
  54. <table class="table borderless table-condensed">
  55. <t t-set="valor_exentas" t-value="0"/>
  56. <t t-set="valor_5" t-value="0"/>
  57. <t t-set="valor_10" t-value="0"/>
  58. <tbody>
  59. <tr t-foreach="o.invoice_line" t-as="l">
  60. <!-- CODIGO DE PRODUCTO -->
  61. <td style="width:1cm;overflow: auto; text-align: center;">
  62. <span t-field="l.product_id.id"/>
  63. </td>
  64. <!-- CANTIDAD -->
  65. <td style="width:1.3cm;overflow: auto; text-align: center;">
  66. <span t-field="l.quantity"/>
  67. </td>
  68. <!-- NOMBRE DEL PRODUCTO -->
  69. <td style="width:9.5cm;overflow: auto;">
  70. <span t-field="l.name"/>
  71. </td>
  72. <!-- PRECIO UNITARIO -->
  73. <td style="width:1.7cm;overflow: auto; text-align: right;">
  74. <t t-if="o.currency_id.id == 166">
  75. <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
  76. </t>
  77. <t t-if="o.currency_id.id != 166">
  78. <span t-esc="'{0:,.2f}'.format(l.price_unit)"/>
  79. </t>
  80. </td>
  81. <!-- EXENTAS -->
  82. <td style="width:2.2cm;overflow: auto; text-align: right;">
  83. <span t-if="'IVA 5% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id] and 'IVA 10% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id]">
  84. <t t-if="o.currency_id.id == 166">
  85. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  86. </t>
  87. <t t-if="o.currency_id.id != 166">
  88. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  89. </t>
  90. <t t-set="valor_exentas" t-value="valor_exentas+(l.quantity * l.price_unit)"/>
  91. </span>
  92. </td>
  93. <!-- IVA 5% -->
  94. <td style="width:1.9cm;overflow: auto; text-align: right;">
  95. <span t-if="'IVA 5% Venta' in [ilt.name for ilt in l.invoice_line_tax_id] and 'IVA 10% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id]">
  96. <t t-if="o.currency_id.id == 166">
  97. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  98. </t>
  99. <t t-if="o.currency_id.id != 166">
  100. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  101. </t>
  102. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  103. </span>
  104. </td>
  105. <!-- IVA 10% -->
  106. <td style="width:2.5cm;overflow: auto; text-align: right;">
  107. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  108. <t t-if="o.currency_id.id == 166">
  109. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  110. </t>
  111. <t t-if="o.currency_id.id != 166">
  112. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  113. </t>
  114. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  115. </span>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. </div>
  121. </div>
  122. <!--
  123. ======================================================================
  124. TABLA
  125. ======================================================================
  126. -->
  127. <div style="height:1.9cm;padding-right:0.6cm;">
  128. <div style="font-size:9px;">
  129. <t t-set="total_5" t-value="0"/>
  130. <t t-set="total_10" t-value="0"/>
  131. <t t-set="iva_5" t-value="0"/>
  132. <t t-set="iva_10" t-value="0"/>
  133. <table class="table borderless table-super-condensed">
  134. <tbody>
  135. <!-- LINEA DE SUBTOTALES -->
  136. <tr>
  137. <td style="width:1.0cm;overflow: auto; text-align: center;"></td>
  138. <td style="width:1.3cm;overflow: auto; text-align: center;"></td>
  139. <td style="width:9.5cm;overflow: auto; text-align: center;"></td>
  140. <td style="width:1.7cm;overflow: auto; text-align: center;"></td>
  141. <td style="width:2.2cm;overflow: auto; text-align: right;">
  142. <t t-if="o.currency_id.id == 166">
  143. <span t-esc="'{0:,.0f}'.format(valor_exentas)"/>
  144. </t>
  145. <t t-if="o.currency_id.id != 166">
  146. <span t-esc="'{0:,.2f}'.format(valor_exentas)"/>
  147. </t>
  148. </td>
  149. <td style="width:1.9cm;overflow: auto; text-align: right;">
  150. <t t-if="o.currency_id.id == 166">
  151. <span t-esc="'{0:,.0f}'.format(valor_5)"/>
  152. </t>
  153. <t t-if="o.currency_id.id != 166">
  154. <span t-esc="'{0:,.2f}'.format(valor_5)"/>
  155. </t>
  156. <t t-set="iva_5" t-value="valor_5/21" />
  157. </td>
  158. <td style="width:2.5cm;overflow: auto; text-align: right;">
  159. <t t-if="o.currency_id.id == 166">
  160. <span t-esc="'{0:,.0f}'.format(valor_10)"/>
  161. </t>
  162. <t t-if="o.currency_id.id != 166">
  163. <span t-esc="'{0:,.2f}'.format(valor_10)"/>
  164. </t>
  165. <t t-set="iva_10" t-value="valor_10/11" />
  166. </td>
  167. </tr>
  168. <!-- LINEA TOTAL EN LETRAS Y TOTAL GENERAL -->
  169. <tr>
  170. <td style="width:1.0cm;overflow: auto; text-align: center;"></td>
  171. <td style="width:1.3cm;overflow: auto; text-align: center;"></td>
  172. <td style="width:9.5cm;overflow: auto; text-align: center;">
  173. <div><span t-esc="o.currency_id.local_name"/> : <span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
  174. </td>
  175. <td style="width:1.7cm;overflow: auto; text-align: center;"></td>
  176. <td style="width:2.2cm;overflow: auto; text-align: right;"></td>
  177. <td style="width:1.9cm;overflow: auto; text-align: right;"></td>
  178. <td style="width:2.5cm;overflow: auto; text-align: right;">
  179. <t t-if="o.currency_id.id == 166">
  180. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  181. </t>
  182. <t t-if="o.currency_id.id != 166">
  183. <span t-esc="'{0:,.2f}'.format(o.amount_total)"/>
  184. </t>
  185. </td>
  186. </tr>
  187. <!-- TOTAL DE IVA -->
  188. <tr>
  189. <td style="width:1.0cm;overflow: auto; text-align: center;"></td>
  190. <td style="width:1.3cm;overflow: auto; text-align: center;"></td>
  191. <td style="width:9.5cm;overflow: auto; text-align: center;">
  192. <t t-if="o.currency_id.id == 166">
  193. <div>
  194. IVA 5%:
  195. <t t-if="iva_5 != 0">
  196. <span t-esc="'{0:,.0f}'.format(iva_5)"/>
  197. </t>
  198. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  199. IVA 10%:
  200. <t t-if="iva_10 != 0">
  201. <span t-esc="'{0:,.0f}'.format(iva_10)"/>
  202. </t>
  203. </div>
  204. </t>
  205. <t t-if="o.currency_id.id != 166">
  206. <div>
  207. IVA 5%:
  208. <t t-if="iva_5 != 0">
  209. <span t-esc="'{0:,.2f}'.format(iva_5)"/>
  210. </t>
  211. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  212. IVA 10%:
  213. <t t-if="iva_10 != 0">
  214. <span t-esc="'{0:,.2f}'.format(iva_10)"/>
  215. </t>
  216. </div>
  217. </t>
  218. </td>
  219. <td style="width:1.7cm;overflow: auto; text-align: center;"></td>
  220. <td style="width:2.2cm;overflow: auto; text-align: right;"></td>
  221. <td style="width:1.9cm;overflow: auto; text-align: right;"></td>
  222. <td style="width:2.5cm;overflow: auto; text-align: right;">
  223. <t t-if="o.currency_id.id == 166">
  224. <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
  225. </t>
  226. <t t-if="o.currency_id.id != 166">
  227. <span t-esc="'{0:,.2f}'.format(o.amount_tax)"/>
  228. </t>
  229. </td>
  230. </tr>
  231. </tbody>
  232. </table>
  233. </div>
  234. </div>
  235. <!--
  236. ======================================================================
  237. INFO
  238. ======================================================================
  239. -->
  240. <t t-if="i != 2">
  241. <div style="height:2.4cm;"></div>
  242. </t>
  243. <t t-if="i == 2">
  244. <div style="height:2.1cm;"></div>
  245. </t>
  246. </div>
  247. </t>
  248. </div>
  249. </t>
  250. </t>
  251. </template>
  252. </data>
  253. </openerp>