factura_venta_profesional.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_venta_profesional"
  5. model="account.invoice"
  6. string="Factura Legal"
  7. report_type="qweb-html"
  8. name="factura_venta_profesional.report_factura_profesional"
  9. file="factura_venta_profesional.report_factura_profesional"
  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_profesional">
  24. <t t-call="report.html_container">
  25. <t t-call="report.external_layout">
  26. <t t-foreach="[1,2]" 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: 2.2cm;
  46. width: 100%;
  47. }
  48. .fecha_emision_data{
  49. width: 11.5cm;
  50. padding-left: 0cm;
  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: 0cm;
  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: 0cm;
  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: 0cm;
  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. .linea5{
  106. position: relative;
  107. top: -0.12cm;
  108. min-height: 0.3cm;
  109. }
  110. .obra{
  111. width: 19.3cm;
  112. float: left;
  113. padding-left: 0cm;
  114. min-height: 0.4cm;
  115. }
  116. .linea6{
  117. position: relative;
  118. top: -0.12cm;
  119. min-height: 0.3cm;
  120. }
  121. .local{
  122. width: 8.3cm;
  123. float: left;
  124. min-height: 0.4cm;
  125. }
  126. .responsable{
  127. width: 7.3cm;
  128. font-size: 2.6mm;
  129. font-family: Arial;
  130. float: right;
  131. padding-left: 1.1cm;
  132. min-height: 0.4cm;
  133. }
  134. .cab-articulos{
  135. height: 1.2cm;
  136. clear: both;
  137. }
  138. .articulos{
  139. height: 5.0cm;
  140. }
  141. .art-col1{
  142. width:0.5cm;
  143. text-align: center;
  144. }
  145. .art-col2{
  146. padding-left: 1cm;
  147. width:12.5cm;
  148. }
  149. .art-col3{
  150. width:2.7cm;
  151. padding-left: 0.3cm;
  152. text-align: right;
  153. }
  154. .art-col4{
  155. width:2.4cm;
  156. padding-left: 0.3cm;
  157. text-align: right;
  158. }
  159. .art-col5{
  160. width:2.6cm;
  161. padding-left: 0.2cm;
  162. text-align: right;
  163. }
  164. .art-col6{
  165. width:2.5cm;
  166. text-align: right;
  167. }
  168. .logo1{
  169. height: 3.1cm;
  170. width: 100%;
  171. top: 0px;
  172. }
  173. .subtotal_data{
  174. width: 6cm;
  175. font-size: 2.9mm;
  176. float: left;
  177. padding-top: 0.002cm;
  178. padding-left: 2.3cm;
  179. min-height: 0.2cm;
  180. }
  181. .subtotal_excentas{
  182. width: 2cm;
  183. float: left;
  184. text-align: right;
  185. font-size: 2.9mm;
  186. padding-left: 8.3cm;
  187. padding-top: 0.6cm;
  188. min-height: 0.3cm;
  189. }
  190. .subtotal_5{
  191. width: 2.5cm;
  192. float: left;
  193. padding-left: 0.6cm;
  194. font-size: 2.9mm;
  195. text-align: right;
  196. padding-top: 0.6cm;
  197. min-height: 0.3cm;
  198. }
  199. .subtotal_10{
  200. width: 2.5cm;
  201. float: left;
  202. padding-left: 0.9cm;
  203. font-size: 2.9mm;
  204. text-align: right;
  205. padding-top: 0.6cm;
  206. min-height: 0.3cm;
  207. }
  208. .total_pagar_data{
  209. width: 16.7cm;
  210. float: left;
  211. font-size: 3.2mm;
  212. padding-top: 0.1cm;
  213. padding-left: 5cm;
  214. min-height: 0.5cm;
  215. }
  216. .total_pagar{
  217. width: 2.4cm;
  218. float: left;
  219. padding-left: 0cm;
  220. font-size: 3.2mm;
  221. text-align: right;
  222. padding-top: 0.1cm;
  223. min-height: 0.5cm;
  224. }
  225. .iva_5_data{
  226. width: 6.5cm;
  227. float: left;
  228. padding-top: 0.1cm;
  229. padding-left: 1.0cm;
  230. min-height: 0.25cm;
  231. }
  232. .iva_10_data{
  233. width: 6.5cm;
  234. float: left;
  235. padding-top: 0.1cm;
  236. padding-left: 1.8cm;
  237. min-height: 0.25cm;
  238. }
  239. .iva_total_data{
  240. width: 6cm;
  241. float: left;
  242. padding-top: 0.1cm;
  243. padding-left: 1.5cm;
  244. min-height: 0.25cm;
  245. }
  246. </style>
  247. <t t-foreach="docs" t-as="o">
  248. <div class="pagina">
  249. <div class="logo"> </div>
  250. <div class="espacio"> </div>
  251. <div class="linea1">
  252. <div class="fecha_emision_data">Fecha:<span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/></div>
  253. <div class="ruc_data"><b>R.U.C. N°: </b><span t-field="o.partner_id.ruc"/></div>
  254. </div>
  255. <div class="linea2">
  256. <div class="razon_data"><b>Cliente: </b><span t-field="o.partner_id.name"/></div>
  257. </div>
  258. <div class="linea3">
  259. <div class="direccion_data"><b>Dirección: </b>
  260. <t t-f="o.partner_id.street"><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/></t>
  261. <t t-f="not o.partner_id.street"> </t>
  262. </div>
  263. </div>
  264. <div class="linea4">
  265. <div class="telefono_data"><b>Teléfono: </b><span t-field="o.partner_id.phone"/></div>
  266. <div class="contado_x"><b>Condición de pago: </b>
  267. <t t-if="o.contado == True">Contado</t>
  268. <t t-if="o.contado == False">Crédito</t>
  269. </div>
  270. </div>
  271. <div class="linea5">
  272. <div class="obra"><b>Obra: </b><span t-field="o.obra"/></div>
  273. <!-- <div class="contado_x"><b>Condición de pago: </b><span t-field="o.partner_id.phone"/></div> -->
  274. </div>
  275. <div class="linea6">
  276. <div class="local"><b>Pedido por: </b><span t-field="o.pedido_por"/></div>
  277. <!-- <div class="responsable"><b>Responsable: </b><span t-field="o.pedido_por"/></div> -->
  278. </div>
  279. <div class="cab-articulos"> </div>
  280. <div class="articulos">
  281. <table class="tab-articulos">
  282. <t t-set="valor_exenta" t-value="0"/>
  283. <t t-set="valor_5" t-value="0"/>
  284. <t t-set="valor_10" t-value="0"/>
  285. <tr t-foreach="o.invoice_line" t-as="l">
  286. <td class="art-col1"><span t-esc="'%.0f'%l.quantity"/></td>
  287. <td class="art-col2"><span t-field="l.display_name"/></td>
  288. <td class="art-col3"><span t-esc="'{0:,.0f}'.format(l.price_unit)"/></td>
  289. <td class="art-col4"></td>
  290. <td class="art-col5">
  291. <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]">
  292. <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  293. <span t-value="valor_5+(l.quantity * l.price_unit)"/></span>
  294. <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
  295. </span>
  296. </td>
  297. <td class="art-col6">
  298. <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
  299. <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
  300. <span t-value="valor_10+(l.quantity * l.price_unit)"/></span>
  301. <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
  302. </span>
  303. </td>
  304. </tr>
  305. </table>
  306. </div>
  307. <t t-set="iva_5" t-value="0"/>
  308. <t t-set="iva_10" t-value="0"/>
  309. <div class="subtotal_data"> </div>
  310. <div class="subtotal_excentas"> </div>
  311. <div class="subtotal_5">
  312. <span t-esc="'{0:,.0f}'.format(int(valor_5)).replace(',', '.')"></span>
  313. <t t-set="iva_5" t-value="valor_5/21" />
  314. </div>
  315. <div class="subtotal_10">
  316. <span t-esc="'{0:,.0f}'.format(int(valor_10)).replace(',', '.')"></span>
  317. <t t-set="iva_10" t-value="valor_10/11" />
  318. </div>
  319. <div class="total_pagar_data"><b><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></b></div>
  320. <!-- <div class="total_pagar_data"><span t-esc="o.amount_total"/></div> -->
  321. <div class="total_pagar"><b><span t-esc="'{0:,.0f}'.format(int(o.amount_total)).replace(',', '.')"/></b></div>
  322. <div class="iva_5_data"><b>Liquidación del IVA 5%: </b><span t-esc="'{0:,.0f}'.format(iva_5)"></span></div>
  323. <div class="iva_10_data"><b>IVA 10%: </b><span t-esc="'{0:,.0f}'.format(iva_10)"></span></div>
  324. <div class="iva_total_data"><b>Total IVA: </b><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
  325. </div>
  326. <div class="logo1"> </div>
  327. </t>
  328. </div>
  329. </t>
  330. </t>
  331. </t>
  332. </template>
  333. </data>
  334. </openerp>