report_view.xml 21 KB

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