report_view.xml 21 KB

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