factura_venta_sion.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_venta_sion"
  5. model="account.invoice"
  6. string="Factura Legal"
  7. report_type="qweb-html"
  8. name="factura_venta_sion.report_factura_sion"
  9. file="factura_venta_sion.report_factura_sion"
  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_sion">
  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: 0.4cm;
  41. width: 100%;
  42. top: 0px;
  43. }
  44. .espacio{
  45. height: 0.2cm;
  46. width: 100%;
  47. }
  48. .fecha_emision_data{
  49. width: 11.5cm;
  50. padding-left: 5.2cm;
  51. float: left;
  52. min-height: 0.5cm;
  53. }
  54. .contado_x{
  55. width: 1.8cm;
  56. float: left;
  57. padding-left: 9cm;
  58. min-height: 0.5cm;
  59. }
  60. .linea2{
  61. position: relative;
  62. top: -0.12cm;
  63. min-height: 0.5cm;
  64. }
  65. .razon_data{
  66. width: 15cm;
  67. float: left;
  68. padding-left: 5.2cm;
  69. min-height: 0.4cm;
  70. }
  71. .ruc_data{
  72. width: 5.8cm;
  73. float: left;
  74. padding-left: 0.2cm;
  75. min-height: 0.5cm;
  76. }
  77. .linea3{
  78. position: relative;
  79. top: -0.12cm;
  80. min-height: 0.3cm;
  81. }
  82. .direccion_data{
  83. width: 14cm;
  84. float: left;
  85. padding-left: 5.2cm;
  86. min-height: 0.4cm;
  87. }
  88. .linea4{
  89. position: relative;
  90. top: -0.12cm;
  91. min-height: 0.3cm;
  92. }
  93. .telefono_data{
  94. width: 9cm;
  95. float: left;
  96. padding-left: 5.2cm;
  97. min-height: 0.4cm;
  98. }
  99. .contado_x{
  100. width: 9cm;
  101. float: left;
  102. padding-left: 0.2cm;
  103. min-height: 0.4cm;
  104. }
  105. .cab-articulos{
  106. height: 1.1cm;
  107. clear: both;
  108. }
  109. .articulos{
  110. height: 4.8cm;
  111. }
  112. .art-col1{
  113. width:0.5cm;
  114. text-align: center;
  115. }
  116. .art-col2{
  117. padding-left: 1.2cm;
  118. width:10.7cm;
  119. }
  120. .art-col3{
  121. width:2.7cm;
  122. padding-left: 0.3cm;
  123. text-align: right;
  124. }
  125. .art-col4{
  126. width:2.4cm;
  127. padding-left: 0.3cm;
  128. text-align: right;
  129. }
  130. .art-col5{
  131. width:2.6cm;
  132. padding-left: 0.2cm;
  133. text-align: right;
  134. }
  135. .art-col6{
  136. width:2.5cm;
  137. text-align: right;
  138. }
  139. .logo1{
  140. height: 2.5cm;
  141. width: 100%;
  142. top: 0px;
  143. }
  144. .subtotal_data{
  145. width: 6cm;
  146. font-size: 2.9mm;
  147. float: left;
  148. padding-top: 0.002cm;
  149. padding-left: 2.3cm;
  150. min-height: 0.2cm;
  151. }
  152. .subtotal_excentas{
  153. width: 2cm;
  154. float: left;
  155. text-align: right;
  156. font-size: 2.9mm;
  157. padding-left: 8.3cm;
  158. padding-top: 0.6cm;
  159. min-height: 0.2cm;
  160. }
  161. .subtotal_5{
  162. width: 2.5cm;
  163. float: left;
  164. padding-left: 0.6cm;
  165. font-size: 2.9mm;
  166. text-align: right;
  167. padding-top: 0.6cm;
  168. min-height: 0.2cm;
  169. }
  170. .subtotal_10{
  171. width: 2.5cm;
  172. float: left;
  173. padding-left: 0.9cm;
  174. font-size: 2.9mm;
  175. text-align: right;
  176. padding-top: 0.6cm;
  177. min-height: 0.2cm;
  178. }
  179. .total_pagar_data{
  180. width: 16.7cm;
  181. float: left;
  182. font-size: 3.2mm;
  183. padding-top: 0.1cm;
  184. padding-left: 5cm;
  185. min-height: 0.2cm;
  186. }
  187. .total_pagar{
  188. width: 2.4cm;
  189. float: left;
  190. padding-left: 0cm;
  191. font-size: 3.2mm;
  192. text-align: right;
  193. padding-top: 0.1cm;
  194. min-height: 0.2cm;
  195. }
  196. .iva_5_data{
  197. width: 4.5cm;
  198. float: left;
  199. padding-left: 2.8cm;
  200. min-height: 0.25cm;
  201. }
  202. .iva_10_data{
  203. width: 4.7cm;
  204. float: left;
  205. padding-left: 0.2cm;
  206. min-height: 0.25cm;
  207. }
  208. .iva_total_data{
  209. width: 6cm;
  210. float: left;
  211. padding-left: 0.2cm;
  212. min-height: 0.25cm;
  213. }
  214. </style>
  215. <t t-foreach="docs" t-as="o">
  216. <div class="pagina">
  217. <div class="logo"> </div>
  218. <div class="espacio"> </div>
  219. <div class="linea1">
  220. <div class="fecha_emision_data">Ciudad del Este,<span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/></div>
  221. <div class="ruc_data"><b>R.U.C. N°: </b><span t-field="o.partner_id.ruc"/></div>
  222. </div>
  223. <div class="linea2">
  224. <div class="razon_data"><b>Cliente: </b><span t-field="o.partner_id.name"/></div>
  225. </div>
  226. <div class="linea3">
  227. <div class="direccion_data"><b>Dirección: </b>
  228. <t t-f="o.partner_id.street"><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/></t>
  229. <t t-f="not o.partner_id.street"> </t>
  230. </div>
  231. </div>
  232. <div class="linea4">
  233. <div class="telefono_data"><b>Teléfono: </b><span t-field="o.partner_id.phone"/></div>
  234. <div class="contado_x"><b>Condición de pago: </b>
  235. <t t-if="o.contado == True">Contado</t>
  236. <t t-if="o.contado == False">Crédito</t>
  237. </div>
  238. </div>
  239. <div class="cab-articulos"> </div>
  240. <div class="articulos">
  241. <table class="tab-articulos">
  242. <t t-set="valor_exenta" t-value="0"/>
  243. <t t-set="valor_5" t-value="0"/>
  244. <t t-set="valor_10" t-value="0"/>
  245. <tr t-foreach="o.invoice_line" t-as="l">
  246. <td class="art-col1"><span t-esc="'%.0f'%l.quantity"/></td>
  247. <td class="art-col2"><span t-field="l.product_id.name"/></td>
  248. <td class="art-col3"><span t-esc="'{0:,.0f}'.format(l.price_unit)"/></td>
  249. <td class="art-col4"></td>
  250. <td class="art-col5">
  251. <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]">
  252. <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  253. <span t-value="valor_5+(l.quantity * l.price_unit)"/></span>
  254. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  255. </span>
  256. </td>
  257. <td class="art-col6">
  258. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  259. <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  260. <span t-value="valor_10+(l.quantity * l.price_unit)"/></span>
  261. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  262. </span>
  263. </td>
  264. </tr>
  265. </table>
  266. </div>
  267. <t t-set="iva_5" t-value="0"/>
  268. <t t-set="iva_10" t-value="0"/>
  269. <div class="subtotal_data"> </div>
  270. <div class="subtotal_excentas"> </div>
  271. <div 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. </div>
  275. <div class="subtotal_10">
  276. <span t-esc="'{0:,.0f}'.format(int(valor_10)).replace(',', '.')"></span>
  277. <t t-set="iva_10" t-value="valor_10/11" />
  278. </div>
  279. <div class="total_pagar_data"><b><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></b></div>
  280. <!-- <div class="total_pagar_data"><span t-esc="o.amount_total"/></div> -->
  281. <div class="total_pagar"><b><span t-esc="'{0:,.0f}'.format(int(o.amount_total)).replace(',', '.')"/></b></div>
  282. <div class="iva_5_data"><span t-esc="'{0:,.0f}'.format(iva_5)"></span></div>
  283. <div class="iva_10_data"><span t-esc="'{0:,.0f}'.format(iva_10)"></span></div>
  284. <div class="iva_total_data"><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
  285. </div>
  286. <div class="logo1"> </div>
  287. </t>
  288. </div>
  289. </t>
  290. </t>
  291. </t>
  292. </template>
  293. </data>
  294. </openerp>