factura_venta_apis.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_venta_apis"
  5. model="account.invoice"
  6. string="Factura Legal"
  7. report_type="qweb-html"
  8. name="factura_venta_apis.report_factura_apis"
  9. file="factura_venta_apis.report_factura_apis"
  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_apis">
  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.3cm;
  41. width: 100%;
  42. top: 0px;
  43. }
  44. .fecha_emision_data{
  45. width: 11.5cm;
  46. padding-left: 6.3cm;
  47. float: left;
  48. min-height: 0.5cm;
  49. }
  50. .contado_x{
  51. width: 1.8cm;
  52. float: left;
  53. padding-left: 8.3cm;
  54. min-height: 0.5cm;
  55. }
  56. .credito_x{
  57. width: 1.8cm;
  58. float: left;
  59. padding-left: 1.6cm;
  60. min-height: 0.5cm;
  61. }
  62. .linea2{
  63. position: relative;
  64. top: -0.12cm;
  65. min-height: 0.5cm;
  66. }
  67. .razon_data{
  68. width: 15cm;
  69. float: left;
  70. padding-left: 6.9cm;
  71. min-height: 0.4cm;
  72. }
  73. .ruc_data{
  74. width: 5.5cm !important;
  75. float: left;
  76. padding-left: 0.2cm;
  77. min-height: 0.5cm;
  78. }
  79. .linea3{
  80. position: relative;
  81. top: -0.12cm;
  82. min-height: 0.3cm;
  83. }
  84. .direccion_data{
  85. width: 14cm;
  86. float: left;
  87. padding-left: 7cm;
  88. min-height: 0.4cm;
  89. }
  90. .linea4{
  91. position: relative;
  92. top: -0.12cm;
  93. min-height: 0.3cm;
  94. }
  95. .telefono_data{
  96. width: 10cm;
  97. float: left;
  98. padding-left: 6.9cm;
  99. min-height: 0.4cm;
  100. }
  101. .linea5{
  102. position: relative;
  103. top: -0.12cm;
  104. min-height: 0.4cm;
  105. }
  106. .contado_x{
  107. width: 1.8cm;
  108. float: left;
  109. padding-left: 9cm;
  110. min-height: 0.4cm;
  111. }
  112. .credito_x{
  113. width: 1cm;
  114. float: left;
  115. padding-left: 1.10cm;
  116. min-height: 0.4cm;
  117. }
  118. .nota_remision_data{
  119. width: 4cm;
  120. float: left;
  121. padding-left: 2.5cm;
  122. min-height: 0.4cm;
  123. }
  124. .cab-articulos{
  125. height: 0.9cm;
  126. clear: both;
  127. }
  128. .articulos{
  129. height: 4.2cm;
  130. }
  131. .art-col1{
  132. width:0.4cm;
  133. text-align: center;
  134. }
  135. .art-col2{
  136. padding-left: 0.7cm;
  137. width:1cm;
  138. text-align: center;
  139. }
  140. .art-col3{
  141. padding-left: 0.3cm;
  142. width:9.8cm;
  143. }
  144. .art-col4{
  145. width:0.9cm;
  146. text-align: right;
  147. }
  148. .art-col5{
  149. width:2.0cm;
  150. text-align: right;
  151. }
  152. .art-col6{
  153. width:2.7cm;
  154. text-align: right;
  155. }
  156. .art-col7{
  157. width:1.8cm;
  158. text-align: right;
  159. }
  160. .logo1{
  161. height: 3.37cm;
  162. width: 100%;
  163. top: 0px;
  164. }
  165. .subtotal_data{
  166. width: 8cm;
  167. float: left;
  168. padding-top: 0.002cm;
  169. padding-left: 2.0cm;
  170. min-height: 0.37cm;
  171. }
  172. .subtotal_excentas{
  173. width: 6.9cm;
  174. float: left;
  175. text-align: left;
  176. padding-left: 5.7cm;
  177. padding-top: 0.7cm;
  178. min-height: 0.37cm;
  179. }
  180. .subtotal_5{
  181. width: 1.7cm;
  182. float: left;
  183. padding-left: 0.1cm;
  184. text-align: right;
  185. padding-top: 0.7cm;
  186. min-height: 0.37cm;
  187. }
  188. .subtotal_10{
  189. width: 2.3cm;
  190. float: left;
  191. padding-left: 0.5cm;
  192. text-align: right;
  193. padding-top: 0.7cm;
  194. min-height: 0.37cm;
  195. }
  196. .total_pagar_data{
  197. width: 16.4cm;
  198. float: left;
  199. padding-top: 0.06mm;
  200. padding-left: 5cm;
  201. min-height: 0.37cm;
  202. }
  203. .total_pagar{
  204. width: 2.3cm;
  205. float: right;
  206. padding-top: 0.06mm;
  207. padding-left: 0.8cm;
  208. min-height: 0.37cm;
  209. }
  210. .iva_5_data{
  211. width: 5cm;
  212. float: left;
  213. padding-top: 0.6cm;
  214. padding-left: 4.7cm;
  215. min-height: 0.25cm;
  216. }
  217. .iva_10_data{
  218. width: 5cm;
  219. float: left;
  220. padding-top: 0.6cm;
  221. padding-left: 3.8cm;
  222. min-height: 0.25cm;
  223. }
  224. .iva_total_data{
  225. width: 7cm;
  226. float: left;
  227. padding-top: 0.55cm;
  228. padding-left: 4.8cm;
  229. min-height: 0.25cm;
  230. }
  231. </style>
  232. <t t-foreach="docs" t-as="o">
  233. <div class="pagina">
  234. <div class="logo"> </div>
  235. <div class="linea1">
  236. <div class="fecha_emision_data">Ciudad del Este,<span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/></div>
  237. <div class="ruc_data"><span t-field="o.partner_id.ruc"/></div>
  238. </div>
  239. <div class="linea2">
  240. <div class="razon_data"><span t-field="o.partner_id.name"/></div>
  241. </div>
  242. <div class="linea3">
  243. <div class="direccion_data">
  244. <t t-f="o.partner_id.street"><span t-field="o.partner_id.street"/></t>
  245. <t t-f="not o.partner_id.street"> </t>
  246. </div>
  247. </div>
  248. <div class="linea4">
  249. <div class="telefono_data"><span t-field="o.partner_id.phone"/></div>
  250. </div>
  251. <div class="linea5">
  252. <div class="nota_remision_data"> </div>
  253. <div class="contado_x">
  254. <t t-if="o.contado == True">x</t>
  255. <t t-if="o.contado == False"></t>
  256. </div>
  257. <div class="credito_x">
  258. <t t-if="o.credito == True">x</t>
  259. <t t-if="o.credito == False"></t>
  260. </div>
  261. <div class="nota_remision_data"> </div>
  262. </div>
  263. <div class="cab-articulos"> </div>
  264. <div class="articulos">
  265. <table class="tab-articulos">
  266. <t t-set="valor_exentas" t-value="0"/>
  267. <t t-set="valor_5" t-value="0"/>
  268. <t t-set="valor_10" t-value="0"/>
  269. <tr t-foreach="o.invoice_line" t-as="l">
  270. <td class="art-col1"><span t-esc="'{0:,.0f}'.format(l.quantity)"/></td>
  271. <td class="art-col2"></td>
  272. <td class="art-col3"><span t-field="l.name"/></td>
  273. <td class="art-col4"><span t-esc="'{0:,.0f}'.format(l.price_unit)"/></td>
  274. <td class="art-col5">
  275. <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]">
  276. <t t-if="o.currency_id.id == 166">
  277. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  278. </t>
  279. <t t-if="o.currency_id.id != 166">
  280. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  281. </t>
  282. <t t-set="valor_exentas" t-value="valor_exentas+(l.quantity * l.price_unit)"/>
  283. </span>
  284. </td>
  285. <td class="art-col6">
  286. <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]">
  287. <t t-if="o.currency_id.id == 166">
  288. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  289. </t>
  290. <t t-if="o.currency_id.id != 166">
  291. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  292. </t>
  293. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  294. </span>
  295. </td>
  296. <td class="art-col7">
  297. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  298. <t t-if="o.currency_id.id == 166">
  299. <span t-esc="'{0:,.0f}'.format(l.quantity * l.price_unit)"/>
  300. </t>
  301. <t t-if="o.currency_id.id != 166">
  302. <span t-esc="'{0:,.2f}'.format(l.quantity * l.price_unit)"/>
  303. </t>
  304. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  305. </span>
  306. </td>
  307. </tr>
  308. </table>
  309. </div>
  310. <div class="subtotal_data"> </div>
  311. <div class="subtotal_excentas">
  312. <t t-if="o.currency_id.id == 166">
  313. <span t-esc="'{0:,.0f}'.format(valor_exentas)"/>
  314. </t>
  315. <t t-if="o.currency_id.id != 166">
  316. <span t-esc="'{0:,.2f}'.format(valor_exentas)"/>
  317. </t>
  318. <t t-set="iva_exentas" t-value="valor_exentas"/>
  319. </div>
  320. <div class="subtotal_5">
  321. <t t-if="o.currency_id.id == 166">
  322. <span t-esc="'{0:,.0f}'.format(valor_5)"/>
  323. </t>
  324. <t t-if="o.currency_id.id != 166">
  325. <span t-esc="'{0:,.2f}'.format(valor_5)"/>
  326. </t>
  327. <t t-set="iva_5" t-value="valor_5/21" />
  328. </div>
  329. <td style="font-size:10px;">
  330. <div class="subtotal_10">
  331. <t t-if="o.currency_id.id == 166">
  332. <span t-esc="'{0:,.0f}'.format(valor_10)"/>
  333. </t>
  334. <t t-if="o.currency_id.id != 166">
  335. <span t-esc="'{0:,.2f}'.format(valor_10)"/>
  336. </t>
  337. <t t-set="iva_10" t-value="(valor_10)/11" />
  338. </div>
  339. </td>
  340. <div class="total_pagar_data"><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
  341. <div class="total_pagar"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
  342. <div class="iva_5_data"> </div>
  343. <div class="iva_10_data"><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
  344. <div class="iva_total_data"><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
  345. </div>
  346. <div class="logo1"> </div>
  347. </t>
  348. </div>
  349. </t>
  350. </t>
  351. </t>
  352. </template>
  353. </data>
  354. </openerp>