factura_venta_suceso.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_venta_suceso"
  5. model="account.invoice"
  6. string="Factura Legal"
  7. report_type="qweb-html"
  8. name="factura_venta_suceso.report_factura_suceso"
  9. file="factura_venta_suceso.report_factura_suceso"
  10. />
  11. <template id="report_factura_suceso">
  12. <t t-call="report.html_container">
  13. <t t-foreach="[1,2,3]" t-as="i">
  14. <div class="page">
  15. <style>
  16. .logo{
  17. height: 1.71cm;
  18. width: 100%;
  19. top: 0px;
  20. }
  21. .table-condensed>tbody>tr>td {
  22. padding: 1px !important;
  23. }
  24. .borderless td, .borderless th {
  25. border: none !important;
  26. }
  27. .logo1{
  28. height: 2.61cm;
  29. width: 100%;
  30. top: 0px;
  31. }
  32. .logo2{
  33. height: 3.30cm;
  34. width: 100%;
  35. top: 0px;
  36. }
  37. </style>
  38. <t t-foreach="docs" t-as="o">
  39. <div class="pagina">
  40. <div class="logo"> </div>
  41. <!--
  42. ======================================================================
  43. CABECERA
  44. ======================================================================
  45. -->
  46. <div style="height:2cm;">
  47. <div style="padding-top:0.4cm;padding-right:5.0cm;font-size:11px;font-family: Arial;">
  48. <div>
  49. <b>Fecha de Emisión: </b><span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/>
  50. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  51. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  52. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  53. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  54. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  55. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  56. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  57. <b>Condición de Venta: </b><t t-if="o.contado">Contado</t><t t-if="o.credito">Crédito</t>
  58. </div>
  59. <div>
  60. <b>Nombre o Razón Social: </b><span t-field="o.partner_id.name"/>
  61. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  62. &amp;nbsp;
  63. <b>R.U.C y/o C.I.N°: </b><span t-field="o.partner_id.ruc"/>
  64. </div>
  65. <div>
  66. <b>Dirección: </b><span t-field="o.partner_id.street"/>
  67. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  68. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  69. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  70. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  71. <b>Teléfono: </b><span t-field="o.partner_id.mobile"/>
  72. </div>
  73. <div>
  74. <b>Nota de Remisión N°:</b>
  75. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  76. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  77. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  78. <b>Fecha:</b>
  79. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  80. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  81. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  82. <b>Condición de Pago:</b>
  83. </div>
  84. </div>
  85. </div>
  86. <!--
  87. ======================================================================
  88. TABLA
  89. ======================================================================
  90. -->
  91. <div style="height:3.1cm;">
  92. <div style="font-family: Arial;">
  93. <table class="table table-condensed table-bordered">
  94. <thead>
  95. <tr>
  96. <th style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: center;"><b>Cant.</b></th>
  97. <th style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto; text-align: left;"><b>Descripción</b></th>
  98. <th style="font-size:10px;font-family: Arial;width:1.7cm;overflow: auto; text-align: center;"><b>P. Unit</b></th>
  99. <th style="font-size:10px;font-family: Arial;width:2.2cm;overflow: auto; text-align: center;"><b>Exentas</b></th>
  100. <th style="font-size:10px;font-family: Arial;width:1.9cm;overflow: auto; text-align: center;"><b>IVA 5%</b></th>
  101. <th style="font-size:10px;font-family: Arial;width:1.9cm;overflow: auto; text-align: center;"><b>IVA 10%</b></th>
  102. </tr>
  103. </thead>
  104. <t t-set="valor_exentas" t-value="0"/>
  105. <t t-set="valor_impmu" t-value="0"/>
  106. <t t-set="valor_5" t-value="0"/>
  107. <t t-set="valor_10" t-value="0"/>
  108. <tbody>
  109. <tr t-foreach="o.invoice_line" t-as="l">
  110. <!-- CANTIDAD -->
  111. <td style="font-size:11px;font-family: Arial;width:1.3cm;overflow: auto; text-align: center;">
  112. <span t-esc="'%.0f'%l.quantity"/>
  113. </td>
  114. <!-- NOMBRE DEL PRODUCTO -->
  115. <td style="font-size:11px;font-family: Arial;width:9.5cm;overflow: auto;">
  116. <span t-field="l.name"/>
  117. </td>
  118. <!-- PRECIO UNITARIO -->
  119. <td style="font-size:11px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  120. <t t-if="o.currency_id.id == 166">
  121. <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
  122. </t>
  123. <t t-if="o.currency_id.id != 166">
  124. <span t-esc="'{0:,.2f}'.format(l.price_unit)"/>
  125. </t>
  126. </td>
  127. <!-- EXENTAS -->
  128. <td style="font-size:11px;font-family: Arial;width:2.2cm;overflow: auto; text-align: right;">
  129. <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]">
  130. <t t-if="o.currency_id.id == 166">
  131. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  132. </t>
  133. <t t-if="o.currency_id.id != 166">
  134. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  135. </t>
  136. <t t-set="valor_exentas" t-value="valor_exentas+(l.quantity * l.price_unit)"/>
  137. </span>
  138. <span t-if="'Impuesto Municipal' in [ilt.name for ilt in l.invoice_line_tax_id]">
  139. <t t-if="o.currency_id.id == 166">
  140. </t>
  141. <t t-if="o.currency_id.id != 166">
  142. </t>
  143. <t t-set="valor_impmu" t-value="valor_impmu+(l.quantity * l.price_unit)"/>
  144. </span>
  145. </td>
  146. <!-- IVA 5% -->
  147. <td style="font-size:11px;font-family: Arial;width:1.9cm;overflow: auto; text-align: right;">
  148. <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]">
  149. <t t-if="o.currency_id.id == 166">
  150. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  151. </t>
  152. <t t-if="o.currency_id.id != 166">
  153. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  154. </t>
  155. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  156. </span>
  157. </td>
  158. <!-- IVA 10% -->
  159. <td style="font-size:11px;font-family: Arial;width:1.9cm;overflow: auto; text-align: right;">
  160. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  161. <t t-if="o.currency_id.id == 166">
  162. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  163. </t>
  164. <t t-if="o.currency_id.id != 166">
  165. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  166. </t>
  167. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  168. </span>
  169. </td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. </div>
  174. </div>
  175. <!--
  176. ======================================================================
  177. TABLA
  178. ======================================================================
  179. -->
  180. <div style="height:0.5cm;">
  181. <div style="font-family: Arial;">
  182. <table class="table table-condensed">
  183. <tbody>
  184. <t t-set="iva_impuesto" t-value="0"/>
  185. <tr>
  186. <td style="font-size:11px;font-family: Arial;width:2cm;overflow: auto; text-align: center;">
  187. </td>
  188. <td style="font-size:11px;font-family: Arial;width:8.8cm;overflow: auto;">
  189. Impuesto Municipal 0,5%
  190. </td>
  191. <td style="font-size:11px;font-family: Arial;width:9.7cm;overflow: auto; text-align: center;"></td>
  192. <td style="font-size:11px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  193. <t t-set="iva_impuesto" t-value="valor_impmu*0.005" />
  194. <t t-if="iva_impuesto != 0">
  195. <span t-esc="'{0:,.0f}'.format(iva_impuesto)"/>
  196. </t>
  197. </td>
  198. <td style="font-size:11px;font-family: Arial;width:2.2cm;overflow: auto; text-align: right;">
  199. </td>
  200. <td style="font-size:11px;font-family: Arial;width:1.9cm;overflow: auto; text-align: right;">
  201. </td>
  202. <td style="font-size:11px;font-family: Arial;width:1.9cm;overflow: auto; text-align: right;">
  203. </td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. </div>
  208. </div>
  209. <!--
  210. ======================================================================
  211. TABLA
  212. ======================================================================
  213. -->
  214. <div style="height:0.5cm;">
  215. <div style="font-family: Arial;">
  216. <t t-set="total_5" t-value="0"/>
  217. <t t-set="total_10" t-value="0"/>
  218. <t t-set="iva_5" t-value="0"/>
  219. <t t-set="iva_10" t-value="0"/>
  220. <table class="table table-condensed table-bordered">
  221. <tbody>
  222. <tr>
  223. <th style="width:25%;font-size:10px;font-family: Arial;overflow: auto; text-align: left;min-height:1px;max-height:1px;">
  224. <b>SUBTOTALES:</b>
  225. </th>
  226. <th style="width:44%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  227. </th>
  228. <th style="width:10%;font-size:10px;font-family: Arial;overflow: auto; text-align: right;min-height:1px;max-height:1px;">
  229. <t t-if="o.currency_id.id == 166">
  230. <span t-esc="'{0:,.0f}'.format(valor_exentas+iva_impuesto)"/>
  231. </t>
  232. <t t-if="o.currency_id.id != 166">
  233. <span t-esc="'{0:,.2f}'.format(valor_exentas+valor_impmu)"/>
  234. </t>
  235. </th>
  236. <th style="width:9%;font-size:10px;font-family: Arial;overflow: auto; text-align: right;min-height:1px;max-height:1px;">
  237. <t t-if="o.currency_id.id == 166">
  238. <span t-esc="'{0:,.0f}'.format(valor_5)"/>
  239. </t>
  240. <t t-if="o.currency_id.id != 166">
  241. <span t-esc="'{0:,.2f}'.format(valor_5)"/>
  242. </t>
  243. <t t-set="iva_5" t-value="valor_5/21" />
  244. </th>
  245. <th style="width:12%;font-size:10px;font-family: Arial;overflow: auto; text-align: right;min-height:1px;max-height:1px;">
  246. <t t-if="o.currency_id.id == 166">
  247. <span t-esc="'{0:,.0f}'.format(valor_10)"/>
  248. </t>
  249. <t t-if="o.currency_id.id != 166">
  250. <span t-esc="'{0:,.2f}'.format(valor_10)"/>
  251. </t>
  252. <t t-set="iva_10" t-value="valor_10/11" />
  253. </th>
  254. </tr>
  255. <tr>
  256. <th style="width:25%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  257. <b>TOTAL A PAGAR: (en letra) </b>
  258. </th>
  259. <th style="width:44%;height:0.5cm;font-size:9px;font-family: Arial;overflow: auto; text-align: left;">
  260. <span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/>
  261. </th>
  262. <th style="width:10%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  263. </th>
  264. <th style="width:9%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  265. </th>
  266. <th style="width:12%;height:0.5cm;font-size:11px;font-family: Arial;overflow: auto; text-align: right;">
  267. <t t-if="o.currency_id.id == 166">
  268. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  269. </t>
  270. <t t-if="o.currency_id.id != 166">
  271. <span t-esc="'{0:,.2f}'.format(o.amount_total)"/>
  272. </t>
  273. </th>
  274. </tr>
  275. <t t-if="o.currency_id.id == 166">
  276. <div>
  277. <th style="width:25%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  278. <b>LIQUIDACIÓN DEL IVA (5%): </b>
  279. <t t-if="iva_5 != 0">
  280. <span t-esc="'{0:,.0f}'.format(iva_5)"/>
  281. </t>
  282. </th>
  283. <th style="width:12%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  284. <b>IVA 10%: </b>
  285. <t t-if="iva_10 != 0">
  286. <span t-esc="'{0:,.0f}'.format(iva_10)"/>
  287. </t>
  288. </th>
  289. <th style="width:10%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  290. <b> TOTAL IVA: </b>
  291. </th>
  292. <th style="width:10%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  293. <t>
  294. <span t-esc="'{0:,.0f}'.format(iva_5+iva_10)"/>
  295. </t>
  296. </th>
  297. </div>
  298. </t>
  299. <t t-if="o.currency_id.id != 166">
  300. <div>
  301. <th style="width:25%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  302. <b>LIQUIDACIÓN DEL IVA (5%): </b>
  303. <t t-if="iva_5 != 0">
  304. <span t-esc="'{0:,.0f}'.format(iva_5)"/>
  305. </t>
  306. </th>
  307. <th style="width:12%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  308. <b>IVA 10%: </b>
  309. <t t-if="iva_10 != 0">
  310. <span t-esc="'{0:,.0f}'.format(iva_10)"/>
  311. </t>
  312. </th>
  313. <th style="width:10%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  314. <b> TOTAL IVA: </b>
  315. </th>
  316. <th style="width:10%;height:0.5cm;font-size:10px;font-family: Arial;overflow: auto; text-align: left;">
  317. <t>
  318. <span t-esc="'{0:,.0f}'.format(iva_5+iva_10)"/>
  319. </t>
  320. </th>
  321. </div>
  322. </t>
  323. </tbody>
  324. </table>
  325. </div>
  326. </div>
  327. </div>
  328. </t>
  329. <t t-if="i == 1">
  330. <div class="logo1"> </div>
  331. </t>
  332. <t t-if="i == 2">
  333. <div class="logo2"> </div>
  334. </t>
  335. </div>
  336. </t>
  337. </t>
  338. </template>
  339. </data>
  340. </openerp>