factura_venta_suceso.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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_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_factura_suceso">
  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 type="text/css">
  29. body{
  30. font-size: 2.7mm;
  31. font-family: Arial, Helvetica, sans-serif;
  32. }
  33. div{
  34. padding: 0px;
  35. }
  36. .pagina{
  37. width:19.3cm;
  38. }
  39. .logo{
  40. height: 1.6cm;
  41. width: 100%;
  42. top: 0px;
  43. }
  44. .fecha_emision_data{
  45. width: 13.5cm;
  46. padding-left: 0.4cm;
  47. float: left;
  48. min-height: 0.2mm;
  49. }
  50. .contado_x{
  51. width: 5.72cm;
  52. float: left;
  53. padding-left: 0.1cm;
  54. min-height: 0.2mm;
  55. }
  56. .razon_data{
  57. width: 13.5cm;
  58. float: left;
  59. padding-left: 0.4cm;
  60. min-height: 0.2mm;
  61. }
  62. .ruc_data{
  63. width: 5.72cm;
  64. float: left;
  65. padding-left: 0.2cm;
  66. min-height: 0.2mm;
  67. }
  68. .direccion_data{
  69. width: 13.5cm;
  70. float: left;
  71. padding-left: 0.4cm;
  72. min-height: 0.2mm;
  73. }
  74. .telefono_data{
  75. width: 5.72cm;
  76. float: left;
  77. padding-left: 0.3cm;
  78. min-height: 0.2mm;
  79. }
  80. .nota_remision_data{
  81. width: 6cm;
  82. float: left;
  83. padding-left: 0.4cm;
  84. min-height: 0.2mm;
  85. }
  86. .remision_data{
  87. width: 4cm;
  88. float: left;
  89. padding-left: 0.62cm;
  90. min-height: 0.2mm;
  91. }
  92. .remision_pago{
  93. width: 9.22cm;
  94. float: left;
  95. padding-left: 1cm;
  96. min-height: 0.2mm;
  97. }
  98. .cab-articulos{
  99. height: 0.0cm;
  100. clear: both;
  101. }
  102. .articulos{
  103. height: 3.5cm;
  104. }
  105. .art-col1{
  106. width:0.5cm;
  107. text-align: center;
  108. }
  109. .art-col2{
  110. padding-left: 1cm;
  111. width:8.5cm;
  112. }
  113. .art-col3{
  114. width:2.8cm;
  115. padding-left: 0.3cm;
  116. text-align: right;
  117. }
  118. .art-col4{
  119. width:2.4cm;
  120. padding-left: 0.3cm;
  121. text-align: right;
  122. }
  123. .art-col5{
  124. width:2.6cm;
  125. padding-left: 0.2cm;
  126. text-align: right;
  127. }
  128. .art-col6{
  129. width:2.5cm;
  130. text-align: right;
  131. }
  132. .subtotal_data{
  133. width: 12.88cm;
  134. float: left;
  135. padding-left: 0.3cm;
  136. min-height: 0.2cm;
  137. }
  138. .subtotal_excentas{
  139. width: 2cm;
  140. float: right;
  141. text-align: right;
  142. min-height: 0.2cm;
  143. }
  144. .subtotal_5{
  145. width: 2.1cm;
  146. float: right;
  147. text-align: right;
  148. min-height: 0.2cm;
  149. }
  150. .subtotal_10{
  151. width: 2.2cm;
  152. float: right;
  153. text-align: right;
  154. min-height: 0.2cm;
  155. }
  156. .total_pagar_data{
  157. width: 16.5cm;
  158. float: left;
  159. padding-left: 0.4cm;
  160. min-height: 0.2mm;
  161. }
  162. .total_pagar{
  163. width: 2.70cm;
  164. float: right;
  165. text-align: right;
  166. min-height: 0.2mm;
  167. }
  168. .iva_5_data{
  169. width: 8cm;
  170. float: left;
  171. padding-top: 0.6cm;
  172. padding-left: 0.3cm;
  173. min-height: 0.25cm;
  174. }
  175. .iva_10_data{
  176. width: 5.61cm;
  177. float: left;
  178. padding-top: 0.6cm;
  179. padding-left: o.5cm;
  180. min-height: 0.25cm;
  181. }
  182. .iva_total_data{
  183. width: 5.61cm;
  184. float: left;
  185. padding-top: 0.6cm;
  186. padding-left: 1.5cm;
  187. min-height: 0.25cm;
  188. }
  189. </style>
  190. <t t-foreach="docs" t-as="o">
  191. <div class="pagina">
  192. <div class="logo"> </div>
  193. <table border="1" class="table table-condensed" style="border-style:solid">
  194. <tr>
  195. <th class="fecha_emision_data" ><b>Fecha de Emisión: </b><span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/></th>
  196. <th class="contado_x">
  197. <t t-if="o.contado == True"><b>Condición de Venta:</b> Contado</t>
  198. <t t-if="o.credito == True">Condición de Venta: Crédito</t>
  199. </th>
  200. </tr>
  201. <tr>
  202. <th class="razon_data"><b>Nombre o Razón Social: </b><span t-field="o.partner_id.name"/></th>
  203. <th class="ruc_data"><b>R.U.C. y/o C.I.N°: </b><span t-field="o.partner_id.ruc"/></th>
  204. </tr>
  205. <tr>
  206. <th class="direccion_data"><b>Dirección: </b><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/></th>
  207. <th class="telefono_data"><b>Teléfono: </b><span t-field="o.partner_id.phone"/></th>
  208. </tr>
  209. <tr>
  210. <th class="nota_remision_data"><b>Nota de Remisión: </b> </th>
  211. <th class="remision_data"><b>Fecha: </b> </th>
  212. <th class="remision_pago"><b>Condición de Pago: </b> </th>
  213. </tr>
  214. </table>
  215. <div class="cab-articulos"> </div>
  216. <div class="articulos">
  217. <table class="table table-condensed">
  218. <thead>
  219. <tr>
  220. <th class="text-right">Cant.</th>
  221. <th class="text-left">Descripción</th>
  222. <th class="text-right">P. Unitario</th>
  223. <th class="text-right">Exentas</th>
  224. <th class="text-right">IVA 5%</th>
  225. <th class="text-right">IVA 10%</th>
  226. </tr>
  227. </thead>
  228. <t t-set="valor_exenta" t-value="0"/>
  229. <t t-set="valor_5" t-value="0"/>
  230. <t t-set="valor_10" t-value="0"/>
  231. <tbody class="sale_tbody">
  232. <tr t-foreach="o.invoice_line" t-as="l">
  233. <td class="art-col1"><span t-esc="'%.0f'%l.quantity"/></td>
  234. <td class="art-col2"><span t-field="l.name"/></td>
  235. <td class="art-col3"><span t-esc="'{0:,.0f}'.format(int(l.price_unit)).replace(',', '.')"/></td>
  236. <td class="art-col4">
  237. <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]">
  238. <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  239. <span t-value="valor_exenta+(l.quantity * l.price_unit)"/></span>
  240. <t t-set="valor_exenta" t-value="valor_exenta+(l.quantity * l.price_unit)"/>
  241. </span>
  242. </td>
  243. <td class="art-col5">
  244. <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]">
  245. <span t-esc="'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  246. <span t-value="valor_5+(l.quantity * l.price_unit)"/></span>
  247. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  248. </span>
  249. </td>
  250. <td class="art-col6">
  251. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  252. <span t-esc="'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  253. <span t-value="valor_10+(l.quantity * l.price_unit)"/></span>
  254. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  255. </span>
  256. </td>
  257. </tr>
  258. </tbody>
  259. </table>
  260. </div>
  261. <t t-set="iva_exenta" t-value="0"/>
  262. <t t-set="iva_5" t-value="0"/>
  263. <t t-set="iva_10" t-value="0"/>
  264. <table border="1" class="table table-condensed" style="border-style:solid">
  265. <tr>
  266. <th class="subtotal_data"><b>SUB TOTALES: </b></th>
  267. <th class="subtotal_10">
  268. <span t-esc="'{0:,.0f}'.format(int(valor_10)).replace(',', '.')"></span>
  269. <t t-set="iva_10" t-value="valor_10/11" />
  270. </th>
  271. <th class="subtotal_5">
  272. <span t-esc="'{0:,.0f}'.format(int(valor_5)).replace(',', '.')"></span>
  273. <t t-set="iva_5" t-value="valor_5/21" />
  274. </th>
  275. <th class="subtotal_excentas">
  276. <span t-esc= "'{0:,.0f}'.format(int(valor_exenta)).replace(',', '.')"></span>
  277. <t t-set="iva_exenta" t-value="valor_exenta" />
  278. </th>
  279. </tr>
  280. <tr>
  281. <th class="total_pagar_data"><b>TOTAL A PAGAR Gs.: (en letra) </b><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></th>
  282. <th class="total_pagar"><span t-esc="'{0:,.0f}'.format(int(o.amount_total)).replace(',', '.')"/></th>
  283. </tr>
  284. <tr>
  285. <th class="iva_5_data"><b>LIQUIDACIÓN DEL IVA: (5%) </b><span t-esc="'{0:,.0f}'.format(int(iva_5)).replace(',', '.')"/></th>
  286. <th class="iva_10_data"><b>(10%) </b><span t-esc="'{0:,.0f}'.format(int(iva_10)).replace(',', '.')"/></th>
  287. <th class="iva_total_data"><b>TOTAL IVA: </b><span t-esc="'{0:,.0f}'.format(int(o.amount_tax)).replace(',', '.')"/></th>
  288. </tr>
  289. </table>
  290. </div>
  291. </t>
  292. </div>
  293. </t>
  294. </t>
  295. </t>
  296. </template>
  297. </data>
  298. </openerp>