Merge lp:~vauxoo/openerp-venezuela-localization/gaby_l10n_ve_fiscal_reports into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Proposed by Gabriela Quilarque
Status: Merged
Merged at revision: 494
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/gaby_l10n_ve_fiscal_reports
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 6408 lines (+6228/-0)
32 files modified
l10n_ve_fiscal_reports/__init__.py (+36/-0)
l10n_ve_fiscal_reports/__openerp__.py (+66/-0)
l10n_ve_fiscal_reports/adjustment_book.py (+146/-0)
l10n_ve_fiscal_reports/adjustment_book.xml (+213/-0)
l10n_ve_fiscal_reports/data/l10n_ve_fiscal_reports.xml (+10/-0)
l10n_ve_fiscal_reports/fiscal_report_purchase_view.xml (+56/-0)
l10n_ve_fiscal_reports/fiscal_report_report.xml (+44/-0)
l10n_ve_fiscal_reports/fiscal_report_sale_view.xml (+56/-0)
l10n_ve_fiscal_reports/fiscal_report_whp.xml (+62/-0)
l10n_ve_fiscal_reports/fiscal_report_whs.xml (+53/-0)
l10n_ve_fiscal_reports/fiscal_report_wizard.xml (+40/-0)
l10n_ve_fiscal_reports/i18n/es_ES.po (+988/-0)
l10n_ve_fiscal_reports/invoice.py (+46/-0)
l10n_ve_fiscal_reports/invoice_view.xml (+32/-0)
l10n_ve_fiscal_reports/l10n_ve_fiscal_reports.py (+348/-0)
l10n_ve_fiscal_reports/report/__init__.py (+31/-0)
l10n_ve_fiscal_reports/report/book.py (+418/-0)
l10n_ve_fiscal_reports/report/book_seniat.rml (+673/-0)
l10n_ve_fiscal_reports/report/sources/witholding_book.rml (+246/-0)
l10n_ve_fiscal_reports/report/tiny_sxw2rml/__init__.py (+25/-0)
l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_odt2rml.xsl (+696/-0)
l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_oo2rml.xsl (+696/-0)
l10n_ve_fiscal_reports/report/tiny_sxw2rml/tiny_sxw2rml.py (+384/-0)
l10n_ve_fiscal_reports/report/wh_book.py (+135/-0)
l10n_ve_fiscal_reports/report/witholding_book.rml (+226/-0)
l10n_ve_fiscal_reports/security/ir.model.access.csv (+14/-0)
l10n_ve_fiscal_reports/wizard/__init__.py (+31/-0)
l10n_ve_fiscal_reports/wizard/sales_book_wizard.py (+163/-0)
l10n_ve_fiscal_reports/wizard/sales_book_wizard_view.xml (+34/-0)
l10n_ve_fiscal_reports/wizard/wiz_book.py (+83/-0)
l10n_ve_fiscal_reports/wizard/wiz_recalc_taxes.py (+94/-0)
l10n_ve_fiscal_reports/wizard/wiz_wh_book.py (+83/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/gaby_l10n_ve_fiscal_reports
Reviewer Review Type Date Requested Status
Gabriela Quilarque Pending
Review via email: mp+87100@code.launchpad.net

Description of the change

Update module l10n_ve_fiscal_reports.

To post a comment you must log in.
494. By Gabriela Quilarque

[IMP] Added module l10n_ve_fiscal_reports.
[IMP] Renamed old module l10n_ve_fiscal_reports to l10n_ve_fiscal_reports_V2.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'l10n_ve_fiscal_reports'
2=== added file 'l10n_ve_fiscal_reports/__init__.py'
3--- l10n_ve_fiscal_reports/__init__.py 1970-01-01 00:00:00 +0000
4+++ l10n_ve_fiscal_reports/__init__.py 2011-12-29 18:55:26 +0000
5@@ -0,0 +1,36 @@
6+# -*- encoding: utf-8 -*-
7+##############################################################################
8+#
9+# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
10+# Javier Duran <javier@vauxoo.com>
11+# Nhomar Hernandéz <nhomar@vauxoo.com>
12+#
13+#
14+# WARNING: This program as such is intended to be used by professional
15+# programmers who take the whole responsability of assessing all potential
16+# consequences resulting from its eventual inadequacies and bugs
17+# End users who are looking for a ready-to-use solution with commercial
18+# garantees and support are strongly adviced to contract a Free Software
19+# Service Company
20+#
21+# This program is Free Software; you can redistribute it and/or
22+# modify it under the terms of the GNU General Public License
23+# as published by the Free Software Foundation; either version 2
24+# of the License, or (at your option) any later version.
25+#
26+# This program is distributed in the hope that it will be useful,
27+# but WITHOUT ANY WARRANTY; without even the implied warranty of
28+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29+# GNU General Public License for more details.
30+#
31+# You should have received a copy of the GNU General Public License
32+# along with this program; if not, write to the Free Software
33+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34+#
35+##############################################################################
36+
37+import invoice
38+import l10n_ve_fiscal_reports
39+import report
40+import wizard
41+import adjustment_book
42
43=== added file 'l10n_ve_fiscal_reports/__openerp__.py'
44--- l10n_ve_fiscal_reports/__openerp__.py 1970-01-01 00:00:00 +0000
45+++ l10n_ve_fiscal_reports/__openerp__.py 2011-12-29 18:55:26 +0000
46@@ -0,0 +1,66 @@
47+# -*- encoding: utf-8 -*-
48+##############################################################################
49+#
50+# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
51+# Javier Duran <javier@vauxoo.com>
52+# Nhomar Hernandéz <nhomar@vauxoo.com>
53+#
54+#
55+# WARNING: This program as such is intended to be used by professional
56+# programmers who take the whole responsability of assessing all potential
57+# consequences resulting from its eventual inadequacies and bugs
58+# End users who are looking for a ready-to-use solution with commercial
59+# garantees and support are strongly adviced to contract a Free Software
60+# Service Company
61+#
62+# This program is Free Software; you can redistribute it and/or
63+# modify it under the terms of the GNU General Public License
64+# as published by the Free Software Foundation; either version 2
65+# of the License, or (at your option) any later version.
66+#
67+# This program is distributed in the hope that it will be useful,
68+# but WITHOUT ANY WARRANTY; without even the implied warranty of
69+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70+# GNU General Public License for more details.
71+#
72+# You should have received a copy of the GNU General Public License
73+# along with this program; if not, write to the Free Software
74+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
75+#
76+##############################################################################
77+
78+{
79+ "name" : "Fiscal Report For Venezuela",
80+ "version" : "0.3",
81+ "depends" : ["account","l10n_ve_withholding_iva",],
82+ "author" : "Vauxoo",
83+ "description" : """
84+ What this module does:
85+ Build all Fiscal Reports for Law in Venezuela.
86+ -- Purchase Report.
87+ -- Sales Report.
88+ -- Withholding Report.
89+ Sales, Purchase, ISLR and Munic.
90+ """,
91+ "website" : "http://openerp.com.ve",
92+ "category" : "Generic Modules/Accounting",
93+ "init_xml" : [
94+ ],
95+ "demo_xml" : [
96+ ],
97+ "update_xml" : [
98+ "security/ir.model.access.csv",
99+ "data/l10n_ve_fiscal_reports.xml",
100+ "fiscal_report_purchase_view.xml",
101+ "fiscal_report_sale_view.xml",
102+ "fiscal_report_whp.xml",
103+ "fiscal_report_whs.xml",
104+ "fiscal_report_report.xml",
105+ "fiscal_report_wizard.xml",
106+ "wizard/sales_book_wizard_view.xml",
107+ "invoice_view.xml",
108+ "adjustment_book.xml",
109+ ],
110+ "active": False,
111+ "installable": True,
112+}
113
114=== added file 'l10n_ve_fiscal_reports/adjustment_book.py'
115--- l10n_ve_fiscal_reports/adjustment_book.py 1970-01-01 00:00:00 +0000
116+++ l10n_ve_fiscal_reports/adjustment_book.py 2011-12-29 18:55:26 +0000
117@@ -0,0 +1,146 @@
118+#!/usr/bin/python
119+# -*- encoding: utf-8 -*-
120+###########################################################################
121+# Module Writen to OpenERP, Open Source Management Solution
122+# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
123+# All Rights Reserved
124+###############Credits######################################################
125+# Coded by: Humberto Arocha <humberto@openerp.com.ve>
126+# María Gabriela Quilarque <gabrielaquilarque97@gmail.com>
127+# Javier Duran <javier@vauxoo.com>
128+# Planified by: Nhomar Hernandez
129+# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
130+# Audited by: Humberto Arocha humberto@openerp.com.ve
131+#############################################################################
132+# This program is free software: you can redistribute it and/or modify
133+# it under the terms of the GNU General Public License as published by
134+# the Free Software Foundation, either version 3 of the License, or
135+# (at your option) any later version.
136+#
137+# This program is distributed in the hope that it will be useful,
138+# but WITHOUT ANY WARRANTY; without even the implied warranty of
139+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
140+# GNU General Public License for more details.
141+#
142+# You should have received a copy of the GNU General Public License
143+# along with this program. If not, see <http://www.gnu.org/licenses/>.
144+##############################################################################
145+from osv import osv
146+from osv import fields
147+from tools.translate import _
148+from tools import config
149+import time
150+import datetime
151+import decimal_precision as dp
152+
153+class adjustment_book(osv.osv):
154+
155+ def _get_amount_total(self,cr,uid,ids,name,args,context=None):
156+ res = {}
157+ for adj in self.browse(cr,uid,ids,context):
158+ res[adj.id] = {
159+ 'amount_total': 0.0,
160+ 'amount_untaxed_n_total' : 0.0,
161+ 'amount_with_vat_n_total': 0.0,
162+ 'amount_untaxed_i_total' : 0.0,
163+ 'amount_with_vat_i_total': 0.0,
164+ 'uncredit_fiscal_total' : 0.0,
165+ 'amount_with_vat_total' : 0.0,
166+ 'amount_base_total' : 0.0,
167+ 'amount_percent_total' : 0.0,
168+ }
169+ for line in adj.adjustment_ids:
170+ res[adj.id]['amount_total'] += line.amount
171+ res[adj.id]['amount_untaxed_n_total'] += line.amount_untaxed_n
172+ res[adj.id]['amount_with_vat_n_total'] += line.amount_with_vat_n
173+ res[adj.id]['amount_untaxed_i_total'] += line.amount_untaxed_i
174+ res[adj.id]['amount_with_vat_i_total'] += line.amount_with_vat_i
175+ res[adj.id]['uncredit_fiscal_total'] += line.uncredit_fiscal
176+ res[adj.id]['amount_with_vat_total'] += line.amount_with_vat
177+ res[adj.id]['amount_base_total'] += adj.vat_general_i+adj.vat_general_add_i+adj.vat_reduced_i+adj.vat_general_n+\
178+ adj.vat_general_add_n+adj.vat_reduced_n+adj.no_grav+adj.sale_export
179+ res[adj.id]['amount_percent_total'] += adj.vat_general_icf+adj.vat_general_add_icf+adj.vat_reduced_icf+adj.vat_general_ncf+\
180+ adj.vat_general_add_ncf+adj.vat_reduced_ncf+adj.adjustment_cf+adj.sale_export_cf
181+
182+ return res
183+
184+ _name='adjustment.book'
185+ _columns={
186+ 'name':fields.char('Description', size=256,required=True,help="Description of adjustment book"),
187+ 'period_id':fields.many2one('account.period','Period',required=True,help="Period of adjustment book"),
188+ 'adjustment_ids': fields.one2many('adjustment.book.line','adjustment_id','Adjustment Book Line'),
189+ 'note': fields.text('Note',required=True),
190+ 'type': fields.selection([
191+ ('sale','Sale'),
192+ ('purchase', 'Purchase'),
193+ ],'Type', select=True, required=True, help="Type of adjustment book: Sale or Purchase"),
194+ 'amount_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Total Withholding VAT',readonly=True,help="Amount Total for adjustment book of invoice"),
195+ 'amount_untaxed_n_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Untaxed National',readonly=True,help="Amount Total Untaxed for adjustment book of nacional operations"),
196+ 'amount_with_vat_n_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Withheld National',readonly=True,help="Amount Total Withheld for adjustment book of national operations"),
197+ 'amount_untaxed_i_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Untaxed International',readonly=True,help="Amount Total Untaxed for adjustment book of internacional operations"),
198+ 'amount_with_vat_i_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Withheld International',readonly=True,help="Amount Total Withheld for adjustment book of international operations"),
199+ 'uncredit_fiscal_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Sin derecho a credito fiscal',readonly=True,help="Sin derecho a credito fiscal"),
200+ 'amount_with_vat_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Amount Withholding VAT Total',readonly=True,help="Amount Total Withholding VAT for adjustment book"),
201+ 'no_grav': fields.float('Compras/Ventas no Gravadas y/o SDCF', digits_compute= dp.get_precision('Fiscal Report'),help="Compras/Ventas no gravadas y/o sin derecho a credito fiscal/ Ventas Internas no grabadas"),
202+ 'vat_general_i': fields.float('Alicuota general', digits_compute= dp.get_precision('Fiscal Report'), help="Importaciones gravadas por alicuota general"),
203+ 'vat_general_add_i': fields.float('Alicuota general + Alicuota adicional', digits_compute= dp.get_precision('Fiscal Report'),help="Importaciones gravadas por alicuota general mas alicuota adicional"),
204+ 'vat_reduced_i': fields.float('Alicuota Reducida', digits_compute= dp.get_precision('Fiscal Report'),help="Importaciones gravadas por alicuota reducida"),
205+ 'vat_general_n': fields.float('Alicuota general', digits_compute= dp.get_precision('Fiscal Report'),help="Compras gravadas por alicuota general/Ventas internas gravadas por alicuota general"),
206+ 'vat_general_add_n': fields.float('Alicuota general + Alicuota adicional', digits_compute= dp.get_precision('Fiscal Report'),help="Compras/Ventas internas gravadas por alicuota general mas alicuota adicional"),
207+ 'vat_reduced_n': fields.float('Alicuota Reducida', digits_compute= dp.get_precision('Fiscal Report'),help="Compras/Ventas Internas gravadas por alicuota reducida"),
208+ 'vat_general_icf': fields.float('Alicuota general', digits_compute= dp.get_precision('Fiscal Report'), help="Importaciones gravadas por alicuota general"),
209+ 'vat_general_add_icf': fields.float('Alicuota general + Alicuota adicional', digits_compute= dp.get_precision('Fiscal Report'),help="Importaciones gravadas por alicuota general mas alicuota adicional"),
210+ 'vat_reduced_icf': fields.float('Alicuota Reducida', digits_compute= dp.get_precision('Fiscal Report'),help="Importaciones gravadas por alicuota reducida"),
211+ 'vat_general_ncf': fields.float('Alicuota general', digits_compute= dp.get_precision('Fiscal Report'),help="Compras gravadas por alicuota general/Ventas internas gravadas por alicuota general"),
212+ 'vat_general_add_ncf': fields.float('Alicuota general + Alicuota adicional', digits_compute= dp.get_precision('Fiscal Report'),help="Compras/Ventas internas gravadas por alicuota general mas alicuota adicional"),
213+ 'vat_reduced_ncf': fields.float('Alicuota Reducida', digits_compute= dp.get_precision('Fiscal Report'),help="Compras/Ventas Internas gravadas por alicuota reducida"),
214+ 'adjustment_cf': fields.float('Ajustes', digits_compute= dp.get_precision('Fiscal Report'),help="Ajustes a los creditos/debitos fiscales de los periodos anteriores"),
215+ 'amount_base_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Total Base Imponible',readonly=True,help="TOTAL COMPRAS DEL PERIODO/TOTAL VENTAS PARA EFECTOS DE DETERMINACION"),
216+ 'amount_percent_total':fields.function(_get_amount_total,multi='all',method=True,digits_compute= dp.get_precision('Fiscal Report'),string='Total % Fiscal',readonly=True,help="TOTALCREDITOS FISCALES DEL PERIODO/TOTAL DEBITOS FISCALES PARA EFECTOS DE DETERMINACION"),
217+ 'sale_export':fields.float('Ventas de Exportacion', digits_compute= dp.get_precision('Fiscal Report'),help="Ventas de Exportacion"),
218+ 'sale_export_cf':fields.float('Ventas de Exportacion', digits_compute= dp.get_precision('Fiscal Report'),help="Ventas de Exportacion"),
219+ }
220+
221+ _sql_constraints = [
222+ ('period_id_type_uniq', 'unique (period_id,type)', 'The period and type combination must be unique!')
223+ ]
224+
225+
226+adjustment_book()
227+
228+
229+class adjustment_book_line(osv.osv):
230+
231+ _name='adjustment.book.line'
232+ _columns={
233+ 'date_accounting': fields.date('Date Accounting', required=True,help="Date accounting for adjustment book"),
234+ 'date_admin': fields.date('Date Administrative',required=True, help="Date administrative for adjustment book"),
235+ 'vat':fields.char('Vat', size=10,required=True,help="Vat of partner for adjustment book"),
236+ 'partner':fields.char('Partner', size=256,required=True,help="Partner for adjustment book"),
237+ 'invoice_number':fields.char('Invoice Number', size=256,required=True,help="Invoice number for adjustment book"),
238+ 'control_number':fields.char('Invoice Control', size=256,required=True,help="Invoice control for adjustment book"),
239+ 'amount':fields.float('Amount Document at Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount document for adjustment book"),
240+ 'amount':fields.float('Amount Document at Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount document for adjustment book"),
241+ 'type_doc': fields.selection([
242+ ('F','Invoice'),
243+ ('ND', 'Debit Note'),
244+ ('NC', 'Credit Note'),
245+ ],'Document Type', select=True, required=True, help="Type of Document for adjustment book: -Invoice(F),-Debit Note(dn),-Credit Note(cn)"),
246+ 'doc_affected':fields.char('Affected Document', size=256,required=True,help="Affected Document for adjustment book"),
247+ 'uncredit_fiscal':fields.float('Sin derecho a Credito Fiscal',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Sin derechoa credito fiscal"),
248+ 'amount_untaxed_n': fields.float('Amount Untaxed',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount untaxed for national operations"),
249+ 'percent_with_vat_n': fields.float('% Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Percent(%) VAT for national operations"),
250+ 'amount_with_vat_n': fields.float('Amount Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Percent(%) VAT for national operations"),
251+ 'amount_untaxed_i': fields.float('Amount Untaxed',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount untaxed for international operations"),
252+ 'percent_with_vat_i': fields.float('% Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Percent(%) VAT for international operations"),
253+ 'amount_with_vat_i': fields.float('Amount Withholding VAT',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount withholding VAT for international operations"),
254+ 'amount_with_vat': fields.float('Amount Withholding VAT Total',digits_compute= dp.get_precision('Fiscal Report'),required=True,help="Amount withheld VAT total"),
255+ 'voucher': fields.char('Voucher Withholding VAT', size=256,required=True,help="Voucher Withholding VAT"),
256+ 'adjustment_id':fields.many2one('adjustment.book','Adjustment Book')
257+ }
258+ _rec_rame = 'partner'
259+
260+adjustment_book_line()
261+
262+
263+
264
265=== added file 'l10n_ve_fiscal_reports/adjustment_book.xml'
266--- l10n_ve_fiscal_reports/adjustment_book.xml 1970-01-01 00:00:00 +0000
267+++ l10n_ve_fiscal_reports/adjustment_book.xml 2011-12-29 18:55:26 +0000
268@@ -0,0 +1,213 @@
269+<?xml version="1.0" encoding="utf-8"?>
270+<openerp>
271+ <data>
272+
273+ <!--
274+ =====================================================
275+ ADJUSTMENT BOOK
276+ =====================================================
277+ -->
278+
279+ <record id="view_adjustment_book_line_line_form" model="ir.ui.view">
280+ <field name="name">adjustment.book.line.form</field>
281+ <field name="model">adjustment.book.line</field>
282+ <field name="type">form</field>
283+ <field name="arch" type="xml">
284+ <form string="Adjustment Book Line">
285+ <group col="4" colspan="4">
286+ <field name="date_accounting" select="1"/>
287+ <field name="date_admin" select="1"/>
288+ <field name="vat" select="1"/>
289+ <field name="partner" select="1"/>
290+ <field name="invoice_number" select="1"/>
291+ <field name="control_number" select="1"/>
292+ <field name="amount"/>
293+ <field name="type_doc"/>
294+ <field name="doc_affected"/>
295+ <field name="uncredit_fiscal"/>
296+ <field name="amount_with_vat"/>
297+ <field name="voucher"/>
298+ </group>
299+ <newline/>
300+ <separator string="National Operations" colspan="6"/>
301+ <newline/>
302+ <group col="4" colspan="4">
303+ <field name="amount_untaxed_n"/>
304+ <field name="percent_with_vat_n"/>
305+ <field name="amount_with_vat_n"/>
306+ </group>
307+ <newline/>
308+ <separator string="International Operations" colspan="6"/>
309+ <newline/>
310+ <group col="4" colspan="4">
311+ <field name="amount_untaxed_i"/>
312+ <field name="percent_with_vat_i"/>
313+ <field name="amount_with_vat_i"/>
314+ </group>
315+ </form>
316+ </field>
317+ </record>
318+
319+ <record id="view_adjustment_book_tree" model="ir.ui.view">
320+ <field name="name">adjustment.book.tree</field>
321+ <field name="model">adjustment.book</field>
322+ <field name="type">tree</field>
323+ <field name="arch" type="xml">
324+ <tree string="Adjustment Book">
325+ <field name="name"/>
326+ <field name="type"/>
327+ <field name="period_id"/>
328+ <field name="note"/>
329+ </tree>
330+ </field>
331+ </record>
332+
333+ <record id="view_adjustment_book_line_tree" model="ir.ui.view">
334+ <field name="name">adjustment.book.line.tree</field>
335+ <field name="model">adjustment.book.line</field>
336+ <field name="type">tree</field>
337+ <field name="arch" type="xml">
338+ <tree string="Adjustment Book Line">
339+ <field name="date_accounting"/>
340+ <field name="date_admin"/>
341+ <field name="vat"/>
342+ <field name="partner"/>
343+ <field name="invoice_number"/>
344+ <field name="control_number"/>
345+ <field name="amount"/>
346+ <field name="type_doc"/>
347+ <field name="uncredit_fiscal"/>
348+ <field name="doc_affected"/>
349+ <field name="amount_untaxed_n"/>
350+ <field name="percent_with_vat_n"/>
351+ <field name="amount_with_vat_n"/>
352+ <field name="amount_untaxed_i"/>
353+ <field name="percent_with_vat_i"/>
354+ <field name="amount_with_vat_i"/>
355+ </tree>
356+ </field>
357+ </record>
358+
359+ <record id="view_adjustment_bookr_form" model="ir.ui.view">
360+ <field name="name">adjustment.book.form</field>
361+ <field name="model">adjustment.book</field>
362+ <field name="type">form</field>
363+ <field name="arch" type="xml">
364+ <form string="Adjustment Book">
365+ <group col="6" colspan="6">
366+ <field name="name" select="1"/>
367+ <field name="type" select="1"/>
368+ <field name="period_id" select="1"/>
369+ </group>
370+ <notebook colspan="8">
371+ <page string="Adjustment Book Lines">
372+ <field name="adjustment_ids" nolabel="1" colspan='4'/>
373+ <group col="8" colspan="8">
374+ <field name="amount_total"/>
375+ <field name="uncredit_fiscal_total"/>
376+ <field name="amount_with_vat_total"/>
377+ <hpaned/>
378+ <hpaned/>
379+ </group>
380+ <group col="8" colspan="8">
381+ <field name="amount_untaxed_n_total"/>
382+ <field name="amount_with_vat_n_total"/>
383+ <field name="amount_untaxed_i_total"/>
384+ <field name="amount_with_vat_i_total"/>
385+ </group>
386+ <group col="4" colspan="4">
387+ <separator string="Explanation about this adjustment"/>
388+ <newline/>
389+ <field name="note" nolabel="1"/>
390+ </group>
391+ </page>
392+ <page string="Totales">
393+ <group colspan="4" col="6">
394+ <field name="no_grav" colspan="4"/>
395+ </group>
396+ <notebook colspan="8">
397+ <page string="Base Imponible" >
398+ <group colspan="4" col="6">
399+ <group colspan="4" col="2">
400+ <separator string="Internacionales" colspan="4"/>
401+ <field name="vat_general_i" attrs="{'readonly':[('type','=','sale')]}"/>
402+ <field name="vat_general_add_i" attrs="{'readonly':[('type','=','sale')]}"/>
403+ <field name="vat_reduced_i" attrs="{'readonly':[('type','=','sale')]}"/>
404+ <field name="sale_export" attrs="{'readonly':[('type','=','purchase')]}"/>
405+ </group>
406+ <group colspan="1" col="2">
407+ <separator string="Nacionales" colspan="2"/>
408+ <field name="vat_general_n"/>
409+ <field name="vat_general_add_n"/>
410+ <field name="vat_reduced_n"/>
411+ </group>
412+ <group colspan="1" col="2">
413+ <separator string="Total y Ajuste" colspan="2"/>
414+ <field name="amount_base_total" colspan="4"/>
415+ </group>
416+ </group>
417+ </page>
418+ </notebook>
419+ <notebook colspan="8">
420+ <page string="Porcentaje Fiscal" >
421+ <group colspan="4" col="6">
422+ <group colspan="4" col="2">
423+ <separator string="Internacionales" colspan="4"/>
424+ <field name="vat_general_icf" attrs="{'readonly':[('type','=','sale')]}"/>
425+ <field name="vat_general_add_icf" attrs="{'readonly':[('type','=','sale')]}"/>
426+ <field name="vat_reduced_icf" attrs="{'readonly':[('type','=','sale')]}"/>
427+ <field name="sale_export_cf" attrs="{'readonly':[('type','=','purchase')]}"/>
428+ </group>
429+ <group colspan="1" col="2">
430+ <separator string="Nacionales" colspan="2"/>
431+ <field name="vat_general_ncf"/>
432+ <field name="vat_general_add_ncf"/>
433+ <field name="vat_reduced_ncf"/>
434+ </group>
435+ <group colspan="1" col="2">
436+ <separator string="Total y Ajuste" colspan="2"/>
437+ <field name="adjustment_cf" colspan="4"/>
438+ <field name="amount_percent_total" colspan="4"/>
439+ </group>
440+ </group>
441+ </page>
442+ </notebook>
443+ </page>
444+ </notebook>
445+ </form>
446+ </field>
447+ </record>
448+
449+ <record model="ir.actions.act_window" id="action_adjustment_book">
450+ <field name="name">Adjustment Book</field>
451+ <field name="res_model">adjustment.book</field>
452+ <field name="type">ir.actions.act_window</field>
453+ <field name="view_type">form</field>
454+ <field name="view_mode">tree,form</field>
455+ </record>
456+
457+ <record model="ir.actions.act_window.view" id="action_adjustment_book_tree">
458+ <field name="sequence" eval="10"/>
459+ <field name="view_mode">tree</field>
460+ <field name="view_id" ref="view_adjustment_book_tree"/>
461+ <field name="act_window_id" ref="action_adjustment_book"/>
462+ </record>
463+ <record model="ir.actions.act_window.view" id="action_adjustment_book_form">
464+ <field name="sequence" eval="20"/>
465+ <field name="view_mode">form</field>
466+ <field name="view_id" ref="view_adjustment_bookr_form"/>
467+ <field name="act_window_id" ref="action_adjustment_book"/>
468+ </record>
469+
470+ <menuitem name="Adjustment Book"
471+ id="menu_adjustment_book"
472+ parent="l10n_ve_fiscal_reports.menu_fr_main"
473+ action="action_adjustment_book"/>
474+
475+ </data>
476+</openerp>
477+
478+
479+
480+
481+
482
483=== added directory 'l10n_ve_fiscal_reports/data'
484=== added file 'l10n_ve_fiscal_reports/data/l10n_ve_fiscal_reports.xml'
485--- l10n_ve_fiscal_reports/data/l10n_ve_fiscal_reports.xml 1970-01-01 00:00:00 +0000
486+++ l10n_ve_fiscal_reports/data/l10n_ve_fiscal_reports.xml 2011-12-29 18:55:26 +0000
487@@ -0,0 +1,10 @@
488+<?xml version="1.0"?>
489+<openerp>
490+ <data noupdate="1">
491+ <!-- Decimal Precision -->
492+ <record forcecreate="True" id="decimal_fiscal_report" model="decimal.precision">
493+ <field name="name">Fiscal Report</field>
494+ <field name="digits">2</field>
495+ </record>
496+ </data>
497+</openerp>
498
499=== added file 'l10n_ve_fiscal_reports/fiscal_report_purchase_view.xml'
500--- l10n_ve_fiscal_reports/fiscal_report_purchase_view.xml 1970-01-01 00:00:00 +0000
501+++ l10n_ve_fiscal_reports/fiscal_report_purchase_view.xml 2011-12-29 18:55:26 +0000
502@@ -0,0 +1,56 @@
503+<?xml version="1.0"?>
504+<openerp>
505+ <data>
506+
507+ <record model="ir.ui.view" id="view_fiscal_reports_purchase_form">
508+ <field name="name">fiscal.reports.purchase.form</field>
509+ <field name="model">fiscal.reports.purchase</field>
510+ <field name="type">form</field>
511+ <field name="arch" type="xml">
512+ <form string="Detail of entry">
513+ <group col="6" colspan="4">
514+ <field name="ai_date_invoice"/>
515+ <field name="rp_vat"/>
516+ <field name="rp_id"/>
517+ <field name="ai_nro_ctrl"/>
518+ <field name="ai_reference"/>
519+ <field name="ai_amount_total"/>
520+ <field name="ai_amount_untaxed"/>
521+ <field name="ai_amount_tax"/>
522+ <field name="ai_type"/>
523+ <field name="rp_retention"/>
524+ <field name="ai_id"/>
525+ </group>
526+ </form>
527+ </field>
528+ </record>
529+ <record model="ir.ui.view" id="view_fiscal_reports_purchase_tree">
530+ <field name="name">fiscal.reports.purchase.tree</field>
531+ <field name="model">fiscal.reports.purchase</field>
532+ <field name="type">tree</field>
533+ <field name="arch" type="xml">
534+ <tree string="List of Purchases." editable="top/bottom">
535+ <field name="ai_date_invoice"/>
536+ <field name="rp_vat"/>
537+ <field name="rp_id"/>
538+ <field name="ai_nro_ctrl"/>
539+ <field name="ai_reference"/>
540+ <field name="ai_amount_total"/>
541+ <field name="ai_amount_untaxed"/>
542+ <field name="ai_amount_tax"/>
543+ <field name="ai_type"/>
544+ <field name="rp_retention"/>
545+ <field name="ai_id"/>
546+ </tree>
547+ </field>
548+ </record>
549+ <record id="action_fiscal_reports_purchase_tree" model="ir.actions.act_window">
550+ <field name="name">Profit by Product</field>
551+ <field name="res_model">fiscal.reports.purchase</field>
552+ <field name="view_type">form</field>
553+ <field name="view_mode">tree,form</field>
554+ </record>
555+ <menuitem id="menu_fr_main" name="Fiscal Reporting for SENIAT" parent="account.menu_finance_reporting" groups="account.group_account_manager"/>
556+ <menuitem id="menu_fiscal_reports_purchase_tree" name="Purchase Book" parent="l10n_ve_fiscal_reports.menu_fr_main" action="action_fiscal_reports_purchase_tree" groups="account.group_account_manager"/>
557+ </data>
558+</openerp>
559
560=== added file 'l10n_ve_fiscal_reports/fiscal_report_report.xml'
561--- l10n_ve_fiscal_reports/fiscal_report_report.xml 1970-01-01 00:00:00 +0000
562+++ l10n_ve_fiscal_reports/fiscal_report_report.xml 2011-12-29 18:55:26 +0000
563@@ -0,0 +1,44 @@
564+<?xml version="1.0" encoding="utf-8"?>
565+<openerp>
566+ <data>
567+<!--Purchases and Sales-->
568+ <report
569+ id="report_purchase_seniat"
570+ model="fiscal.reports.purchase"
571+ name="fiscal.reports.purchase.purchase_seniat"
572+ rml="l10n_ve_fiscal_reports/report/book_seniat.rml"
573+ sxw="l10n_ve_fiscal_reports/report/sources/book_seniat.sxw"
574+ string="Book Sales and Purchase SENIAT"
575+ auto="False"
576+ menu="False"/>
577+<!-- <report
578+ id="report_sale_seniat"
579+ model="fiscal.reports.sale"
580+ name="fiscal.reports.purchase.sale_seniat"
581+ rml="l10n_ve_fiscal_reports/report/sale_seniat.rml"
582+ sxw="l10n_ve_fiscal_reports/report/sources/sale_seniat.sxw"
583+ string="Sale SENIAT"
584+ auto="False" /> -->
585+
586+<!--Withholding purchases and sales [whp and whs]-->
587+ <report
588+ id="report_whp_seniat"
589+ model="fiscal.reports.whp"
590+ name="fiscal.reports.whp.whp_seniat"
591+ rml="l10n_ve_fiscal_reports/report/witholding_book.rml"
592+ sxw="l10n_ve_fiscal_reports/report/sources/witholding_book.sxw"
593+ string="Witholding Purchase SENIAT"
594+ auto="False"
595+ menu="False"/>
596+
597+<!-- <report
598+ id="report_whs_seniat"
599+ model="fiscal.reports.whs"
600+ name="fiscal.reports.purchase.whs_seniat"
601+ rml="l10n_ve_fiscal_reports/report/whs_seniat.rml"
602+ sxw="l10n_ve_fiscal_reports/report/sources/whs_seniat.sxw"
603+ string="Whitholding Purchase SENIAT"
604+ auto="False" />
605+-->
606+ </data>
607+</openerp>
608
609=== added file 'l10n_ve_fiscal_reports/fiscal_report_sale_view.xml'
610--- l10n_ve_fiscal_reports/fiscal_report_sale_view.xml 1970-01-01 00:00:00 +0000
611+++ l10n_ve_fiscal_reports/fiscal_report_sale_view.xml 2011-12-29 18:55:26 +0000
612@@ -0,0 +1,56 @@
613+<?xml version="1.0"?>
614+<openerp>
615+ <data>
616+ <record model="ir.ui.view" id="view_fiscal_reports_sale_form">
617+ <field name="name">fiscal.reports.sale.form</field>
618+ <field name="model">fiscal.reports.sale</field>
619+ <field name="type">form</field>
620+ <field name="arch" type="xml">
621+ <form string="Detail of entry">
622+ <group col="6" colspan="4">
623+ <field name="ai_date_document" readonly="1"/>
624+ <field name="ai_date_invoice" readonly="1"/>
625+ <field name="rp_vat" readonly="1"/>
626+ <field name="rp_id" readonly="1"/>
627+ <field name="ai_nro_ctrl" readonly="1"/>
628+ <field name="ai_reference" readonly="1"/>
629+ <field name="ai_amount_total" readonly="1"/>
630+ <field name="ai_amount_untaxed" readonly="1"/>
631+ <field name="ai_amount_tax" readonly="1"/>
632+ <field name="ai_type" readonly="1"/>
633+ <field name="rp_retention" readonly="1"/>
634+ <field name="ai_id" readonly="1"/>
635+ </group>
636+ </form>
637+ </field>
638+ </record>
639+ <record model="ir.ui.view" id="view_fiscal_reports_sale_tree">
640+ <field name="name">fiscal.reports.sale.tree</field>
641+ <field name="model">fiscal.reports.sale</field>
642+ <field name="type">tree</field>
643+ <field name="arch" type="xml">
644+ <tree string="List of Purchases.">
645+ <field name="ai_date_document"/>
646+ <field name="ai_date_invoice"/>
647+ <field name="rp_vat"/>
648+ <field name="rp_id"/>
649+ <field name="ai_nro_ctrl"/>
650+ <field name="ai_reference"/>
651+ <field name="ai_amount_total"/>
652+ <field name="ai_amount_untaxed"/>
653+ <field name="ai_amount_tax"/>
654+ <field name="ai_type"/>
655+ <field name="rp_retention"/>
656+ <field name="ai_id"/>
657+ </tree>
658+ </field>
659+ </record>
660+ <record id="action_fiscal_reports_sale_tree" model="ir.actions.act_window">
661+ <field name="name">Fiscal Report Sales</field>
662+ <field name="res_model">fiscal.reports.sale</field>
663+ <field name="view_type">form</field>
664+ <field name="view_mode">tree,form</field>
665+ </record>
666+ <menuitem id="menu_fiscal_reports_sale_tree" name="Sales Book" parent="l10n_ve_fiscal_reports.menu_fr_main" action="action_fiscal_reports_sale_tree" groups="account.group_account_manager"/>
667+ </data>
668+</openerp>
669
670=== added file 'l10n_ve_fiscal_reports/fiscal_report_whp.xml'
671--- l10n_ve_fiscal_reports/fiscal_report_whp.xml 1970-01-01 00:00:00 +0000
672+++ l10n_ve_fiscal_reports/fiscal_report_whp.xml 2011-12-29 18:55:26 +0000
673@@ -0,0 +1,62 @@
674+<?xml version="1.0"?>
675+<openerp>
676+ <data>
677+
678+ <record model="ir.ui.view" id="view_fiscal_reports_whp_form">
679+ <field name="name">fiscal.reports.whp.form</field>
680+ <field name="model">fiscal.reports.whp</field>
681+ <field name="type">form</field>
682+ <field name="arch" type="xml">
683+ <form string="Detail of entry">
684+ <group col="6" colspan="4">
685+ <field name="ar_date_ret"/>
686+ <field name="rp_vat"/>
687+ <field name="rp_id"/>
688+ <field name="ar_number"/>
689+ <field name="ai_reference"/>
690+ <field name="ai_amount_total"/>
691+ <field name="ai_amount_untaxed"/>
692+ <field name="ai_amount_tax"/>
693+ <field name="ar_line_id"/>
694+ </group>
695+ </form>
696+ </field>
697+ </record>
698+ <record model="ir.ui.view" id="view_fiscal_reports_whp_tree">
699+ <field name="name">fiscal.reports.whp.tree</field>
700+ <field name="model">fiscal.reports.whp</field>
701+ <field name="type">tree</field>
702+ <field name="arch" type="xml">
703+ <tree string="List of Purchases." editable="top/bottom">
704+ <field name="ar_date_ret"/>
705+ <field name="rp_vat"/>
706+ <field name="rp_id"/>
707+ <field name="ar_number"/>
708+ <field name="ai_reference"/>
709+ <field name="ai_amount_total"/>
710+ <field name="ai_amount_untaxed"/>
711+ <field name="ai_amount_tax"/>
712+ <field name="ar_line_id"/>
713+ </tree>
714+ </field>
715+ </record>
716+<!--
717+ 'ar_date_ret': fields.date('Date ret.'),
718+ 'rp_vat':fields.char('Vat Number', size=64, readonly=True),
719+ 'rp_id':fields.many2one('res.partner', 'Partner', required=False),
720+ 'ar_number':fields.char('Retention Number', size=64, required=False, readonly=False),
721+ 'ai_reference':fields.char('Invoice Number', size=64, required=False, readonly=False),
722+ 'ai_amount_total': fields.float('Amount Total', digits=(16, int(config['price_accuracy']))),
723+ 'ai_amount_untaxed': fields.float('Amount Untaxed', digits=(16, int(config['price_accuracy']))),
724+ 'ai_amount_tax': fields.float('Amount tax', digits=(16, int(config['price_accuracy']))),
725+ 'ar_line_id':fields.many2one('account.retention.line', 'Account Retention', required=False),
726+-->
727+ <record id="action_fiscal_reports_whp_tree" model="ir.actions.act_window">
728+ <field name="name">Profit by Product</field>
729+ <field name="res_model">fiscal.reports.whp</field>
730+ <field name="view_type">form</field>
731+ <field name="view_mode">tree,form</field>
732+ </record>
733+ <menuitem id="menu_fiscal_reports_whp_tree" name="Purchase Witholding Book" parent="l10n_ve_fiscal_reports.menu_fr_main" action="action_fiscal_reports_whp_tree" groups="account.group_account_manager"/>
734+ </data>
735+</openerp>
736
737=== added file 'l10n_ve_fiscal_reports/fiscal_report_whs.xml'
738--- l10n_ve_fiscal_reports/fiscal_report_whs.xml 1970-01-01 00:00:00 +0000
739+++ l10n_ve_fiscal_reports/fiscal_report_whs.xml 2011-12-29 18:55:26 +0000
740@@ -0,0 +1,53 @@
741+<?xml version="1.0"?>
742+<openerp>
743+ <data>
744+
745+ <record model="ir.ui.view" id="view_fiscal_reports_whs_form">
746+ <field name="name">fiscal.reports.whs.form</field>
747+ <field name="model">fiscal.reports.whs</field>
748+ <field name="type">form</field>
749+ <field name="arch" type="xml">
750+ <form string="Detail of entry">
751+ <group col="6" colspan="4">
752+ <field name="ar_date_ret"/>
753+ <field name="rp_vat"/>
754+ <field name="rp_id"/>
755+ <field name="ar_number"/>
756+ <field name="ai_number"/>
757+ <field name="ai_id"/>
758+ <field name="ai_amount_total"/>
759+ <field name="ai_amount_untaxed"/>
760+ <field name="ai_amount_tax"/>
761+ <field name="ar_id"/>
762+ </group>
763+ </form>
764+ </field>
765+ </record>
766+ <record model="ir.ui.view" id="view_fiscal_reports_whs_tree">
767+ <field name="name">fiscal.reports.whs.tree</field>
768+ <field name="model">fiscal.reports.whs</field>
769+ <field name="type">tree</field>
770+ <field name="arch" type="xml">
771+ <tree string="List of Purchases." editable="top/bottom">
772+ <field name="ar_date_ret"/>
773+ <field name="rp_vat"/>
774+ <field name="rp_id"/>
775+ <field name="ar_number"/>
776+ <field name="ai_number"/>
777+ <field name="ai_id"/>
778+ <field name="ai_amount_total"/>
779+ <field name="ai_amount_untaxed"/>
780+ <field name="ai_amount_tax"/>
781+ <field name="ar_id"/>
782+ </tree>
783+ </field>
784+ </record>
785+ <record id="action_fiscal_reports_whs_tree" model="ir.actions.act_window">
786+ <field name="name">whitholding Sales.</field>
787+ <field name="res_model">fiscal.reports.whs</field>
788+ <field name="view_type">form</field>
789+ <field name="view_mode">tree,form</field>
790+ </record>
791+ <menuitem id="menu_fiscal_reports_whs_tree" name="Sale Witholding Book" parent="l10n_ve_fiscal_reports.menu_fr_main" action="action_fiscal_reports_whs_tree" groups="account.group_account_manager"/>
792+ </data>
793+</openerp>
794
795=== added file 'l10n_ve_fiscal_reports/fiscal_report_wizard.xml'
796--- l10n_ve_fiscal_reports/fiscal_report_wizard.xml 1970-01-01 00:00:00 +0000
797+++ l10n_ve_fiscal_reports/fiscal_report_wizard.xml 2011-12-29 18:55:26 +0000
798@@ -0,0 +1,40 @@
799+<?xml version="1.0" encoding="utf-8"?>
800+<openerp>
801+ <data>
802+
803+ <wizard
804+ id="wizard_wh_book"
805+ model="fiscal.reports.whp"
806+ name="fiscal.reports.whp.wh_book"
807+ string="Witholding Book"/>
808+
809+ <menuitem
810+ name="Print Report Witholding Sales or Purchase"
811+ parent="l10n_ve_fiscal_reports.menu_fr_main"
812+ action="wizard_wh_book"
813+ type="wizard"
814+ icon="STOCK_PRINT"
815+ id="menu_wizard_wh_book_report"
816+ groups="account.group_account_manager"
817+ sequence="50"/>
818+
819+ <wizard
820+ id="wizard_recalc_taxes"
821+ model="fiscal.reports.whp"
822+ name="fiscal.recalc.taxes"
823+ string="Recompute Taxes"
824+ menu="False"/>
825+ <menuitem
826+ name="Recompute Taxes."
827+ parent="l10n_ve_fiscal_reports.menu_fr_main"
828+ action="wizard_recalc_taxes"
829+ type="wizard"
830+ icon="STOCK_EXECUTE"
831+ id="menu_wizard_recompute_report"
832+ groups="account.group_account_manager"
833+ sequence="51"/>
834+
835+
836+ </data>
837+</openerp>
838+
839
840=== added directory 'l10n_ve_fiscal_reports/i18n'
841=== added file 'l10n_ve_fiscal_reports/i18n/es_ES.po'
842--- l10n_ve_fiscal_reports/i18n/es_ES.po 1970-01-01 00:00:00 +0000
843+++ l10n_ve_fiscal_reports/i18n/es_ES.po 2011-12-29 18:55:26 +0000
844@@ -0,0 +1,988 @@
845+# Translation of OpenERP Server.
846+# This file contains the translation of the following modules:
847+# * l10n_ve_fiscal_reports
848+#
849+msgid ""
850+msgstr ""
851+"Project-Id-Version: OpenERP Server 5.0.16\n"
852+"Report-Msgid-Bugs-To: support@openerp.com\n"
853+"POT-Creation-Date: 2011-08-30 00:27:23+0000\n"
854+"PO-Revision-Date: 2011-08-30 00:27:23+0000\n"
855+"Last-Translator: <>\n"
856+"Language-Team: \n"
857+"MIME-Version: 1.0\n"
858+"Content-Type: text/plain; charset=UTF-8\n"
859+"Content-Transfer-Encoding: \n"
860+"Plural-Forms: \n"
861+
862+#. module: l10n_ve_fiscal_reports
863+#: help:adjustment.book.line,date_admin:0
864+msgid "Date administrative for adjustment book"
865+msgstr "Fecha administrativa para el libro de ajuste"
866+
867+#. module: l10n_ve_fiscal_reports
868+#: model:ir.actions.wizard,name:l10n_ve_fiscal_reports.wizard_wh_book
869+msgid "Witholding Book"
870+msgstr "Libro de Retención"
871+
872+#. module: l10n_ve_fiscal_reports
873+#: field:adjustment.book.line,uncredit_fiscal:0
874+msgid "Sin derecho a Credito Fiscal"
875+msgstr "SDCF"
876+
877+#. module: l10n_ve_fiscal_reports
878+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
879+#: rml:fiscal.reports.whp.whp_seniat_HG:0
880+msgid "Impuesto"
881+msgstr "Impuesto"
882+
883+#. module: l10n_ve_fiscal_reports
884+#: constraint:ir.actions.act_window:0
885+msgid "Invalid model name in the action definition."
886+msgstr "Nombre de modelo no válido en la definición de acción."
887+
888+#. module: l10n_ve_fiscal_reports
889+#: field:fiscal.reports.whp,ai_id:0
890+msgid "Account Invoice"
891+msgstr "Cuenta de la Factura"
892+
893+#. module: l10n_ve_fiscal_reports
894+#: view:adjustment.book:0
895+#: field:adjustment.book.line,adjustment_id:0
896+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.action_adjustment_book
897+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_adjustment_book
898+msgid "Adjustment Book"
899+msgstr "Libro de Ajustes"
900+
901+#. module: l10n_ve_fiscal_reports
902+#: field:adjustment.book,amount_untaxed_n_total:0
903+msgid "Amount Untaxed National"
904+msgstr "Total Base Imponible Nacional"
905+
906+#. module: l10n_ve_fiscal_reports
907+#: rml:fiscal.reports.whp.whp_seniat_HG:0
908+msgid "Factura Afectada"
909+msgstr "Factura Afectada"
910+
911+#. module: l10n_ve_fiscal_reports
912+#: field:adjustment.book.line,vat:0
913+msgid "Vat"
914+msgstr "RIF"
915+
916+#. module: l10n_ve_fiscal_reports
917+#: rml:fiscal.reports.whp.whp_seniat_HG:0
918+msgid "HIDING"
919+msgstr "Ocultar"
920+
921+#. module: l10n_ve_fiscal_reports
922+#: view:fiscal.reports.purchase:0
923+#: view:fiscal.reports.sale:0
924+#: view:fiscal.reports.whp:0
925+#: view:fiscal.reports.whs:0
926+msgid "List of Purchases."
927+msgstr "Lista de Compras"
928+
929+#. module: l10n_ve_fiscal_reports
930+#: selection:fiscal.reports.purchase.book_seniat_HG,init,model:0
931+msgid "Book Sales"
932+msgstr "Libro Ventas"
933+
934+#. module: l10n_ve_fiscal_reports
935+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
936+msgid "Fecha Fact."
937+msgstr "Fecha Fact."
938+
939+#. module: l10n_ve_fiscal_reports
940+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
941+msgid "0,00"
942+msgstr "0,00"
943+
944+#. module: l10n_ve_fiscal_reports
945+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
946+msgid "TOTAL"
947+msgstr "TOTAL"
948+
949+#. module: l10n_ve_fiscal_reports
950+#: field:adjustment.book.line,doc_affected:0
951+msgid "Affected Document"
952+msgstr "Documento Afectado"
953+
954+#. module: l10n_ve_fiscal_reports
955+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
956+#: selection:adjustment.book,type:0
957+#: selection:sales.book.wizard,type:0
958+#, python-format
959+msgid "Purchase"
960+msgstr "Compra"
961+
962+#. module: l10n_ve_fiscal_reports
963+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
964+msgid "Base Imponible"
965+msgstr "Base Imponible"
966+
967+#. module: l10n_ve_fiscal_reports
968+#: field:fiscal.reports.purchase,rp_retention:0
969+msgid "Whitholding Rate"
970+msgstr "Tasa de Retención"
971+
972+#. module: l10n_ve_fiscal_reports
973+#: help:adjustment.book.line,doc_affected:0
974+msgid "Affected Document for adjustment book"
975+msgstr "Documento afectado para el libro de ajuste"
976+
977+#. module: l10n_ve_fiscal_reports
978+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
979+msgid "Operaciones Internacionales"
980+msgstr "Operaciones Internacionales"
981+
982+#. module: l10n_ve_fiscal_reports
983+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
984+#: selection:adjustment.book,type:0
985+#: selection:sales.book.wizard,type:0
986+#, python-format
987+msgid "Sale"
988+msgstr "Venta"
989+
990+#. module: l10n_ve_fiscal_reports
991+#: selection:adjustment.book.line,type_doc:0
992+msgid "Debit Note"
993+msgstr "Nota de Debito"
994+
995+#. module: l10n_ve_fiscal_reports
996+#: field:fiscal.reports.purchase,ai_nro_ctrl:0
997+#: field:fiscal.reports.sale,ai_nro_ctrl:0
998+msgid "Control No."
999+msgstr "Nro. Control"
1000+
1001+#. module: l10n_ve_fiscal_reports
1002+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1003+msgid "T"
1004+msgstr "T"
1005+
1006+#. module: l10n_ve_fiscal_reports
1007+#: model:ir.model,name:l10n_ve_fiscal_reports.model_adjustment_book
1008+msgid "adjustment.book"
1009+msgstr "Libro de Ajustes"
1010+
1011+#. module: l10n_ve_fiscal_reports
1012+#: help:adjustment.book,amount_untaxed_n_total:0
1013+msgid "Amount Total Untaxed for adjustment book of nacional operations"
1014+msgstr "Total de la Base Imponible de las operaciones nacionales para el libro de ajustes"
1015+
1016+#. module: l10n_ve_fiscal_reports
1017+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1018+msgid "Total con IVA"
1019+msgstr "Total con IVA"
1020+
1021+#. module: l10n_ve_fiscal_reports
1022+#: field:adjustment.book,amount_untaxed_i_total:0
1023+msgid "Amount Untaxed International"
1024+msgstr "Total Base Imponible Inter."
1025+
1026+#. module: l10n_ve_fiscal_reports
1027+#: help:adjustment.book.line,invoice_number:0
1028+msgid "Invoice number for adjustment book"
1029+msgstr "Numero de factura para el libro de ajustes"
1030+
1031+#. module: l10n_ve_fiscal_reports
1032+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1033+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1034+msgid "Razon Social"
1035+msgstr "Razon Social"
1036+
1037+#. module: l10n_ve_fiscal_reports
1038+#: help:adjustment.book.line,amount_with_vat_i:0
1039+msgid "Amount withholding VAT for international operations"
1040+msgstr "Monto de Retencion de IVA para operaciones internacionales"
1041+
1042+#. module: l10n_ve_fiscal_reports
1043+#: help:adjustment.book.line,type_doc:0
1044+msgid "Type of Document for adjustment book: -Invoice(F),-Debit Note(dn),-Credit Note(cn)"
1045+msgstr "Tipo de documento para el libro de ajustes: -Factura(F),-Nota de Debito(ND),-Nota de Credito(NC)"
1046+
1047+#. module: l10n_ve_fiscal_reports
1048+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1049+msgid "PAGINA:"
1050+msgstr "PAGINA:"
1051+
1052+#. module: l10n_ve_fiscal_reports
1053+#: field:sales.book.wizard,control_end:0
1054+msgid "Control End"
1055+msgstr "Control Final"
1056+
1057+#. module: l10n_ve_fiscal_reports
1058+#: help:adjustment.book.line,uncredit_fiscal:0
1059+msgid "Sin derechoa credito fiscal"
1060+msgstr "Sin derecho a credito fiscal"
1061+
1062+#. module: l10n_ve_fiscal_reports
1063+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1064+msgid "EXENTO"
1065+msgstr "EXENTO"
1066+
1067+#. module: l10n_ve_fiscal_reports
1068+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1069+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1070+msgid "Libro:"
1071+msgstr "Libro:"
1072+
1073+#. module: l10n_ve_fiscal_reports
1074+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.action_fiscal_reports_purchase_tree
1075+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.action_fiscal_reports_whp_tree
1076+msgid "Profit by Product"
1077+msgstr "Rentabilidad por Producto"
1078+
1079+#. module: l10n_ve_fiscal_reports
1080+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1081+msgid "Monto Retencion"
1082+msgstr "Monto Retencion"
1083+
1084+#. module: l10n_ve_fiscal_reports
1085+#: field:adjustment.book.line,partner:0
1086+#: field:fiscal.reports.whp,rp_id:0
1087+msgid "Partner"
1088+msgstr "Empresa"
1089+
1090+#. module: l10n_ve_fiscal_reports
1091+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_wizard_wh_book_report
1092+msgid "Print Report Witholding Sales or Purchase"
1093+msgstr "Imprimir Reporte de Retención de Ventas o Compras"
1094+
1095+#. module: l10n_ve_fiscal_reports
1096+#: field:fiscal.reports.purchase,ai_amount_total:0
1097+#: field:fiscal.reports.sale,ai_amount_total:0
1098+#: field:fiscal.reports.whp,ai_amount_total:0
1099+msgid "Amount Total"
1100+msgstr "Monto Total"
1101+
1102+#. module: l10n_ve_fiscal_reports
1103+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1104+msgid "Operaciones Nacionales"
1105+msgstr "Operaciones Nacionales"
1106+
1107+#. module: l10n_ve_fiscal_reports
1108+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1109+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1110+msgid "Hasta:"
1111+msgstr "Hasta:"
1112+
1113+#. module: l10n_ve_fiscal_reports
1114+#: view:adjustment.book.line:0
1115+msgid "International Operations"
1116+msgstr "Operaciones Internacionales"
1117+
1118+#. module: l10n_ve_fiscal_reports
1119+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1120+msgid "Numero Control"
1121+msgstr "Numero de Control"
1122+
1123+#. module: l10n_ve_fiscal_reports
1124+#: field:adjustment.book.line,control_number:0
1125+msgid "Invoice Control"
1126+msgstr "Nro. Control-Factura"
1127+
1128+#. module: l10n_ve_fiscal_reports
1129+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1130+msgid "Periodo Fiscal"
1131+msgstr "Periodo Fiscal"
1132+
1133+#. module: l10n_ve_fiscal_reports
1134+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1135+msgid "WITHOLDING BOOK"
1136+msgstr "LIBRO DE RETENCIONES"
1137+
1138+#. module: l10n_ve_fiscal_reports
1139+#: view:fiscal.reports.purchase:0
1140+#: view:fiscal.reports.sale:0
1141+#: view:fiscal.reports.whp:0
1142+#: view:fiscal.reports.whs:0
1143+msgid "Detail of entry"
1144+msgstr "Detalle de entrada "
1145+
1146+#. module: l10n_ve_fiscal_reports
1147+#: help:adjustment.book,amount_with_vat_i_total:0
1148+msgid "Amount Total Withheld for adjustment book of international operations"
1149+msgstr "Monto total retenido de las operaciones internacionales en el libro de ajustes"
1150+
1151+#. module: l10n_ve_fiscal_reports
1152+#: field:account.invoice,date_document:0
1153+msgid "Document Date"
1154+msgstr "Fecha del Documento"
1155+
1156+#. module: l10n_ve_fiscal_reports
1157+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1158+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1159+msgid "Desde :"
1160+msgstr "Desde :"
1161+
1162+#. module: l10n_ve_fiscal_reports
1163+#: field:adjustment.book,type:0
1164+#: field:fiscal.reports.sale,ai_type:0
1165+#: field:sales.book.wizard,type:0
1166+msgid "Type"
1167+msgstr "Tipo"
1168+
1169+#. module: l10n_ve_fiscal_reports
1170+#: selection:fiscal.reports.purchase.book_seniat_HG,init,model:0
1171+msgid "Book Purchase"
1172+msgstr "Libro de Compras"
1173+
1174+#. module: l10n_ve_fiscal_reports
1175+#: field:fiscal.reports.sale,ai_amount_untaxed:0
1176+msgid "Untaxed amount"
1177+msgstr "Monto exento de impuesto"
1178+
1179+#. module: l10n_ve_fiscal_reports
1180+#: help:adjustment.book.line,amount_untaxed_n:0
1181+msgid "Amount untaxed for national operations"
1182+msgstr "Base Imponible para operaciones nacionales"
1183+
1184+#. module: l10n_ve_fiscal_reports
1185+#: field:fiscal.reports.whs,ai_date_inv:0
1186+msgid "Date Invoice"
1187+msgstr "Fecha Factura"
1188+
1189+#. module: l10n_ve_fiscal_reports
1190+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
1191+#, python-format
1192+msgid "Error !"
1193+msgstr "Error !"
1194+
1195+#. module: l10n_ve_fiscal_reports
1196+#: model:ir.model,name:l10n_ve_fiscal_reports.model_fiscal_reports_sale
1197+#: model:ir.model,name:l10n_ve_fiscal_reports.model_fiscal_reports_whp
1198+#: model:ir.model,name:l10n_ve_fiscal_reports.model_fiscal_reports_whs
1199+msgid "Sale by period"
1200+msgstr "Venta por Periodo"
1201+
1202+#. module: l10n_ve_fiscal_reports
1203+#: field:fiscal.reports.whs,ar_number:0
1204+msgid "WH Number"
1205+msgstr "Número de Retención"
1206+
1207+#. module: l10n_ve_fiscal_reports
1208+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1209+msgid "Base Ret. % Iva."
1210+msgstr "Base Ret. % Iva."
1211+
1212+#. module: l10n_ve_fiscal_reports
1213+#: field:fiscal.reports.whp,ar_date_ret:0
1214+msgid "Date ret."
1215+msgstr "Fecha Ret."
1216+
1217+#. module: l10n_ve_fiscal_reports
1218+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1219+msgid "Sin der."
1220+msgstr "Sin der."
1221+
1222+#. module: l10n_ve_fiscal_reports
1223+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.action_fiscal_reports_sale_tree
1224+msgid "Fiscal Report Sales"
1225+msgstr "Reporte Fiscal de Ventas"
1226+
1227+#. module: l10n_ve_fiscal_reports
1228+#: model:ir.model,name:l10n_ve_fiscal_reports.model_fiscal_reports_purchase
1229+msgid "Purchase by period"
1230+msgstr "Compra por periodo"
1231+
1232+#. module: l10n_ve_fiscal_reports
1233+#: constraint:ir.ui.view:0
1234+msgid "Invalid XML for View Architecture!"
1235+msgstr "¡XML inválido para la definición de la vista!"
1236+
1237+#. module: l10n_ve_fiscal_reports
1238+#: field:fiscal.reports.purchase,ai_amount_tax:0
1239+#: field:fiscal.reports.sale,ai_amount_tax:0
1240+msgid "Tax Amount"
1241+msgstr "Monto Impuesto"
1242+
1243+#. module: l10n_ve_fiscal_reports
1244+#: help:adjustment.book.line,amount_untaxed_i:0
1245+msgid "Amount untaxed for international operations"
1246+msgstr "Base Imponible para operaciones internacionales"
1247+
1248+#. module: l10n_ve_fiscal_reports
1249+#: field:adjustment.book,amount_total:0
1250+msgid "Amount Total Withholding VAT"
1251+msgstr "Total Base Imponible+IVA"
1252+
1253+#. module: l10n_ve_fiscal_reports
1254+#: view:adjustment.book.line:0
1255+msgid "National Operations"
1256+msgstr "Operaciones Nacionales"
1257+
1258+#. module: l10n_ve_fiscal_reports
1259+#: help:adjustment.book,amount_with_vat_n_total:0
1260+msgid "Amount Total Withheld for adjustment book of national operations"
1261+msgstr "Base Total del impuesto al valor agregado(IVA)"
1262+
1263+#. module: l10n_ve_fiscal_reports
1264+#: field:fiscal.reports.whs,ai_amount_tax:0
1265+msgid "Amount Tax"
1266+msgstr "Impuesto"
1267+
1268+#. module: l10n_ve_fiscal_reports
1269+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1270+msgid "Pagina"
1271+msgstr "Pagina"
1272+
1273+#. module: l10n_ve_fiscal_reports
1274+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1275+msgid "Total Ventas"
1276+msgstr "Total Ventas"
1277+
1278+#. module: l10n_ve_fiscal_reports
1279+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1280+msgid "TOTALES"
1281+msgstr "TOTALES"
1282+
1283+#. module: l10n_ve_fiscal_reports
1284+#: selection:adjustment.book.line,type_doc:0
1285+msgid "Credit Note"
1286+msgstr "Nota de Credito"
1287+
1288+#. module: l10n_ve_fiscal_reports
1289+#: help:adjustment.book.line,amount_with_vat_n:0
1290+#: help:adjustment.book.line,percent_with_vat_n:0
1291+msgid "Percent(%) VAT for national operations"
1292+msgstr "Porcentaje(%) de I.V.A para operaciones nacionales"
1293+
1294+#. module: l10n_ve_fiscal_reports
1295+#: help:adjustment.book,name:0
1296+msgid "Description of adjustment book"
1297+msgstr "Descripcion del libro de ajustes"
1298+
1299+#. module: l10n_ve_fiscal_reports
1300+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1301+msgid "Retencion Iva"
1302+msgstr "Retencion Iva"
1303+
1304+#. module: l10n_ve_fiscal_reports
1305+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1306+msgid "IVA"
1307+msgstr "IVA"
1308+
1309+#. module: l10n_ve_fiscal_reports
1310+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1311+msgid "Monto"
1312+msgstr "Monto"
1313+
1314+#. module: l10n_ve_fiscal_reports
1315+#: field:fiscal.reports.whp,ai_amount_tax:0
1316+msgid "Amount tax"
1317+msgstr "Monto Impuesto"
1318+
1319+#. module: l10n_ve_fiscal_reports
1320+#: field:adjustment.book.line,voucher:0
1321+#: help:adjustment.book.line,voucher:0
1322+msgid "Voucher Withholding VAT"
1323+msgstr "Comp. Retencion IVA"
1324+
1325+#. module: l10n_ve_fiscal_reports
1326+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1327+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1328+msgid "RIF"
1329+msgstr "RIF"
1330+
1331+#. module: l10n_ve_fiscal_reports
1332+#: help:adjustment.book,amount_untaxed_i_total:0
1333+msgid "Amount Total Untaxed for adjustment book of internacional operations"
1334+msgstr "Base Imponible Total de las operaciones internacionales del libro de ajustes"
1335+
1336+#. module: l10n_ve_fiscal_reports
1337+#: view:adjustment.book:0
1338+msgid "Explanation about this adjustment"
1339+msgstr "Observaciones sobre el presente libro:"
1340+
1341+#. module: l10n_ve_fiscal_reports
1342+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1343+msgid "del Mes:"
1344+msgstr "del Mes:"
1345+
1346+#. module: l10n_ve_fiscal_reports
1347+#: field:fiscal.reports.purchase,ai_amount_untaxed:0
1348+msgid "Untaxed Amount"
1349+msgstr "Monto Excento de Impuesto"
1350+
1351+#. module: l10n_ve_fiscal_reports
1352+#: help:adjustment.book.line,partner:0
1353+msgid "Partner for adjustment book"
1354+msgstr "Empresa asociada para realizar un ajuste"
1355+
1356+#. module: l10n_ve_fiscal_reports
1357+#: field:fiscal.reports.purchase,rp_id:0
1358+#: field:fiscal.reports.sale,rp_id:0
1359+#: field:fiscal.reports.whs,rp_id:0
1360+msgid "Partner Name"
1361+msgstr "Empresa"
1362+
1363+#. module: l10n_ve_fiscal_reports
1364+#: help:adjustment.book.line,date_accounting:0
1365+msgid "Date accounting for adjustment book"
1366+msgstr "Fecha contable para el libro de ajustes"
1367+
1368+#. module: l10n_ve_fiscal_reports
1369+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1370+msgid "Fecha"
1371+msgstr "Fecha"
1372+
1373+#. module: l10n_ve_fiscal_reports
1374+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1375+msgid "Documento Afectado"
1376+msgstr "Documento Afectado"
1377+
1378+#. module: l10n_ve_fiscal_reports
1379+#: field:adjustment.book,note:0
1380+msgid "Note"
1381+msgstr "Nota"
1382+
1383+#. module: l10n_ve_fiscal_reports
1384+#: field:fiscal.reports.purchase,ar_id:0
1385+#: field:fiscal.reports.purchase,ar_line_id:0
1386+#: field:fiscal.reports.sale,ar_id:0
1387+#: field:fiscal.reports.sale,ar_line_id:0
1388+#: field:fiscal.reports.whp,ar_id:0
1389+#: field:fiscal.reports.whp,ar_line_id:0
1390+#: field:fiscal.reports.whs,ar_line_id:0
1391+msgid "Account Retention"
1392+msgstr "Cuenta Retención"
1393+
1394+#. module: l10n_ve_fiscal_reports
1395+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_fiscal_reports_sale_tree
1396+msgid "Sales Book"
1397+msgstr "Libro de Ventas"
1398+
1399+#. module: l10n_ve_fiscal_reports
1400+#: constraint:ir.model:0
1401+msgid "The Object name must start with x_ and not contain any special character !"
1402+msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!"
1403+
1404+#. module: l10n_ve_fiscal_reports
1405+#: field:fiscal.reports.sale,rp_retention:0
1406+msgid "Withholding"
1407+msgstr "Retención"
1408+
1409+#. module: l10n_ve_fiscal_reports
1410+#: model:ir.model,name:l10n_ve_fiscal_reports.model_adjustment_book_line
1411+msgid "adjustment.book.line"
1412+msgstr "Lineas del libro de ajustes"
1413+
1414+#. module: l10n_ve_fiscal_reports
1415+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1416+msgid "Correspodiente al Mes de"
1417+msgstr "Correspodiente al Mes de"
1418+
1419+#. module: l10n_ve_fiscal_reports
1420+#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
1421+msgid "Witholding Purchase"
1422+msgstr "Retención Compra"
1423+
1424+#. module: l10n_ve_fiscal_reports
1425+#: model:ir.module.module,description:l10n_ve_fiscal_reports.module_meta_information
1426+msgid "\n"
1427+" What this module does:\n"
1428+" Build all Fiscal Reports for Law in Venezuela.\n"
1429+" -- Purchase Report.\n"
1430+" -- Sales Report.\n"
1431+" -- Withholding Report.\n"
1432+" Sales, Purchase, ISLR and Munic.\n"
1433+" "
1434+msgstr "\n"
1435+" Qué hace este módulo:\n"
1436+" Construye todos los Informes Fiscales para la Ley en Venezuela .\n"
1437+" -- Reporte de Compra.\n"
1438+" -- Reporte de Venta.\n"
1439+" -- Reporte de Retención.\n"
1440+" Ventas, Compras, I.S.L.R. y Munic.\n"
1441+" "
1442+
1443+#. module: l10n_ve_fiscal_reports
1444+#: field:fiscal.reports.purchase,ai_date_document:0
1445+#: field:fiscal.reports.purchase,ai_date_invoice:0
1446+#: field:fiscal.reports.sale,ai_date_document:0
1447+#: field:fiscal.reports.sale,ai_date_invoice:0
1448+#: field:fiscal.reports.whs,ar_date_ret:0
1449+msgid "Date"
1450+msgstr "Fecha"
1451+
1452+#. module: l10n_ve_fiscal_reports
1453+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
1454+#, python-format
1455+msgid "No period defined for this date !\nPlease create a fiscal year."
1456+msgstr "No period defined for this date !\nPlease create a fiscal year."
1457+
1458+#. module: l10n_ve_fiscal_reports
1459+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1460+msgid "1.3cm 24.9cm 38.3cm 24.9cm"
1461+msgstr "1.3cm 24.9cm 38.3cm 24.9cm"
1462+
1463+#. module: l10n_ve_fiscal_reports
1464+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_fiscal_reports_purchase_tree
1465+msgid "Purchase Book"
1466+msgstr "Libro de Compra"
1467+
1468+#. module: l10n_ve_fiscal_reports
1469+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_fiscal_reports_whs_tree
1470+msgid "Sale Witholding Book"
1471+msgstr "Libro de Retención de Venta"
1472+
1473+#. module: l10n_ve_fiscal_reports
1474+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_fiscal_reports_whp_tree
1475+msgid "Purchase Witholding Book"
1476+msgstr "Libro de Retención de Compra"
1477+
1478+#. module: l10n_ve_fiscal_reports
1479+#: field:fiscal.reports.whs,ai_amount_total:0
1480+msgid "Invoice Total"
1481+msgstr "Total Factura"
1482+
1483+#. module: l10n_ve_fiscal_reports
1484+#: field:adjustment.book,uncredit_fiscal_total:0
1485+#: help:adjustment.book,uncredit_fiscal_total:0
1486+msgid "Sin derecho a credito fiscal"
1487+msgstr "SDCF"
1488+
1489+#. module: l10n_ve_fiscal_reports
1490+#: field:adjustment.book.line,date_accounting:0
1491+msgid "Date Accounting"
1492+msgstr "Fecha contable"
1493+
1494+#. module: l10n_ve_fiscal_reports
1495+#: help:adjustment.book,type:0
1496+msgid "Type of adjustment book: Sale or Purchase"
1497+msgstr "Tipo de libro de ajustes: Compra o Venta"
1498+
1499+#. module: l10n_ve_fiscal_reports
1500+#: field:adjustment.book.line,amount_untaxed_i:0
1501+#: field:adjustment.book.line,amount_untaxed_n:0
1502+#: field:fiscal.reports.whp,ai_amount_untaxed:0
1503+#: field:fiscal.reports.whs,ai_amount_untaxed:0
1504+msgid "Amount Untaxed"
1505+msgstr "Base Imponible"
1506+
1507+#. module: l10n_ve_fiscal_reports
1508+#: help:adjustment.book.line,amount_with_vat:0
1509+msgid "Amount withheld VAT total"
1510+msgstr "Monto Total Retenido de IVA"
1511+
1512+#. module: l10n_ve_fiscal_reports
1513+#: field:adjustment.book.line,amount:0
1514+msgid "Amount Document at Withholding VAT"
1515+msgstr "Base Imponible+IVA"
1516+
1517+#. module: l10n_ve_fiscal_reports
1518+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.sales_book_wizard_menu
1519+msgid "Print Sales Fiscal Report"
1520+msgstr "Imprimir Libro Ventas/Compras"
1521+
1522+#. module: l10n_ve_fiscal_reports
1523+#: field:fiscal.reports.purchase,rp_vat:0
1524+#: field:fiscal.reports.sale,rp_vat:0
1525+msgid "VAT Number"
1526+msgstr "Número IVA"
1527+
1528+#. module: l10n_ve_fiscal_reports
1529+#: model:ir.module.module,shortdesc:l10n_ve_fiscal_reports.module_meta_information
1530+msgid "Fiscal Report For Venezuela"
1531+msgstr "Reporte Fiscal para Venezuela"
1532+
1533+#. module: l10n_ve_fiscal_reports
1534+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1535+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1536+msgid "Comprobante"
1537+msgstr "Comprobante"
1538+
1539+#. module: l10n_ve_fiscal_reports
1540+#: field:adjustment.book,amount_with_vat_n_total:0
1541+msgid "Amount Withheld National"
1542+msgstr "Total Monto Retenido Nacional"
1543+
1544+#. module: l10n_ve_fiscal_reports
1545+#: field:adjustment.book,period_id:0
1546+msgid "Period"
1547+msgstr "Periodo"
1548+
1549+#. module: l10n_ve_fiscal_reports
1550+#: view:sales.book.wizard:0
1551+msgid "General"
1552+msgstr "General"
1553+
1554+#. module: l10n_ve_fiscal_reports
1555+#: field:adjustment.book.line,percent_with_vat_i:0
1556+#: field:adjustment.book.line,percent_with_vat_n:0
1557+msgid "% Withholding VAT"
1558+msgstr "Porcentaje(%) IVA retenido"
1559+
1560+#. module: l10n_ve_fiscal_reports
1561+#: selection:adjustment.book.line,type_doc:0
1562+#: field:fiscal.reports.whs,ai_id:0
1563+msgid "Invoice"
1564+msgstr "Factura"
1565+
1566+#. module: l10n_ve_fiscal_reports
1567+#: wizard_button:fiscal.reports.purchase.book_seniat_HG,init,end:0
1568+#: wizard_button:fiscal.reports.whp.wh_book_HG,init,end:0
1569+#: view:sales.book.wizard:0
1570+msgid "Cancel"
1571+msgstr "Cancelar"
1572+
1573+#. module: l10n_ve_fiscal_reports
1574+#: wizard_button:fiscal.reports.purchase.book_seniat_HG,init,print_report:0
1575+#: wizard_button:fiscal.reports.whp.wh_book_HG,init,print_report:0
1576+#: view:sales.book.wizard:0
1577+msgid "Print Report"
1578+msgstr "Imprimir Reporte"
1579+
1580+#. module: l10n_ve_fiscal_reports
1581+#: help:adjustment.book.line,percent_with_vat_i:0
1582+msgid "Percent(%) VAT for international operations"
1583+msgstr "Porcentaje(%) de IVA para operaciones Internacionales"
1584+
1585+#. module: l10n_ve_fiscal_reports
1586+#: field:adjustment.book,amount_with_vat_i_total:0
1587+msgid "Amount Withheld International"
1588+msgstr "Total Monto Retenido Inter."
1589+
1590+#. module: l10n_ve_fiscal_reports
1591+#: help:adjustment.book,period_id:0
1592+msgid "Period of adjustment book"
1593+msgstr "Periodo para el libro de ajustes"
1594+
1595+#. module: l10n_ve_fiscal_reports
1596+#: model:ir.actions.report.xml,name:l10n_ve_fiscal_reports.report_whp_seniat
1597+msgid "Witholding Purchase SENIAT"
1598+msgstr "Retención Compra SENIAT"
1599+
1600+#. module: l10n_ve_fiscal_reports
1601+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1602+msgid "Ventas Exentas"
1603+msgstr "Ventas Exentas"
1604+
1605+#. module: l10n_ve_fiscal_reports
1606+#: help:account.invoice,date_document:0
1607+msgid "Administrative date"
1608+msgstr "Fecha administrativa"
1609+
1610+#. module: l10n_ve_fiscal_reports
1611+#: wizard_view:fiscal.reports.purchase.book_seniat_HG,init:0
1612+#: wizard_view:fiscal.reports.whp.wh_book_HG,init:0
1613+msgid "Seniat Book"
1614+msgstr "Libro SENIAT"
1615+
1616+#. module: l10n_ve_fiscal_reports
1617+#: field:adjustment.book,amount_with_vat_total:0
1618+#: field:adjustment.book.line,amount_with_vat:0
1619+msgid "Amount Withholding VAT Total"
1620+msgstr "Total Retencion IVA"
1621+
1622+#. module: l10n_ve_fiscal_reports
1623+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1624+msgid "del año"
1625+msgstr "del año"
1626+
1627+#. module: l10n_ve_fiscal_reports
1628+#: field:sales.book.wizard,control_start:0
1629+msgid "Control Start"
1630+msgstr "Control Start"
1631+
1632+#. module: l10n_ve_fiscal_reports
1633+#: field:fiscal.reports.whp,rp_vat:0
1634+#: field:fiscal.reports.whs,rp_vat:0
1635+msgid "Vat Number"
1636+msgstr "Número IVA"
1637+
1638+#. module: l10n_ve_fiscal_reports
1639+#: wizard_field:fiscal.reports.purchase.book_seniat_HG,init,model:0
1640+#: wizard_field:fiscal.reports.whp.wh_book_HG,init,model:0
1641+msgid "Type of Report"
1642+msgstr "Tipo de Reporte"
1643+
1644+#. module: l10n_ve_fiscal_reports
1645+#: view:adjustment.book:0
1646+msgid "Adjustment Book Lines"
1647+msgstr "Lineas del libro de Ajustes"
1648+
1649+#. module: l10n_ve_fiscal_reports
1650+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1651+msgid "%"
1652+msgstr "%"
1653+
1654+#. module: l10n_ve_fiscal_reports
1655+#: field:adjustment.book,name:0
1656+msgid "Description"
1657+msgstr "Descripcion"
1658+
1659+#. module: l10n_ve_fiscal_reports
1660+#: field:fiscal.reports.whp,ar_number:0
1661+msgid "Retention Number"
1662+msgstr "Número de Retención"
1663+
1664+#. module: l10n_ve_fiscal_reports
1665+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_fr_main
1666+msgid "Fiscal Reporting For SENIAT"
1667+msgstr "Reporte Fiscal para SENIAT"
1668+
1669+#. module: l10n_ve_fiscal_reports
1670+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1671+msgid "IVA RETENIDO"
1672+msgstr "IVA Retenido"
1673+
1674+#. module: l10n_ve_fiscal_reports
1675+#: model:ir.actions.report.xml,name:l10n_ve_fiscal_reports.report_purchase_seniat
1676+msgid "Book Sales and Purchase SENIAT"
1677+msgstr "Libro de Ventas y Compras SENIAT"
1678+
1679+#. module: l10n_ve_fiscal_reports
1680+#: help:adjustment.book.line,control_number:0
1681+msgid "Invoice control for adjustment book"
1682+msgstr "Numero de Factura para el libro de ajustes"
1683+
1684+#. module: l10n_ve_fiscal_reports
1685+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1686+msgid "Según Articulo 76 del Reglamento de la Ley del IVA 5.363 del 12 de Julio de 1999"
1687+msgstr "Según Articulo 76 del Reglamento de la Ley del IVA 5.363 del 12 de Julio de 1999"
1688+
1689+#. module: l10n_ve_fiscal_reports
1690+#: field:adjustment.book.line,invoice_number:0
1691+#: field:fiscal.reports.purchase,ai_reference:0
1692+#: field:fiscal.reports.sale,ai_reference:0
1693+#: field:fiscal.reports.whp,ai_reference:0
1694+#: field:fiscal.reports.whs,ai_number:0
1695+#: field:fiscal.reports.whs,ai_reference:0
1696+msgid "Invoice Number"
1697+msgstr "Numero de Factura"
1698+
1699+#. module: l10n_ve_fiscal_reports
1700+#: model:ir.actions.wizard,name:l10n_ve_fiscal_reports.wizard_recalc_taxes
1701+msgid "Recompute Taxes"
1702+msgstr "Recalcular Impuestos"
1703+
1704+#. module: l10n_ve_fiscal_reports
1705+#: rml:fiscal.reports.whp.whp_seniat_HG:0
1706+msgid "% Ret"
1707+msgstr "% Ret"
1708+
1709+#. module: l10n_ve_fiscal_reports
1710+#: field:adjustment.book.line,date_admin:0
1711+msgid "Date Administrative"
1712+msgstr "Fecha Administrativa"
1713+
1714+#. module: l10n_ve_fiscal_reports
1715+#: wizard_field:fiscal.reports.purchase.book_seniat_HG,init,date_end:0
1716+#: wizard_field:fiscal.reports.whp.wh_book_HG,init,date_end:0
1717+#: field:sales.book.wizard,date_end:0
1718+msgid "End Date"
1719+msgstr "Fecha Fin"
1720+
1721+#. module: l10n_ve_fiscal_reports
1722+#: field:adjustment.book.line,amount_with_vat_i:0
1723+#: field:adjustment.book.line,amount_with_vat_n:0
1724+msgid "Amount Withholding VAT"
1725+msgstr "Monto de IVA"
1726+
1727+#. module: l10n_ve_fiscal_reports
1728+#: help:adjustment.book,amount_total:0
1729+msgid "Amount Total for adjustment book of invoice"
1730+msgstr "Monto Total"
1731+
1732+#. module: l10n_ve_fiscal_reports
1733+#: help:adjustment.book.line,amount:0
1734+msgid "Amount document for adjustment book"
1735+msgstr "Monto del documento asociado."
1736+
1737+#. module: l10n_ve_fiscal_reports
1738+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1739+msgid "Doc"
1740+msgstr "Doc"
1741+
1742+#. module: l10n_ve_fiscal_reports
1743+#: field:fiscal.reports.purchase,ai_id:0
1744+#: field:fiscal.reports.sale,ai_id:0
1745+msgid "Invoice Description"
1746+msgstr "Descrip.Factura"
1747+
1748+#. module: l10n_ve_fiscal_reports
1749+#: help:adjustment.book,amount_with_vat_total:0
1750+msgid "Amount Total Withholding VAT for adjustment book"
1751+msgstr "Total Base Imponible+IVA"
1752+
1753+#. module: l10n_ve_fiscal_reports
1754+#: field:adjustment.book,adjustment_ids:0
1755+#: view:adjustment.book.line:0
1756+msgid "Adjustment Book Line"
1757+msgstr "Lineas del libro de ajustes"
1758+
1759+#. module: l10n_ve_fiscal_reports
1760+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.action_fiscal_reports_whs_tree
1761+msgid "whitholding Sales."
1762+msgstr "Retención Ventas."
1763+
1764+#. module: l10n_ve_fiscal_reports
1765+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1766+msgid "Numero Fact. / DOC"
1767+msgstr "Numero Fact. / DOC"
1768+
1769+#. module: l10n_ve_fiscal_reports
1770+#: wizard_field:fiscal.reports.purchase.book_seniat_HG,init,date_start:0
1771+#: wizard_field:fiscal.reports.whp.wh_book_HG,init,date_start:0
1772+#: field:sales.book.wizard,date_start:0
1773+msgid "Start Date"
1774+msgstr "Fecha Inicio"
1775+
1776+#. module: l10n_ve_fiscal_reports
1777+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1778+msgid "BASE IMPONIBLE"
1779+msgstr "BASE IMPONIBLE"
1780+
1781+#. module: l10n_ve_fiscal_reports
1782+#: model:ir.model,name:l10n_ve_fiscal_reports.model_sales_book_wizard
1783+msgid "sales.book.wizard"
1784+msgstr "sales.book.wizard"
1785+
1786+#. module: l10n_ve_fiscal_reports
1787+#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
1788+msgid "Witholding Sales"
1789+msgstr "Retención Ventas"
1790+
1791+#. module: l10n_ve_fiscal_reports
1792+#: model:ir.actions.wizard,name:l10n_ve_fiscal_reports.wizard_sale_purchase_book
1793+msgid "Book Seniat"
1794+msgstr "Libro SENIAT"
1795+
1796+#. module: l10n_ve_fiscal_reports
1797+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1798+msgid "FECHA Y HORA DE IMPRESION:"
1799+msgstr "FECHA Y HORA DE IMPRESION:"
1800+
1801+#. module: l10n_ve_fiscal_reports
1802+#: help:adjustment.book.line,vat:0
1803+msgid "Vat of partner for adjustment book"
1804+msgstr "RIF de la empresa"
1805+
1806+#. module: l10n_ve_fiscal_reports
1807+#: model:ir.actions.act_window,name:l10n_ve_fiscal_reports.sales_book_wizard_act
1808+#: view:sales.book.wizard:0
1809+msgid "Sales Book Report"
1810+msgstr "Libro de Ventas"
1811+
1812+#. module: l10n_ve_fiscal_reports
1813+#: field:fiscal.reports.whs,ar_id:0
1814+msgid "Retention"
1815+msgstr "Retención"
1816+
1817+#. module: l10n_ve_fiscal_reports
1818+#: field:adjustment.book.line,type_doc:0
1819+#: field:fiscal.reports.purchase,ai_type:0
1820+msgid "Document Type"
1821+msgstr "Tipo de Documento"
1822+
1823+#. module: l10n_ve_fiscal_reports
1824+#: rml:fiscal.reports.purchase.purchase_seniat_HG:0
1825+msgid "TOTAL CON IVA"
1826+msgstr "TOTAL CON IVA"
1827+
1828+#. module: l10n_ve_fiscal_reports
1829+#: model:ir.ui.menu,name:l10n_ve_fiscal_reports.menu_wizard_recompute_report
1830+msgid "Recompute Taxes."
1831+msgstr "Recalcule Impuestos."
1832+
1833
1834=== added file 'l10n_ve_fiscal_reports/invoice.py'
1835--- l10n_ve_fiscal_reports/invoice.py 1970-01-01 00:00:00 +0000
1836+++ l10n_ve_fiscal_reports/invoice.py 2011-12-29 18:55:26 +0000
1837@@ -0,0 +1,46 @@
1838+#!/usr/bin/python
1839+# -*- encoding: utf-8 -*-
1840+###########################################################################
1841+# Module Writen to OpenERP, Open Source Management Solution
1842+# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
1843+# All Rights Reserved
1844+###############Credits######################################################
1845+# Coded by: Humberto Arocha <humberto@openerp.com.ve>
1846+# María Gabriela Quilarque <gabrielaquilarque97@gmail.com>
1847+# Javier Duran <javier@vauxoo.com>
1848+# Israel Fermín Montilla <israel@openerp.com.ve>
1849+# Planified by: Nhomar Hernandez
1850+# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
1851+# Audited by: Humberto Arocha humberto@openerp.com.ve
1852+#############################################################################
1853+# This program is free software: you can redistribute it and/or modify
1854+# it under the terms of the GNU General Public License as published by
1855+# the Free Software Foundation, either version 3 of the License, or
1856+# (at your option) any later version.
1857+#
1858+# This program is distributed in the hope that it will be useful,
1859+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1860+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1861+# GNU General Public License for more details.
1862+#
1863+# You should have received a copy of the GNU General Public License
1864+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1865+##############################################################################
1866+
1867+from osv import osv
1868+from osv import fields
1869+
1870+class inherited_invoice(osv.osv):
1871+ _inherit = "account.invoice"
1872+ _columns = {
1873+ 'date_document': fields.date("Document Date",
1874+ help="Administrative date",
1875+ select=True),
1876+ 'date_invoice': fields.date('Fecha Contable',
1877+ states={'open':[('readonly',True)],
1878+ 'close':[('readonly',True)],
1879+ 'paid':[('readonly',True)]},
1880+ help="Keep empty to use the current date\n It represent the date when we did account charge, known as Accounting Date too!"),
1881+ 'expedient':fields.boolean('Expediente?', help="Seleccionar solo si la factura de compra es un expediente de importación"),
1882+ }
1883+inherited_invoice()
1884
1885=== added file 'l10n_ve_fiscal_reports/invoice_view.xml'
1886--- l10n_ve_fiscal_reports/invoice_view.xml 1970-01-01 00:00:00 +0000
1887+++ l10n_ve_fiscal_reports/invoice_view.xml 2011-12-29 18:55:26 +0000
1888@@ -0,0 +1,32 @@
1889+<?xml version="1.0" encoding="utf-8"?>
1890+<openerp>
1891+ <data>
1892+ <record model="ir.ui.view" id="inherited_account_invoice_form_fiscal">
1893+ <field name="name">account.invoice.inherit.fiscal</field>
1894+ <field name="model">account.invoice</field>
1895+ <field name="inherit_id" ref="account.invoice_form"/>
1896+ <field name="arch" type="xml">
1897+ <data>
1898+ <field name="date_invoice" position="after">
1899+ <field name="date_document"/>
1900+ </field>
1901+ </data>
1902+ </field>
1903+ </record>
1904+
1905+ <record model="ir.ui.view" id="inherited_account_invoice_form_fiscal2">
1906+ <field name="name">account.invoice.inherit.fiscal2</field>
1907+ <field name="model">account.invoice</field>
1908+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
1909+ <field name="arch" type="xml">
1910+ <data>
1911+ <field name="date_due" position="after">
1912+ <field name="expedient" attrs="{'readonly':[('type','in',['out_invoice','out_refund'])]}"/>
1913+ <field name="date_document"/>
1914+ </field>
1915+ </data>
1916+ </field>
1917+ </record>
1918+ </data>
1919+</openerp>
1920+
1921
1922=== added file 'l10n_ve_fiscal_reports/l10n_ve_fiscal_reports.py'
1923--- l10n_ve_fiscal_reports/l10n_ve_fiscal_reports.py 1970-01-01 00:00:00 +0000
1924+++ l10n_ve_fiscal_reports/l10n_ve_fiscal_reports.py 2011-12-29 18:55:26 +0000
1925@@ -0,0 +1,348 @@
1926+# -*- encoding: utf-8 -*-
1927+##############################################################################
1928+#
1929+# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
1930+# Javier Duran <javier@vauxoo.com>
1931+# Nhomar Hernandéz <nhomar@vauxoo.com>
1932+# WARNING: This program as such is intended to be used by professional
1933+# programmers who take the whole responsability of assessing all potential
1934+# consequences resulting from its eventual inadequacies and bugs
1935+# End users who are looking for a ready-to-use solution with commercial
1936+# garantees and support are strongly adviced to contract a Free Software
1937+# Service Company
1938+#
1939+# This program is Free Software; you can redistribute it and/or
1940+# modify it under the terms of the GNU General Public License
1941+# as published by the Free Software Foundation; either version 2
1942+# of the License, or (at your option) any later version.
1943+#
1944+# This program is distributed in the hope that it will be useful,
1945+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1946+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1947+# GNU General Public License for more details.
1948+#
1949+# You should have received a copy of the GNU General Public License
1950+# along with this program; if not, write to the Free Software
1951+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1952+#
1953+##############################################################################
1954+
1955+'''
1956+Fiscal Report For Venezuela
1957+'''
1958+
1959+from osv import osv
1960+from osv import fields
1961+from tools.translate import _
1962+from tools import config
1963+from tools.sql import drop_view_if_exists
1964+import decimal_precision as dp
1965+
1966+class fiscal_reports_purchase(osv.osv):
1967+ '''
1968+ Modifying the object fiscal.reports.purchase
1969+ '''
1970+ _name = "fiscal.reports.purchase"
1971+ _description = "Purchase by period"
1972+ _auto = False
1973+ _rec_name = 'ai_nro_ctrl'
1974+ _order = 'ai_nro_ctrl asc'
1975+ _columns = {
1976+ 'ai_date_document': fields.date('Date'),
1977+ 'ai_date_invoice': fields.date('Date'),
1978+ 'ar_date_document': fields.date('Date Account Retencion'),
1979+ 'rp_vat':fields.char('VAT Number', size=24, required=False, readonly=True),
1980+ 'rp_id':fields.many2one('res.partner', 'Partner Name', required=True),
1981+ 'ai_nro_ctrl':fields.char('Control No.', size=128, required=False, readonly=True),
1982+ 'ai_reference':fields.char('Invoice Number', size=128, required=False, readonly=True),
1983+ 'ai_amount_total': fields.float('Amount Total', digits_compute= dp.get_precision('Fiscal Report')),
1984+ 'ai_amount_untaxed': fields.float('Untaxed Amount', digits_compute= dp.get_precision('Fiscal Report')),
1985+ 'ai_amount_tax': fields.float('Tax Amount', digits_compute= dp.get_precision('Fiscal Report')),
1986+ 'ai_type':fields.char('Document Type', size=64, required=False, readonly=False),
1987+ 'rp_retention': fields.float('Whitholding Rate', digits_compute= dp.get_precision('Fiscal Report')),
1988+ 'ai_id':fields.many2one('account.invoice', 'Invoice Description', required=False),
1989+ 'ar_line_id':fields.many2one('account.wh.iva.line', 'Account Retention', readonly=True),
1990+ 'ar_id':fields.many2one('account.wh.iva', 'Account Retention', readonly=True),
1991+ }
1992+ def init(self, cr):
1993+ '''
1994+ Create or replace view fiscal_reports_purchase
1995+ '''
1996+ drop_view_if_exists(cr, 'fiscal_reports_purchase')
1997+ cr.execute("""
1998+ create or replace view fiscal_reports_purchase as (
1999+ SELECT
2000+ ai."date_document" AS ai_date_document,
2001+ ai."date_invoice" AS ai_date_invoice,
2002+ rp."vat" AS rp_vat,
2003+ rp."id" AS rp_id,
2004+ ai."nro_ctrl" AS ai_nro_ctrl,
2005+ ai."reference" AS ai_reference,
2006+ ar."date_ret" AS ar_date_document,
2007+ case when ai.type='in_refund'
2008+ then
2009+ ai."amount_total"*(-1)
2010+ else
2011+ ai."amount_total"
2012+ end as ai_amount_total,
2013+ case when ai.type='in_refund'
2014+ then
2015+ ai."amount_untaxed"*(-1)
2016+ else
2017+ ai."amount_untaxed"
2018+ end as ai_amount_untaxed,
2019+ case when ai.type='in_refund'
2020+ then
2021+ ai."amount_tax"*(-1)
2022+ else
2023+ ai."amount_tax"
2024+ end as ai_amount_tax,
2025+ ai."type" AS ai_type,
2026+ rp."wh_iva_rate" AS rp_retention,
2027+ ai."id" AS id,
2028+ ai."id" AS ai_id,
2029+ ar_line."id" AS ar_line_id,
2030+ ar_line."retention_id" AS ar_id
2031+ FROM
2032+ "res_partner" rp INNER JOIN "account_invoice" ai ON rp."id" = ai."partner_id"
2033+ LEFT JOIN "account_wh_iva_line" ar_line ON ar_line."invoice_id" = ai."id"
2034+ LEFT JOIN "account_wh_iva" ar ON ar_line."retention_id" = ar."id"
2035+ WHERE
2036+ (ai.type = 'in_refund'
2037+ OR ai.type = 'in_invoice')
2038+ AND (ai.state = 'open'
2039+ OR ai.state = 'paid'
2040+ OR ai.state = 'done')
2041+ ORDER BY
2042+ ai_date_invoice ASC,
2043+ ar."number" ASC
2044+ )
2045+ """)
2046+fiscal_reports_purchase()
2047+
2048+class fiscal_reports_sale(osv.osv):
2049+ '''
2050+ Modifying the object fiscal.reports.sales
2051+ '''
2052+ _name = "fiscal.reports.sale"
2053+ _description = "Sale by period"
2054+ _auto = False
2055+ _rec_name = 'ai_nro_ctrl'
2056+ _columns = {
2057+ 'ai_date_document': fields.date('Date'),
2058+ 'ai_date_invoice': fields.date('Date'),
2059+ 'ar_date_document': fields.date('Date Account Retencion'),
2060+ 'rp_vat':fields.char('VAT Number', size=64, required=False, readonly=False),
2061+ 'rp_id':fields.many2one('res.partner', 'Partner Name', required=True),
2062+ 'ai_reference':fields.char('Invoice Number', size=64, required=False, readonly=False),
2063+ 'ai_nro_ctrl':fields.char('Control No.', size=64, required=False, readonly=False),
2064+ 'ai_amount_total': fields.float('Amount Total', digits_compute= dp.get_precision('Fiscal Report')),
2065+ 'ai_amount_untaxed': fields.float('Untaxed amount', digits_compute= dp.get_precision('Fiscal Report')),
2066+ 'ai_amount_tax': fields.float('Tax Amount', digits_compute= dp.get_precision('Fiscal Report')),
2067+ 'ai_type':fields.char('Type', size=64, required=False, readonly=False),
2068+ 'rp_retention': fields.float('Withholding', digits_compute= dp.get_precision('Fiscal Report')),
2069+ 'ai_id':fields.many2one('account.invoice', 'Invoice Description', required=False),
2070+ 'ar_line_id':fields.many2one('account.wh.iva.line', 'Account Retention', readonly=True),
2071+ 'ar_id':fields.many2one('account.wh.iva', 'Account Retention', readonly=True),
2072+ }
2073+ def init(self, cr):
2074+ '''
2075+ Create or replace view fiscal_reports_sale
2076+ '''
2077+ drop_view_if_exists(cr, 'fiscal_reports_sale')
2078+ cr.execute("""
2079+ create or replace view fiscal_reports_sale as (
2080+ SELECT
2081+ ai."date_document" AS ai_date_document,
2082+ ai."date_invoice" AS ai_date_invoice,
2083+ rp."vat" AS rp_vat,
2084+ rp."id" AS rp_id,
2085+ ai."number" AS ai_reference,
2086+ ai."nro_ctrl" AS ai_nro_ctrl,
2087+ ar."date_ret" AS ar_date_document,
2088+ case when ai.type='out_refund'
2089+ then
2090+ ai."amount_total"*(-1)
2091+ else
2092+ ai."amount_total"
2093+ end as ai_amount_total,
2094+ case when ai.type='out_refund'
2095+ then
2096+ ai."amount_untaxed"*(-1)
2097+ else
2098+ ai."amount_untaxed"
2099+ end as ai_amount_untaxed,
2100+ case when ai.type='out_refund'
2101+ then
2102+ ai."amount_tax"*(-1)
2103+ else
2104+ ai."amount_tax"
2105+ end as ai_amount_tax,
2106+ ai."type" AS ai_type,
2107+ rp."wh_iva_rate" AS rp_retention,
2108+ ai."id" AS id,
2109+ ai."id" AS ai_id,
2110+ ar_line."id" AS ar_line_id,
2111+ ar_line."retention_id" AS ar_id
2112+ FROM
2113+ "res_partner" rp INNER JOIN "account_invoice" ai ON rp."id" = ai."partner_id"
2114+ LEFT JOIN "account_wh_iva_line" ar_line ON ar_line."invoice_id" = ai."id"
2115+ LEFT JOIN "account_wh_iva" ar ON ar_line."retention_id" = ar."id"
2116+ WHERE
2117+ (ai.type = 'out_refund'
2118+ OR ai.type = 'out_invoice')
2119+ AND (ai.state = 'open'
2120+ OR ai.state = 'paid'
2121+ OR ai.state = 'done')
2122+ ORDER BY
2123+ ai_date_invoice ASC,
2124+ ai."nro_ctrl" ASC
2125+ )
2126+ """)
2127+fiscal_reports_sale()
2128+class fiscal_reports_whp(osv.osv):
2129+ '''
2130+ Modifying the object fiscal.reports.whp
2131+ '''
2132+ _name = "fiscal.reports.whp"
2133+ _description = "Purchase by period"
2134+ _auto = False
2135+ _rec_name = 'ai_nro_ctrl'
2136+ _columns = {
2137+ 'ar_date_ret': fields.date('Date ret.', readonly=True),
2138+ 'ai_date_inv': fields.date('Date Invoice'),
2139+ 'ar_date_document': fields.date('Date Account Retencion'),
2140+ 'rp_vat':fields.char('Vat Number', size=64, readonly=True),
2141+ 'rp_id':fields.many2one('res.partner', 'Partner', readonly=True),
2142+ 'ar_number':fields.char('Retention Number', size=64, required=False, readonly=True),
2143+ 'ai_reference':fields.char('Invoice Number', size=64, required=False, readonly=True),
2144+ 'ai_amount_total': fields.float('Amount Total', digits_compute= dp.get_precision('Fiscal Report')),
2145+ 'ai_amount_untaxed': fields.float('Amount Untaxed', digits_compute= dp.get_precision('Fiscal Report'), readonly=True),
2146+ 'ai_amount_tax': fields.float('Amount tax', digits_compute= dp.get_precision('Fiscal Report'), readonly=True),
2147+ 'ar_line_id':fields.many2one('account.wh.iva.line', 'Account Retention', readonly=True),
2148+ 'ai_id':fields.many2one('account.invoice', 'Account Invoice', readonly=True),
2149+ 'ar_id':fields.many2one('account.wh.iva', 'Account Retention', readonly=True),
2150+ }
2151+ def init(self, cr):
2152+ '''
2153+ Create or replace view fiscal_reports_whp
2154+ '''
2155+ drop_view_if_exists(cr, 'fiscal_reports_whp')
2156+ cr.execute("""
2157+ create or replace view fiscal_reports_whp as (
2158+ SELECT
2159+ ar."date_ret" AS ar_date_ret,
2160+ rp."vat" AS rp_vat,
2161+ ar."number" AS ar_number,
2162+ ai."reference" AS ai_reference,
2163+ ai."date_invoice" AS ai_date_inv,
2164+ ar."date" AS ar_date_document,
2165+ case when ai.type='in_refund'
2166+ then
2167+ ai."amount_total"*(-1)
2168+ else
2169+ ai."amount_total"
2170+ end as ai_amount_total,
2171+ case when ai.type='in_refund'
2172+ then
2173+ ai."amount_tax"*(-1)
2174+ else
2175+ ai."amount_tax"
2176+ end as ai_amount_tax,
2177+ case when ai.type='in_refund'
2178+ then
2179+ ai."amount_untaxed"*(-1)
2180+ else
2181+ ai."amount_untaxed"
2182+ end as ai_amount_untaxed,
2183+ ar_line."id" AS id,
2184+ ar_line."id" AS ar_line_id,
2185+ ar."id" AS ar_id,
2186+ rp."id" AS rp_id,
2187+ ai."id" AS ai_id
2188+ FROM
2189+ "account_wh_iva_line" ar_line INNER JOIN "account_wh_iva" ar ON ar_line."retention_id" = ar."id"
2190+ INNER JOIN "res_partner" rp ON ar."partner_id" = rp."id"
2191+ INNER JOIN "account_invoice" ai ON ar_line."invoice_id" = ai."id"
2192+ WHERE
2193+ ar."state" = 'done'
2194+ AND
2195+ (ai."type" = 'in_invoice' OR ai."type" = 'in_refund')
2196+ )
2197+ """)
2198+fiscal_reports_whp()
2199+
2200+class fiscal_reports_whs(osv.osv):
2201+ '''
2202+ Modifying the object fiscal.reports.whs
2203+ '''
2204+ _name = "fiscal.reports.whs"
2205+ _description = "Sale by period"
2206+ _auto = False
2207+ _rec_name = 'ai_nro_ctrl'
2208+ _columns = {
2209+ 'ar_date_ret': fields.date('Date'),
2210+ 'ai_date_inv': fields.date('Date Invoice'),
2211+ 'ar_date_document': fields.date('Date Account Retencion'),
2212+ 'rp_vat':fields.char('Vat Number', size=64, readonly=True),
2213+ 'rp_id':fields.many2one('res.partner', 'Partner Name', readonly=True),
2214+ 'ar_number':fields.char('WH Number', size=64, readonly=True),
2215+ 'ai_number':fields.char('Invoice Number', size=64, readonly=True),
2216+ 'ai_id':fields.many2one('account.invoice', 'Invoice', required=False, readonly=True),
2217+ 'ai_amount_total': fields.float('Invoice Total', digits_compute= dp.get_precision('Fiscal Report'), readonly=True),
2218+ 'ai_amount_untaxed': fields.float('Amount Untaxed', digits_compute= dp.get_precision('Fiscal Report'), readonly=True),
2219+ 'ar_line_id':fields.many2one('account.wh.iva.line', 'Account Retention', readonly=True),
2220+ 'ai_amount_tax': fields.float('Amount Tax', digits_compute= dp.get_precision('Fiscal Report'), readonly=True),
2221+ 'ar_id':fields.many2one('account.wh.iva', 'Retention', required=False, readonly=True),
2222+ 'ai_reference':fields.char('Invoice Number', size=64, required=False, readonly=True),
2223+ }
2224+ def init(self, cr):
2225+ '''
2226+ Create or replace view fiscal_reports_whs
2227+ '''
2228+ drop_view_if_exists(cr, 'fiscal_reports_whs')
2229+ cr.execute("""
2230+ create or replace view fiscal_reports_whs as (
2231+ SELECT
2232+ ar."date_ret" AS ar_date_ret,
2233+ rp."vat" AS rp_vat,
2234+ ar."number" AS ar_number,
2235+ ai."number" AS ai_reference,
2236+ ai."number" AS ai_number,
2237+ ai."date_invoice" AS ai_date_inv,
2238+ ar."date" AS ar_date_document,
2239+ case when ai.type='out_refund'
2240+ then
2241+ ai."amount_total"*(-1)
2242+ else
2243+ ai."amount_total"
2244+ end as ai_amount_total,
2245+ case when ai.type='out_refund'
2246+ then
2247+ ai."amount_tax"*(-1)
2248+ else
2249+ ai."amount_tax"
2250+ end as ai_amount_tax,
2251+ case when ai.type='out_refund'
2252+ then
2253+ ai."amount_untaxed"*(-1)
2254+ else
2255+ ai."amount_untaxed"
2256+ end as ai_amount_untaxed,
2257+ ar_line."id" AS id,
2258+ ar_line."id" AS ar_line_id,
2259+ ar."id" AS ar_id,
2260+ rp."id" AS rp_id,
2261+ ai."id" AS ai_id
2262+ FROM
2263+ "account_wh_iva_line" ar_line INNER JOIN "account_wh_iva" ar ON ar_line."retention_id" = ar."id"
2264+ INNER JOIN "res_partner" rp ON ar."partner_id" = rp."id"
2265+ INNER JOIN "account_invoice" ai ON ar_line."invoice_id" = ai."id"
2266+ WHERE
2267+ ar."state" = 'done'
2268+ AND
2269+ (ai."type" = 'out_invoice' OR ai."type" = 'out_refund')
2270+ ORDER BY ar_date_ret
2271+ )
2272+ """)
2273+fiscal_reports_whs()
2274
2275=== added directory 'l10n_ve_fiscal_reports/report'
2276=== added file 'l10n_ve_fiscal_reports/report/__init__.py'
2277--- l10n_ve_fiscal_reports/report/__init__.py 1970-01-01 00:00:00 +0000
2278+++ l10n_ve_fiscal_reports/report/__init__.py 2011-12-29 18:55:26 +0000
2279@@ -0,0 +1,31 @@
2280+# -*- encoding: utf-8 -*-
2281+##############################################################################
2282+#
2283+# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
2284+# Javier Duran <javier@vauxoo.com>
2285+#
2286+#
2287+# WARNING: This program as such is intended to be used by professional
2288+# programmers who take the whole responsability of assessing all potential
2289+# consequences resulting from its eventual inadequacies and bugs
2290+# End users who are looking for a ready-to-use solution with commercial
2291+# garantees and support are strongly adviced to contract a Free Software
2292+# Service Company
2293+#
2294+# This program is Free Software; you can redistribute it and/or
2295+# modify it under the terms of the GNU General Public License
2296+# as published by the Free Software Foundation; either version 2
2297+# of the License, or (at your option) any later version.
2298+#
2299+# This program is distributed in the hope that it will be useful,
2300+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2301+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2302+# GNU General Public License for more details.
2303+#
2304+# You should have received a copy of the GNU General Public License
2305+# along with this program; if not, write to the Free Software
2306+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2307+#
2308+##############################################################################
2309+import book
2310+import wh_book
2311
2312=== added file 'l10n_ve_fiscal_reports/report/book.py'
2313--- l10n_ve_fiscal_reports/report/book.py 1970-01-01 00:00:00 +0000
2314+++ l10n_ve_fiscal_reports/report/book.py 2011-12-29 18:55:26 +0000
2315@@ -0,0 +1,418 @@
2316+# -*- encoding: utf-8 -*-
2317+##############################################################################
2318+#
2319+# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
2320+# Javier Duran <javier@vauxoo.com>
2321+#
2322+#
2323+# WARNING: This program as such is intended to be used by professional
2324+# programmers who take the whole responsability of assessing all potential
2325+# consequences resulting from its eventual inadequacies and bugs
2326+# End users who are looking for a ready-to-use solution with commercial
2327+# garantees and support are strongly adviced to contract a Free Software
2328+# Service Company
2329+#
2330+# This program is Free Software; you can redistribute it and/or
2331+# modify it under the terms of the GNU General Public License
2332+# as published by the Free Software Foundation; either version 2
2333+# of the License, or (at your option) any later version.
2334+#
2335+# This program is distributed in the hope that it will be useful,
2336+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2337+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2338+# GNU General Public License for more details.
2339+#
2340+# You should have received a copy of the GNU General Public License
2341+# along with this program; if not, write to the Free Software
2342+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2343+#
2344+##############################################################################
2345+
2346+'''
2347+Fiscal Report For Venezuela
2348+'''
2349+
2350+import time
2351+from report import report_sxw
2352+from osv import osv
2353+import pooler
2354+
2355+class pur_sal_book(report_sxw.rml_parse):
2356+ '''
2357+ Book generates purchase and sale
2358+ '''
2359+
2360+ def __init__(self, cr, uid, name, context):
2361+ '''
2362+ Reference to the current instance
2363+ '''
2364+ super(pur_sal_book, self).__init__(cr, uid, name, context)
2365+ self.localcontext.update({
2366+ 'time': time,
2367+ 'get_data':self._get_data,
2368+ 'get_partner_addr': self._get_partner_addr,
2369+ 'get_p_country': self._get_p_country,
2370+ 'get_rif': self._get_rif,
2371+ 'get_month':self._get_month,
2372+ 'get_doc':self._get_doc,
2373+ 'get_ret':self._get_ret,
2374+ 'get_data_adjustment': self._get_data_adjustment,
2375+ 'validation': self._validation,
2376+ 'get_data_wh': self._get_data_wh,
2377+ 'get_amount_withheld': self._get_amount_withheld,
2378+ 'get_date_wh': self._get_date_wh,
2379+ 'get_v_sdcf': self._get_v_sdcf,
2380+ 'get_tax_line': self._get_tax_line,
2381+ 'get_total_wh': self._get_total_wh,
2382+ 'get_total_iva': self._get_total_iva,
2383+ 'get_amount_untaxed_tax': self._get_amount_untaxed_tax,
2384+ 'get_taxes': self._get_taxes,
2385+ 'get_wh_actual': self._get_wh_actual,
2386+ 'get_id': self._get_id,
2387+ 'get_papel_anulado': self._get_papel_anulado,
2388+ })
2389+
2390+ def _get_id(self,form,idh,type=None):
2391+ x=1
2392+ ids =None
2393+
2394+ if form['type']=='sale':
2395+ ids = self._get_data_wh(form)
2396+ if form['type']=='sale' and type:
2397+ x+=len(ids)
2398+ if type=='book':
2399+ ids = self._get_data(form)
2400+
2401+ for a in ids:
2402+ if a.id != idh:
2403+ x+=1
2404+ else:
2405+ return x
2406+
2407+ def _get_book_type(self,form):
2408+ book_type=None
2409+ book_type='fiscal.reports.sale'
2410+ if form['type']=='purchase':
2411+ book_type='fiscal.reports.purchase'
2412+
2413+ return book_type
2414+
2415+ def _get_book_type_wh(self,form):
2416+ book_type=None
2417+ book_type='fiscal.reports.whs'
2418+ if form['type']=='purchase':
2419+ book_type='fiscal.reports.whp'
2420+ return book_type
2421+
2422+ def _validation(self,form):
2423+ type_doc = 'sale'
2424+ if form['type']=='purchase':
2425+ type_doc = 'purchase'
2426+ period_obj=self.pool.get('account.period')
2427+ adjust_obj = self.pool.get('adjustment.book')
2428+ period_ids = period_obj.search(self.cr,self.uid,[('date_start','<=',form['date_start']),('date_stop','>=',form['date_end'])])
2429+ if len(period_ids)<=0:
2430+ return False
2431+ fr_ids = adjust_obj.search(self.cr,self.uid,[('period_id','in',period_ids),('type','=',type_doc)])
2432+ if len(fr_ids)<=0:
2433+ return False
2434+ return True
2435+
2436+ def _get_data_adjustment(self,form):
2437+
2438+ type_doc = 'sale'
2439+ if form['type']=='purchase':
2440+ type_doc = 'purchase'
2441+ adjust_obj = self.pool.get('adjustment.book')
2442+ adjust_line_obj = self.pool.get('adjustment.book.line')
2443+ period_obj=self.pool.get('account.period')
2444+ data=[]
2445+ data_line=[]
2446+ period_ids = period_obj.search(self.cr,self.uid,[('date_start','<=',form['date_start']),('date_stop','>=',form['date_end'])])
2447+
2448+ if len(period_ids)>0:
2449+ fr_ids = adjust_obj.search(self.cr,self.uid,[('period_id', 'in',period_ids),('type','=',type_doc)])
2450+ if len(fr_ids)>0:
2451+ adj_ids = adjust_line_obj.search(self.cr,self.uid,[('adjustment_id','=',fr_ids[0])],order='date_admin')
2452+ data = adjust_obj.browse(self.cr,self.uid, fr_ids)
2453+ data_line = adjust_line_obj.browse(self.cr,self.uid, adj_ids)
2454+ return (data,data_line)
2455+
2456+ def _get_date_wh(self,form, l):
2457+ if l.ar_date_document> form['date_end']:
2458+ return False
2459+ return True
2460+
2461+ def _get_papel_anulado(self,data,l,tipo=None):
2462+
2463+ if l.ai_id.name:
2464+ if l.ai_id.name.find('PAPELANULADO')>=0:
2465+ return tipo
2466+ else:
2467+ return data
2468+ else:
2469+ return data
2470+ return tipo
2471+
2472+ def _get_v_sdcf(self,l):
2473+ amount = 0.0
2474+ if not l:
2475+ return 0.0
2476+ for tax in l.ai_id.tax_line:
2477+ name=tax.name
2478+ if name.find('SDCF')>=0:
2479+ amount = tax.base+amount
2480+ if l.ai_id.type in ['in_refund', 'out_refund']:
2481+ amount = amount * (-1)
2482+ return (amount)
2483+
2484+ def _get_tax_line(self,s):
2485+ name = s.name
2486+ cont = 0
2487+ if name.find('SDCF')>=0:
2488+ if cont==0:
2489+ return 0
2490+ else:
2491+ cont = cont + 1
2492+ return s.base_amount
2493+
2494+ def _get_data(self,form):
2495+ data=[]
2496+ orden='ai_nro_ctrl'
2497+
2498+ book_type = self._get_book_type(form)
2499+ fr_obj = self.pool.get(book_type)
2500+
2501+ if book_type=='fiscal.reports.purchase':
2502+ orden='ai_date_document'
2503+ fr_ids = fr_obj.search(self.cr,self.uid,[('ai_date_invoice', '<=', form['date_end']), ('ai_date_invoice', '>=', form['date_start'])], order=orden)
2504+
2505+ if len(fr_ids)<=0:
2506+ return False
2507+ data = fr_obj.browse(self.cr,self.uid, fr_ids)
2508+ return data
2509+
2510+ def _get_data_wh(self,form):
2511+ data=[]
2512+ d1=form['date_start']
2513+ d2=form['date_end']
2514+ fr_obj = self.pool.get('fiscal.reports.whs')
2515+ fr_ids = fr_obj.search(self.cr,self.uid,[('ar_date_ret', '<=', d2), ('ar_date_ret', '>=',d1),('ar_date_document','<=',d1)], order='ar_date_ret')
2516+ data = fr_obj.browse(self.cr,self.uid, fr_ids)
2517+ return data
2518+
2519+ def _get_total_wh(self,form,actual=None):
2520+ total=0
2521+ data=[]
2522+ book_type= self._get_book_type_wh(form)
2523+ fr_obj = self.pool.get(book_type)
2524+
2525+ fr_ids = fr_obj.search(self.cr,self.uid,[('ar_date_ret', '<=', form['date_end']), ('ar_date_ret', '>=', form['date_start'])])
2526+
2527+ data = fr_obj.browse(self.cr,self.uid, fr_ids)
2528+ for wh in data:
2529+ if wh.ai_id.type in ['in_refund', 'out_refund']:
2530+ total+= wh.ar_line_id.amount_tax_ret * (-1)
2531+ else:
2532+ total+= wh.ar_line_id.amount_tax_ret
2533+ return total
2534+
2535+
2536+ def _get_wh_actual(self,form):
2537+ total=0
2538+ data=[]
2539+ book_type= self._get_book_type_wh(form)
2540+ fr_obj = self.pool.get(book_type)
2541+
2542+ fr_ids = fr_obj.search(self.cr,self.uid,[('ar_date_ret', '<=', form['date_end']),('ar_date_ret', '>=', form['date_start']),('ai_date_inv','>=',form['date_start']),('ai_date_inv','<=',form['date_end'])])
2543+ data = fr_obj.browse(self.cr,self.uid, fr_ids)
2544+ for wh in data:
2545+ if wh.ai_id.type in ['in_refund', 'out_refund']:
2546+ total+= wh.ar_line_id.amount_tax_ret * (-1)
2547+ else:
2548+ total+= wh.ar_line_id.amount_tax_ret
2549+ return total
2550+
2551+
2552+
2553+ def _get_ret(self,form,ret_id=None):
2554+ '''
2555+ Ensure that Withholding date is inside period specified on form.
2556+ '''
2557+ d1=form['date_start']
2558+ d2=form['date_end']
2559+ if form['type']=='purchase':
2560+ if ret_id:
2561+ ret_obj = self.pool.get('account.retention')
2562+ rets = ret_obj.browse(self.cr,self.uid,[ret_id])
2563+ return rets[0].number
2564+ if ret_id:
2565+ ret_obj = self.pool.get('account.retention')
2566+ rets = ret_obj.browse(self.cr,self.uid,[ret_id])
2567+ if rets:
2568+ if time.strptime(rets[0].date, '%Y-%m-%d') >= time.strptime(d1, '%Y-%m-%d') \
2569+ and time.strptime(rets[0].date, '%Y-%m-%d') <= time.strptime(d2, '%Y-%m-%d'):
2570+ return rets[0].number
2571+ else:
2572+ return False
2573+ else:
2574+ return False
2575+ else:
2576+ return False
2577+
2578+ def _get_amount_withheld(self,wh_line_id):
2579+ wh_obj = self.pool.get('account.retention.line')
2580+ data = wh_obj.browse(self.cr,self.uid, [wh_line_id])[0]
2581+ return data.amount_tax_ret
2582+
2583+ def _get_partner_addr(self, idp=None):
2584+ '''
2585+ Obtains the address of partner
2586+ '''
2587+ if not idp:
2588+ return []
2589+
2590+ addr_obj = self.pool.get('res.partner.address')
2591+ addr_inv = 'NO HAY DIRECCION FISCAL DEFINIDA'
2592+ addr_ids = addr_obj.search(self.cr,self.uid,[('partner_id','=',idp), ('type','=','invoice')])
2593+ if addr_ids:
2594+ addr = addr_obj.browse(self.cr,self.uid, addr_ids[0])
2595+ addr_inv = (addr.street or '')+' '+(addr.street2 or '')+' '+(addr.zip or '')+ ' '+(addr.city or '')+ ' '+ (addr.country_id and addr.country_id.name or '')+ ', TELF.:'+(addr.phone or '')
2596+ return addr_inv
2597+
2598+ def _get_p_country(self, idp=None):
2599+ '''
2600+ Obtains the address of partner
2601+ '''
2602+ if not idp:
2603+ return []
2604+
2605+ addr_obj = self.pool.get('res.partner.address')
2606+ a_id = 1000
2607+ a_ids = addr_obj.search(self.cr,self.uid,[('partner_id','=',idp), ('type','=','invoice')])
2608+ if a_ids:
2609+ a = addr_obj.browse(self.cr,self.uid, a_ids[0])
2610+ a_id = a.country_id.id
2611+ return a_id
2612+
2613+ def _get_doc(self, inv_id=None):
2614+ '''
2615+ Get String Document Type
2616+ '''
2617+ inv_obj = self.pool.get('account.invoice')
2618+ inv_ids = inv_obj.search(self.cr,self.uid,[('id', '=', inv_id)])
2619+ inv = inv_obj.browse(self.cr,self.uid, inv_ids)[0]
2620+ doc_type = ''
2621+ if (inv.type=="in_invoice" or inv.type=="out_invoice") and inv.parent_id:
2622+ doc_type = "ND"
2623+ elif (inv.type=="in_invoice" or inv.type=="in_refund") and inv.expedient:
2624+ doc_type="E"
2625+ elif inv.type=='in_refund' or inv.type=='out_refund':
2626+ doc_type = "NC"
2627+ elif inv.type=="in_invoice" or inv.type=="out_invoice":
2628+ doc_type = "F"
2629+ return doc_type
2630+
2631+ def _get_rif(self, vat=''):
2632+ '''
2633+ Get R.I.F.
2634+ '''
2635+ if not vat:
2636+ return []
2637+ return vat[2:].replace(' ', '')
2638+
2639+ def _get_month(self, form):
2640+ '''
2641+ return year and month
2642+ '''
2643+ months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
2644+ res = ['',0]
2645+ res[0] = months[time.strptime(form['date_start'],"%Y-%m-%d")[1]-1]
2646+ res[1] = time.strptime(form['date_start'],"%Y-%m-%d")[0]
2647+ return res
2648+
2649+ def _get_total_iva(self,form):
2650+ '''
2651+ Return Amount Total of each invoice at Withholding Vat
2652+ '''
2653+ book_type= self._get_book_type(form)
2654+
2655+ sql = ''' select sum(ai_amount_total) as total
2656+ from %s
2657+ where ai_date_invoice>= '%s' and ai_date_invoice<='%s'
2658+ ''' % (book_type.replace('.','_'),form['date_start'],form['date_end'])
2659+ self.cr.execute(sql)
2660+
2661+ res = self.cr.dictfetchone()
2662+ return res['total']
2663+
2664+ def _get_amount_untaxed_tax(self,form,percent,nationality=''):
2665+ '''
2666+ Return Amount Untaxed and Amount Tax, accorded percent of withholding vat
2667+ '''
2668+ amount_untaxed=0.0
2669+ amount_tax=0.0
2670+
2671+ book_type=self._get_book_type(form)
2672+
2673+ fr_obj = self.pool.get(book_type)
2674+ user_obj = self.pool.get('res.users')
2675+
2676+ user_ids = user_obj.search(self.cr,self.uid,[('id', '=', self.uid)])
2677+ fr_ids = fr_obj.search(self.cr,self.uid,[('ai_date_invoice', '<=', form['date_end']), ('ai_date_invoice', '>=', form['date_start'])])
2678+
2679+ user=user_obj.browse(self.cr,self.uid, [self.uid])
2680+
2681+ for d in fr_obj.browse(self.cr,self.uid, fr_ids):
2682+ for tax in d.ai_id.tax_line:
2683+
2684+ if percent in tax.name:
2685+ if nationality=='nacional':
2686+ if self._get_p_country(user[0].company_id.partner_id.id)==self._get_p_country(d.ai_id.partner_id.id):
2687+ amount_untaxed+= self._get_amount_untaxed_tax2(d.ai_id.type,tax)[0]
2688+ amount_tax+= self._get_amount_untaxed_tax2(d.ai_id.type,tax)[1]
2689+ else:
2690+ if self._get_p_country(user[0].company_id.partner_id.id)!=self._get_p_country(d.ai_id.partner_id.id):
2691+ amount_untaxed+= self._get_amount_untaxed_tax2(d.ai_id.type,tax)[0]
2692+ amount_tax+= self._get_amount_untaxed_tax2(d.ai_id.type,tax)[1]
2693+
2694+ return (amount_untaxed,amount_tax)
2695+
2696+
2697+ def _get_amount_untaxed_tax2(self,type,tax):
2698+ amount_untaxed=0.0
2699+ amount_tax=0.0
2700+ if type in ['in_refund', 'out_refund']:
2701+ amount_untaxed= tax.base * (-1)
2702+ amount_tax= tax.amount * (-1)
2703+ else:
2704+ amount_untaxed= tax.base
2705+ amount_tax= tax.amount
2706+ return [amount_untaxed,amount_tax]
2707+
2708+ def _get_taxes(self,l):
2709+
2710+ tax_obj = self.pool.get('account.invoice.tax')
2711+ tax_ids = tax_obj.search(self.cr,self.uid,[('invoice_id', '=', l.ai_id.id)])
2712+
2713+ tam = len(tax_ids)
2714+ data = tax_obj.browse(self.cr,self.uid, tax_ids)
2715+
2716+ for tax in data:
2717+ if 'SDCF' in tax.name and tam>=2:
2718+ tax_ids.remove(tax.id)
2719+
2720+ data = tax_obj.browse(self.cr,self.uid, tax_ids)
2721+
2722+ if len(data)<=0:
2723+ return False
2724+ return data
2725+
2726+
2727+report_sxw.report_sxw(
2728+ 'report.fiscal.reports.purchase.purchase_seniat',
2729+ 'fiscal.reports.purchase',
2730+ 'addons/l10n_ve_fiscal_reports/report/book_seniat.rml',
2731+ parser=pur_sal_book,
2732+ header=False
2733+)
2734
2735=== added file 'l10n_ve_fiscal_reports/report/book_seniat.rml'
2736--- l10n_ve_fiscal_reports/report/book_seniat.rml 1970-01-01 00:00:00 +0000
2737+++ l10n_ve_fiscal_reports/report/book_seniat.rml 2011-12-29 18:55:26 +0000
2738@@ -0,0 +1,673 @@
2739+<?xml version="1.0"?>
2740+<document filename="test.pdf" invariant="1">
2741+ <template pageSize="(825.0,612.0)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
2742+ <pageTemplate id="first">
2743+
2744+ <pageGraphics>
2745+ <setFont name="Helvetica" size="9"/>
2746+ <drawString x="1.3cm" y="0.5cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
2747+ <drawString x="25cm" y="0.5cm">Pagina <pageNumber/></drawString>
2748+ <lineMode width="0.7"/>
2749+ <lines>1.3cm 24.9cm 38.3cm 24.9cm</lines>
2750+ <setFont name="Helvetica" size="8"/>
2751+ </pageGraphics>
2752+ <frame id="first" x1="5.0" y1="15.0" width="815" height="580"/>
2753+ </pageTemplate>
2754+
2755+
2756+ </template>
2757+ <stylesheet>
2758+ <blockTableStyle id="HEADERTABLE">
2759+ <blockAlignment value="LEFT"/>
2760+ <blockValign value="TOP"/>
2761+ <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,0" stop="14,0"/>
2762+ </blockTableStyle>
2763+ <blockTableStyle id="HEADERTABLE_AD">
2764+ <blockAlignment value="LEFT"/>
2765+ <blockValign value="TOP"/>
2766+ <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,3" stop="14,3"/>
2767+ </blockTableStyle>
2768+ <blockTableStyle id="INTERNALTABLE">
2769+ <blockAlignment value="LEFT"/>
2770+ <blockValign value="MIDDLE"/>
2771+ </blockTableStyle>
2772+ <blockTableStyle id="CONTENIDOTABLE">
2773+ <blockAlignment value="LEFT"/>
2774+ <blockValign value="MIDDLE"/>
2775+ <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/>
2776+ <lineStyle kind="GRID" colorName="black" thickness="1" start="-5,0" stop="-4,0"/>
2777+ </blockTableStyle>
2778+ <blockTableStyle id="ENCANBEZADO">
2779+ <lineStyle kind="GRID" colorName="black" thickness="1" start="10,0" stop="11,0"/>
2780+ <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/>
2781+ <blockBackground colorName="#e5e2e5" start="0,1" stop="-1,1"/>
2782+ </blockTableStyle>
2783+ <blockTableStyle id="ENCANBEZADO_SINCOLUM">
2784+ <lineStyle kind="GRID" colorName="black" thickness="1" start="10,0" stop="11,0"/>
2785+ <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/>
2786+ <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/>
2787+ </blockTableStyle>
2788+ <blockTableStyle id="TOTALS_TABLE">
2789+ <blockValign value="MIDDLE"/>
2790+ <lineStyle kind="GRID" colorName="black" thickness="1" start="0,0" stop="-1,-1"/>
2791+ <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/>
2792+ </blockTableStyle>
2793+ <blockTableStyle id="CONTENIDOTABLE_PUR">
2794+ <blockValign value="MIDDLE"/>
2795+ <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/>
2796+ <lineStyle kind="GRID" colorName="black" thickness="1" start="-4,0" stop="-3,0"/>
2797+ </blockTableStyle>
2798+ <blockTableStyle id="CONTENIDOTABLE_TITULOS">
2799+ <blockAlignment value="LEFT"/>
2800+ <blockValign value="MIDDLE"/>
2801+ <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/>
2802+ <blockBackground colorName="#e5e2e5" start="1,0" stop="-1,0"/>
2803+ </blockTableStyle>
2804+ <blockTableStyle id="CONTENIDOTABLE_TITULOS_PUR">
2805+ <blockAlignment value="LEFT"/>
2806+ <blockValign value="MIDDLE"/>
2807+ <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/>
2808+ <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/>
2809+ </blockTableStyle>
2810+ <blockTableStyle id="CONTENIDOTABLE_LINES">
2811+ <blockAlignment value="LEFT"/>
2812+ <blockValign value="MIDDLE"/>
2813+ <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/>
2814+ </blockTableStyle>
2815+ <blockTableStyle id="CONTENIDOTABLE_LINES_PUR">
2816+ <blockAlignment value="LEFT"/>
2817+ <blockValign value="MIDDLE"/>
2818+ <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/>
2819+ </blockTableStyle>
2820+
2821+ <initialize>
2822+ <alias id="style.normal" value="style.Normal"/>
2823+ </initialize>
2824+ <paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/>
2825+ <paraStyle name="P2" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/>
2826+ <paraStyle name="P3" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/>
2827+ <paraStyle name="P4" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER" textColor="#ffffff"/>
2828+ <paraStyle name="P5" fontName="Helvetica" fontSize="6.0" leading="8"/>
2829+ <paraStyle name="CONTENIDO" fontName="Helvetica" fontSize="6.0" leading="6" alignment="CENTER"/>
2830+ <paraStyle name="TITULO_AJUSTE" fontName="Helvetica" fontSize="10.0" alignment="CENTER"/>
2831+ <paraStyle name="CONTENIDOINT" fontName="Helvetica" fontSize="6.0" leading="1" alignment="CENTER"/>
2832+ <paraStyle name="CONTENIDOLEFT" fontName="Helvetica" fontSize="6.0" leading="6" alignment="LEFT"/>
2833+ <paraStyle name="OBSERVACIONES" fontName="Helvetica" fontSize="9.0" alignment="LEFT"/>
2834+ <paraStyle name="HEADERDOC" fontName="Helvetica-bold" fontSize="8.0" leading="8" alignment="JUSTIFY"/>
2835+ <paraStyle name="HEADER" fontName="Helvetica-bold" fontSize="6.0" leading="6" alignment="CENTER"/>
2836+ <paraStyle name="CONTENIDOLEFT_BOLD" fontName="Helvetica-bold" fontSize="6.0" leading="6" alignment="LEFT"/>
2837+ <paraStyle name="P7" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/>
2838+ <paraStyle name="P8" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER" textColor="#ffffff"/>
2839+ <paraStyle name="Standard" fontName="Times-Roman"/>
2840+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
2841+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
2842+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
2843+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
2844+ <paraStyle name="Index" fontName="Times-Roman"/>
2845+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
2846+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
2847+ </stylesheet>
2848+ <images/>
2849+
2850+ <story>
2851+ <blockTable colWidths="350.0,190.0,220.0" style="HEADERTABLE">
2852+ <tr>
2853+ [[ setLang(l.ai_id.company_id.partner_id.lang) ]]
2854+ <td>
2855+ <para style="HEADERDOC">[[ company.partner_id.name ]] [[ company.partner_id.vat[2:] ]]</para>
2856+ <para style="HEADERDOC">[[ get_partner_addr( company.partner_id.id ) ]]</para>
2857+ </td>
2858+ <td>
2859+ <para style="HEADERDOC">Libro: [[ (data['form']['type'] == 'purchase') and "Compras"or "Ventas" ]] </para>
2860+ <para style="HEADERDOC">Correspodiente al Mes de [[ get_month( data['form'] )[0] ]] del año [[ get_month( data['form'] )[1] ]]</para>
2861+ <para style="HEADERDOC">[[data['form'] and ('Desde: %s'%formatLang( data['form']['date_start'], date=True)) or '']]</para>
2862+ <para style="HEADERDOC">[[data['form'] and ('Hasta: %s'%formatLang( data['form']['date_end'], date=True)) or '']]</para>
2863+ </td>
2864+ <td>
2865+ <para style="HEADERDOC" fontName="Helvetica">Según Articulo 76 del Reglamento de la Ley del IVA No. 5.363 del 12 de Julio de 1999</para>
2866+ </td>
2867+ </tr>
2868+ </blockTable>
2869+ <spacer length="2mm"/>
2870+ <!-- ****************************************-->
2871+ <!-- ********* SALE, PURCHASE, BOOK *********-->
2872+ <!-- ****************************************-->
2873+ <section>
2874+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0" style="ENCANBEZADO_SINCOLUM" repeatRows="2">
2875+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0",'style':'ENCANBEZADO', 'repeatRows':'2'}) or '']]
2876+ <tr>
2877+ <td></td><td></td><td></td><td></td>
2878+ <td></td><td></td><td></td><td></td>
2879+ <td></td><td></td>
2880+ <td>
2881+ <blockTable colWidths="110.0" style="INTERNALTABLE">
2882+ <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Nacionales</para></td></tr>
2883+ </blockTable>
2884+ </td>
2885+ <td>
2886+ <blockTable colWidths="110.0" style="INTERNALTABLE">
2887+ <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Internacionales</para></td></tr>
2888+ </blockTable>
2889+ </td>
2890+ <td></td><td></td><td></td>
2891+ </tr>
2892+ <tr>
2893+ <td><para style="HEADER">[[ (data['form']['type'] == 'purchase') and 'Fecha Adm.' or '' ]]</para></td>
2894+ <td><para style="HEADER">Fecha Cont.</para></td>
2895+ <td><para style="HEADER">RIF</para></td>
2896+ <td><para style="HEADER">Razon Social</para></td>
2897+ <td><para style="HEADER">Numero Doc.</para></td>
2898+ <td><para style="HEADER">Numero Control</para></td>
2899+ <td><para style="HEADER">Total con IVA</para></td>
2900+ <td><para style="HEADER">T. Doc.</para></td>
2901+ <td><para style="HEADER">Documento Afectado</para></td>
2902+ <td><para style="HEADER">Sin derecho a Credito Fiscal</para></td>
2903+ <td>
2904+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
2905+ <tr>
2906+ <td><para style="HEADER">Base Imponible</para></td>
2907+ <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td>
2908+ <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td>
2909+ </tr>
2910+ </blockTable>
2911+ </td>
2912+ <td>
2913+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
2914+ <tr>
2915+ <td><para style="HEADER">Base Imponible</para></td>
2916+ <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td>
2917+ <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td>
2918+ </tr>
2919+ </blockTable>
2920+ </td>
2921+ <td><para style="HEADER">Retencion Iva</para></td>
2922+ <td><para style="HEADER">Comprobante</para></td>
2923+ <td><para style="HEADER">Linea</para></td>
2924+ </tr>
2925+ </blockTable>
2926+ </section>
2927+
2928+ <!-- ************ WITHHOLDING VAT BOOK LINES************-->
2929+ <section>
2930+ <para>[[repeatIn( get_data_wh(data['form']),'wh')]]</para>
2931+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0" style="CONTENIDOTABLE_LINES" repeatRows="2">
2932+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0",'style':'CONTENIDOTABLE_LINES_PUR', 'repeatRows':'2'}) or '']]
2933+ <tr>
2934+ <para>[[ (data['form']['type'] == 'sale') and '.' or removeParentNode('blockTable') ]]</para>
2935+ [[ setLang(company.partner_id.lang) ]]
2936+ <td><para style="CONTENIDO">[[ (data['form']['type'] == 'purchase') and wh.ai_id.date_document or '' ]]</para></td>
2937+ <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(wh.ar_date_ret, '%Y-%m-%d'))]]</para></td>
2938+ <td><para style="CONTENIDO">[[ get_rif(wh.rp_vat) ]]</para></td>
2939+ <td><para style="CONTENIDOLEFT">[[ wh.rp_id.name ]]</para></td>
2940+ <td><para style="CONTENIDO">-----</para></td>
2941+ <td><para style="CONTENIDO">-----</para></td>
2942+ <td><para style="CONTENIDO">0.00</para></td>
2943+ <td><para style="CONTENIDO">-</para></td>
2944+ <td><para style="CONTENIDO">-----</para></td>
2945+ <td><para style="CONTENIDO">0.00</para></td>
2946+ <td>
2947+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
2948+ <tr>
2949+ <td><para style="CONTENIDO">0.00</para></td>
2950+ <td><para style="CONTENIDO">0.00</para></td>
2951+ <td><para style="CONTENIDO">0.00</para></td>
2952+ </tr>
2953+ </blockTable>
2954+ </td>
2955+ <td>
2956+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
2957+ <tr>
2958+ <td><para style="CONTENIDO">0.00</para></td>
2959+ <td><para style="CONTENIDO">0.00</para></td>
2960+ <td><para style="CONTENIDO">0.00</para></td>
2961+ </tr>
2962+ </blockTable>
2963+ </td>
2964+ <td><para style="CONTENIDO">[[ formatLang(get_amount_withheld(wh.ar_line_id.id)) or '' ]]</para></td>
2965+ <td><para style="CONTENIDO">[[ wh.ar_id.number ]]</para></td>
2966+ <td><para style="CONTENIDO">[[ get_id(data['form'],wh.id) ]]</para></td>
2967+ </tr>
2968+ </blockTable>
2969+ </section>
2970+
2971+ <!-- ************ PURCHASE, SALE, BOOK LINES************-->
2972+ <section>
2973+ <para>[[repeatIn( get_data( data['form'] ),'l')]]</para>
2974+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0" style="CONTENIDOTABLE_LINES" repeatRows="2">
2975+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0",'style':'CONTENIDOTABLE_LINES_PUR', 'repeatRows':'2'}) or '']]
2976+ <tr>
2977+ [[ setLang(l.ai_id.company_id.partner_id.lang) ]]
2978+ <td><para style="CONTENIDO">[[ data['form']['type'] == 'purchase' and ( l.ai_id.date_document and formatLang(l.ai_id.date_document, date=True) or '') or '' ]]</para></td>
2979+ <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(l.ai_date_invoice, '%Y-%m-%d')) ]]</para></td>
2980+ <td><para style="CONTENIDO">[[ get_papel_anulado(l.rp_id.vat[2:],l,'-----')]]</para></td>
2981+ <td><para style="CONTENIDOLEFT">[[ get_papel_anulado(l.rp_id.name,l,'ANULADO')]]</para></td>
2982+ <td><para style="CONTENIDO">[[ get_papel_anulado(l.ai_reference,l,'-----')]]</para></td>
2983+ <td><para style="CONTENIDO">[[ l.ai_id.nro_ctrl ]]</para></td>
2984+ <td><para style="CONTENIDO">[[ formatLang((l.ai_id.type in ['in_refund', 'out_refund']) and l.ai_amount_total*(-1) or l.ai_amount_total) ]]</para></td>
2985+ <td><para style="CONTENIDO">[[ get_doc(l.ai_id.id) ]]</para></td>
2986+ <td><para style="HEADER">[[ (data['form']['type'] == 'purchase') and l.ai_id.parent_id.reference or l.ai_id.parent_id.number ]]</para></td>
2987+ <td><para style="CONTENIDO">[[ formatLang(get_v_sdcf(l)) ]]</para></td>
2988+ <td>
2989+ <section>
2990+ <para>[[ repeatIn(get_taxes(l) and get_taxes(l) or [0.0],'s')]]</para>
2991+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
2992+ <tr>
2993+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) == get_p_country(s.invoice_id.partner_id.id)) and get_tax_line(s) or 0.0) ]]</para></td>
2994+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) == get_p_country(s.invoice_id.partner_id.id)) and round(s.tax_amount/(s.base_amount and s.base_amount or 1)*100.0) or 0.0) ]]</para></td>
2995+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) == get_p_country(s.invoice_id.partner_id.id)) and s.tax_amount or 0.0) ]]</para></td>
2996+ </tr>
2997+ </blockTable>
2998+ </section>
2999+ </td>
3000+ <td>
3001+ <section>
3002+ <para>[[ repeatIn(get_taxes(l) and get_taxes(l) or [0.0],'t')]]</para>
3003+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3004+ <tr>
3005+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) != get_p_country(t.invoice_id.partner_id.id)) and get_tax_line(t) or 0.0) ]]</para></td>
3006+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) != get_p_country(t.invoice_id.partner_id.id)) and t.tax_amount/(t.base_amount and t.base_amount or 1)*100.0 or 0.0) ]]</para></td>
3007+ <td><para style="CONTENIDOINT">[[ formatLang((get_p_country(company.partner_id.id) != get_p_country(t.invoice_id.partner_id.id)) and t.tax_amount or 0.0) ]]</para></td>
3008+ </tr>
3009+ </blockTable>
3010+ </section>
3011+ </td>
3012+ <td><para style="CONTENIDO">[[ get_date_wh(data['form'],l) and (get_ret(data['form'], l.ar_id and l.ar_id.id) and (formatLang(((l.ai_id.type in ['in_refund', 'out_refund']) and (get_amount_withheld(l.ar_line_id.id)*(-1)) or get_amount_withheld(l.ar_line_id.id)))) or '') or '']]</para></td>
3013+ <td><para style="CONTENIDO">[[ get_date_wh(data['form'],l) and (get_ret(data['form'],l.ar_id and l.ar_id.id) and l.ar_id.number or '') or '' ]]</para></td>
3014+ <td><para style="CONTENIDO">[[ get_id(data['form'],l.id,'book') ]]</para></td>
3015+ </tr>
3016+ </blockTable>
3017+ </section>
3018+
3019+
3020+ <!-- ************ TOTALS PURCHASE,SALE PARCIALES************-->
3021+ <section>
3022+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0" style="CONTENIDOTABLE_LINES" repeatRows="2">
3023+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0,18.0",'style':'CONTENIDOTABLE_LINES_PUR', 'repeatRows':'2'}) or '']]
3024+ <tr>
3025+ [[ setLang(l.ai_id.company_id.partner_id.lang) ]]
3026+ <td></td><td></td>
3027+ <td></td><td></td>
3028+ <td></td><td></td>
3029+ <td><para style="CONTENIDO">[[ formatLang(get_total_iva(data['form'])) ]]</para></td>
3030+ <td></td><td></td>
3031+ <td><para style="CONTENIDO">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0])]]</para></td>
3032+ <td>
3033+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3034+ <tr>
3035+ <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[0]+get_amount_untaxed_tax(data['form'],'8','nacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[0]) ]]</para></td>
3036+ <td></td>
3037+ <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[1] +get_amount_untaxed_tax(data['form'],'8','nacional')[1]+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[1]) ]]</para></td>
3038+ </tr>
3039+ </blockTable>
3040+ </td>
3041+ <td>
3042+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3043+ <tr>
3044+ <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12')[0]+get_amount_untaxed_tax(data['form'],'8')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO')[0]) ]]</para></td>
3045+ <td></td>
3046+ <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12')[1] +get_amount_untaxed_tax(data['form'],'8')[1]+get_amount_untaxed_tax(data['form'],'EXONERADO')[1]) ]]</para></td>
3047+ </tr>
3048+ </blockTable>
3049+ </td>
3050+ <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])) ]]</para></td>
3051+ <td></td>
3052+ <td></td>
3053+ </tr>
3054+ </blockTable>
3055+ </section>
3056+
3057+ <!-- ************ LEYENDA************-->
3058+ <section>
3059+ <blockTable colWidths="794.0">
3060+ <tr>
3061+ <td><para style="CONTENIDOLEFT">LEYENDA. F:Factura, ND:Nota de Débito, NC:Nota de Crédito, E:Expediente</para></td>
3062+ </tr>
3063+ </blockTable>
3064+ </section>
3065+
3066+ <spacer length='5mm'/>
3067+
3068+ <!-- ************ TOTALS WHITHHOLDING***********-->
3069+
3070+ <section>
3071+ [[data['form']['type'] == 'sale' and '.' or removeParentNode('section')]]
3072+ <blockTable colWidths="70mm,40mm" style="TOTALS_TABLE" repeatRows="2">
3073+ <tr>
3074+ <td><para style="HEADER">[[data['form']['type'] == 'sale' and 'RESUMEN RETENCIONES' or removeParentNode('tr')]]</para></td>
3075+ <td><para style="HEADER">RET. DEBITO FISCAL</para></td>
3076+ </tr>
3077+ <tr>
3078+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'sale' and 'RETENCIONES PERIODOS ANTERIORES' or removeParentNode('tr')]]</para></td>
3079+ <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])-get_wh_actual(data['form'])) ]]</para></td>
3080+ </tr>
3081+ <tr>
3082+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'sale' and 'RETENCIONES DEL PERIODO' or removeParentNode('tr')]]</para></td>
3083+ <td><para style="CONTENIDO">[[ formatLang(get_wh_actual(data['form'])) ]]</para></td>
3084+ </tr>
3085+ <tr>
3086+ <td><para style="CONTENIDOLEFT_BOLD">[[data['form']['type'] == 'sale' and 'TOTAL RETENCIONES' or removeParentNode('tr')]]</para></td>
3087+ <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])) ]]</para></td>
3088+ </tr>
3089+ </blockTable>
3090+ </section>
3091+ <spacer length='5mm'/>
3092+
3093+ <!-- ************ TOTALS SALE/PURCHASE BOOK************-->
3094+
3095+ <section>
3096+ [[ setLang(l.ai_id.company_id.partner_id.lang) ]]
3097+ <blockTable colWidths="280.0,80.0,80.0" style="TOTALS_TABLE" repeatRows="2">
3098+ <tr>
3099+ <td><para style="HEADER">[[data['form']['type'] == 'purchase' and 'CREDITOS FISCALES' or 'DEBITOS FISCALES']]</para></td>
3100+ <td><para style="HEADER">BASE IMPONIBLE</para></td>
3101+ <td><para style="HEADER">[[data['form']['type'] == 'purchase' and 'CREDITO FISCAL' or 'DEBITO FISCAL']]</para></td>
3102+ </tr>
3103+ <tr>
3104+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL' or 'DEBITOS FISCALES']]</para></td>
3105+ <td><para style="CONTENIDO">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[0]+get_amount_untaxed_tax(data['form'],'SDCF')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO')[0]) ]]</para></td>
3106+ <td><para style="CONTENIDO">0.0</para></td>
3107+ </tr>
3108+ <tr>
3109+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACION GRAVADAS POR ALICUOTA GENERAL' or removeParentNode('tr')]]</para></td>
3110+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'12')[0])]]</para></td>
3111+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'12')[1])]]</para></td>
3112+ </tr>
3113+ <tr>
3114+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACIONES GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL' or removeParentNode('tr')]]</para></td>
3115+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'22')[0])]]</para></td>
3116+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'22')[1])]]</para></td>
3117+ </tr>
3118+ <tr>
3119+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACIONES GRAVADAS POR ALICUOTA REDUCIDA' or removeParentNode('tr')]]</para></td>
3120+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'8')[0])]]</para></td>
3121+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'8')[1])]]</para></td>
3122+ </tr>
3123+ <tr>
3124+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'sale' and 'VENTAS DE EXPORTACION' or removeParentNode('tr')]]</para></td>
3125+ <td><para style="CONTENIDO">0.0</para></td>
3126+ <td><para style="CONTENIDO">0.0</para></td>
3127+ </tr>
3128+ <tr>
3129+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS GRAVADAS POR ALICUOTA GENERAL' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL']]</para></td>
3130+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[0])]]</para></td>
3131+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[1])]]</para></td>
3132+ </tr>
3133+ <tr>
3134+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL']]</para></td>
3135+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[0])]]</para></td>
3136+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[1])]]</para></td>
3137+ </tr>
3138+ <tr>
3139+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA']]</para></td>
3140+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[0])]]</para></td>
3141+ <td><para style="CONTENIDO">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[1])]]</para></td>
3142+ </tr>
3143+ <tr>
3144+ <td><para style="CONTENIDOLEFT_BOLD">[[data['form']['type'] == 'purchase' and 'TOTAL COMPRAS Y CREDITOS FISCALES DEL PERIODO' or 'TOTAL VENTAS Y DEBITOS FISCAL PARA EFECTOS DE DETERMINACION']]</para></td>
3145+ <td><para style="CONTENIDO">
3146+[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0]+
3147+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[0]+
3148+get_amount_untaxed_tax(data['form'],'SDCF')[0]+
3149+get_amount_untaxed_tax(data['form'],'EXONERADO')[0]+
3150+get_amount_untaxed_tax(data['form'],'12')[0]+
3151+get_amount_untaxed_tax(data['form'],'22')[0]+
3152+get_amount_untaxed_tax(data['form'],'8')[0]+
3153+get_amount_untaxed_tax(data['form'],'12','nacional')[0]+
3154+get_amount_untaxed_tax(data['form'],'22','nacional')[0]+
3155+get_amount_untaxed_tax(data['form'],'8','nacional')[0])]]
3156+ </para></td>
3157+ <td><para style="CONTENIDO">
3158+[[formatLang(
3159+get_amount_untaxed_tax(data['form'],'12')[1]+
3160+get_amount_untaxed_tax(data['form'],'22')[1]+
3161+get_amount_untaxed_tax(data['form'],'8')[1]+
3162+get_amount_untaxed_tax(data['form'],'12','nacional')[1]+
3163+get_amount_untaxed_tax(data['form'],'22','nacional')[1]+
3164+get_amount_untaxed_tax(data['form'],'8','nacional')[1]
3165+)]]
3166+ </para></td>
3167+ </tr>
3168+ </blockTable>
3169+ </section>
3170+<nextPage/>
3171+
3172+ <spacer length='5mm'/>
3173+ <!-- ****************************************-->
3174+ <!-- ************ AJUSTMENT BOOK ************-->
3175+ <!-- ****************************************-->
3176+ <section>
3177+ <blockTable colWidths="795.0" style="HEADERTABLE_AD">
3178+ <tr><td><para></para></td></tr>
3179+ <tr><td><para></para></td></tr>
3180+ <tr>
3181+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3182+ <td><para style="TITULO_AJUSTE">LIBRO DE AJUSTES</para></td></tr>
3183+ <tr><td><para></para></td></tr>
3184+ </blockTable>
3185+ </section>
3186+
3187+
3188+ <section>
3189+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3190+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="ENCANBEZADO_SINCOLUM" repeatRows="2">
3191+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0",'style':'ENCANBEZADO', 'repeatRows':'2'}) or '']]
3192+ <tr>
3193+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3194+ <td></td><td></td><td></td>
3195+ <td></td><td></td><td></td>
3196+ <td></td><td></td><td></td>
3197+ <td></td>
3198+ <td>
3199+ <blockTable colWidths="110.0" style="INTERNALTABLE">
3200+ <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Nacionales</para></td></tr>
3201+ </blockTable>
3202+ </td>
3203+ <td>
3204+ <blockTable colWidths="110.0" style="INTERNALTABLE">
3205+ <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Internacionales</para></td></tr>
3206+ </blockTable>
3207+ </td>
3208+ <td></td><td></td>
3209+ </tr>
3210+ <tr>
3211+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3212+ <td><para style="HEADER">[[ (data['form']['type'] == 'purchase') and 'Fecha Adm.' or '' ]]</para></td>
3213+ <td><para style="HEADER">Fecha Cont.</para></td>
3214+ <td><para style="HEADER">RIF</para></td>
3215+ <td><para style="HEADER">Razon Social</para></td>
3216+ <td><para style="HEADER">Numero Doc.</para></td>
3217+ <td><para style="HEADER">Numero Control</para></td>
3218+ <td><para style="HEADER">Total con IVA</para></td>
3219+ <td><para style="HEADER">Tipo Doc.</para></td>
3220+ <td><para style="HEADER">Documento Afectado</para></td>
3221+ <td><para style="HEADER">Sin derecho a Credito Fiscal</para></td>
3222+ <td>
3223+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3224+ <tr>
3225+ <td><para style="HEADER">Base Imponible</para></td>
3226+ <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td>
3227+ <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td>
3228+ </tr>
3229+ </blockTable>
3230+ </td>
3231+ <td>
3232+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3233+ <tr>
3234+ <td><para style="HEADER">Base Imponible</para></td>
3235+ <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td>
3236+ <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td>
3237+ </tr>
3238+ </blockTable>
3239+ </td>
3240+ <td><para style="HEADER">Retencion IVA</para></td>
3241+ <td><para style="HEADER">Comprobante</para></td>
3242+ </tr>
3243+ </blockTable>
3244+ </section>
3245+
3246+ <section>
3247+ <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[1] or [],'a')]]</para>
3248+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2">
3249+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0",'style':'CONTENIDOTABLE_LINES_PUR', 'repeatRows':'2'}) or '']]
3250+ <tr>
3251+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3252+ [[ setLang(l.ai_id.company_id.partner_id.lang) ]]
3253+ <td><para style="CONTENIDO">[[ data['form']['type'] == 'purchase' and ( a.date_admin and formatLang(a.date_admin, date=True) or '') or '' ]]</para></td>
3254+ <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(a.date_accounting, '%Y-%m-%d'))]]</para></td>
3255+ <td><para style="CONTENIDO">[[ a.vat ]]</para></td>
3256+ <td><para style="CONTENIDOLEFT">[[ a.partner ]]</para></td>
3257+ <td><para style="CONTENIDO">[[ a.invoice_number ]]</para></td>
3258+ <td><para style="CONTENIDO">[[ a.control_number ]]</para></td>
3259+ <td><para style="CONTENIDO">[[ formatLang(a.amount) ]]</para></td>
3260+ <td><para style="CONTENIDO">[[ a.type_doc ]]</para></td>
3261+ <td><para style="CONTENIDO">[[ a.doc_affected ]]</para></td>
3262+ <td><para style="CONTENIDO">[[ a.uncredit_fiscal ]]</para></td>
3263+ <td>
3264+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3265+ <tr>
3266+ <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_n) ]]</para></td>
3267+ <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_n) ]]</para></td>
3268+ <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_n) ]]</para></td>
3269+ </tr>
3270+ </blockTable>
3271+ </td>
3272+ <td>
3273+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3274+ <tr>
3275+ <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_i) ]]</para></td>
3276+ <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_i) ]]</para></td>
3277+ <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_i) ]]</para></td>
3278+ </tr>
3279+ </blockTable>
3280+ </td>
3281+ <td><para style="CONTENIDO">[[ formatLang(a.amount_with_vat) ]]</para></td>
3282+ <td><para style="CONTENIDO">[[ a.voucher ]]</para></td>
3283+ </tr>
3284+ </blockTable>
3285+ </section>
3286+
3287+ <section>
3288+ <para>[[repeatIn( get_data_adjustment( data['form'] )[0],'al')]]</para>
3289+ <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2">
3290+ [[(data['form']['type'] == 'purchase') and setTag('blockTable','blockTable',{'colWidths':"33.0,33.0,37.0,145.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0",'style':'CONTENIDOTABLE_LINES_PUR', 'repeatRows':'2'}) or '']]
3291+ <tr>
3292+ <para>
3293+ [[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3294+ [[ setLang(company.partner_id.lang) ]]
3295+ <td></td><td></td><td></td>
3296+ <td></td><td></td><td></td>
3297+ <td><para style="CONTENIDOINT">[[ formatLang(al.amount_total) ]]</para></td>
3298+ <td></td><td></td>
3299+ <td><para style="CONTENIDOINT">[[ formatLang(al.uncredit_fiscal_total) ]]</para></td>
3300+ <td>
3301+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3302+ <tr>
3303+ <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_n_total) ]]</para></td>
3304+ <td></td>
3305+ <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_n_total) ]]</para></td>
3306+ </tr>
3307+ </blockTable>
3308+ </td>
3309+ <td>
3310+ <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE">
3311+ <tr>
3312+ <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_i_total) ]]</para></td>
3313+ <td></td>
3314+ <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_i_total) ]]</para></td>
3315+ </tr>
3316+ </blockTable>
3317+ </td>
3318+ <td><para style="CONTENIDO">[[ formatLang(al.amount_with_vat_total) ]]</para></td>
3319+ <td></td>
3320+ </tr>
3321+ </blockTable>
3322+ </section>
3323+
3324+
3325+ <spacer length='5mm'/>
3326+ <!-- ************ TOTALES ADJUSTMENT BOOK************-->
3327+ <section>
3328+ <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[0] or [],'to')]]</para>
3329+ <blockTable colWidths="280.0,80.0,80.0" style="TOTALS_TABLE" repeatRows="2">
3330+ <tr>
3331+ <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para>
3332+ <td><para style="HEADER">CREDITOS FISCALES</para></td>
3333+ <td><para style="HEADER">BASE IMPONIBLE</para></td>
3334+ <td><para style="HEADER">CREDITO FISCAL</para></td>
3335+ </tr>
3336+ <tr>
3337+ <td><para style="CONTENIDOLEFT">[[ data['form']['type'] == 'purchase' and 'COMPRAS NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL' or 'VENTAS INTERNAS NO GRAVADAS']]</para></td>
3338+ <td><para style="CONTENIDO">[[formatLang(to.no_grav)]]</para></td>
3339+ <td><para style="CONTENIDO">0.00</para></td>
3340+ </tr>
3341+ <tr>
3342+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACION GRAVADAS POR ALICUOTA GENERAL' or removeParentNode('tr')]]</para></td>
3343+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_i)]]</para></td>
3344+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_icf)]]</para></td>
3345+ </tr>
3346+ <tr>
3347+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACIONES GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL' or removeParentNode('tr')]]</para></td>
3348+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_i)]]</para></td>
3349+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_icf)]]</para></td>
3350+ </tr>
3351+ <tr>
3352+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'IMPORTACIONES GRAVADAS POR ALICUOTA REDUCIDA' or removeParentNode('tr')]]</para></td>
3353+ <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_i)]]</para></td>
3354+ <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_icf)]]</para></td>
3355+ </tr>
3356+ <tr>
3357+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS GRAVADAS POR ALICUOTA GENERAL' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL']]</para></td>
3358+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_n)]]</para></td>
3359+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_ncf)]]</para></td>
3360+ </tr>
3361+ <tr>
3362+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL']]</para></td>
3363+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_n)]]</para></td>
3364+ <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_ncf)]]</para></td>
3365+ </tr>
3366+ <tr>
3367+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'COMPRAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA' or 'VENTAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA']]</para></td>
3368+ <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_n)]]</para></td>
3369+ <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_ncf)]]</para></td>
3370+ </tr>
3371+ <tr>
3372+ <td><para style="CONTENIDOLEFT">[[data['form']['type'] == 'purchase' and 'AJUSTES A LOS CREDITOS FISCALES DE LOS PERIODOS ANTERIORES' or 'AJUSTES A LOS DEBITOS FISCALES DE LOS PERIODOS ANTERIORES']]</para></td>
3373+ <td><para style="CONTENIDO">0.0</para></td>
3374+ <td><para style="CONTENIDO">[[formatLang(to.adjustment_cf)]]</para></td>
3375+ </tr>
3376+ <tr>
3377+ <td><para style="CONTENIDOLEFT_BOLD">TOTAL COMPRAS Y CREDITOS FISCALES DEL PERIODO</para></td>
3378+ <td><para style="CONTENIDO">[[formatLang(to.amount_base_total)]]</para></td>
3379+ <td><para style="CONTENIDO">[[formatLang(to.amount_percent_total)]]</para></td>
3380+ </tr>
3381+ </blockTable>
3382+ </section>
3383+
3384+ <spacer length='5mm'/>
3385+ <!-- ************ OBSERVACIONES ADJUSTMENT BOOK************-->
3386+ <section>
3387+ <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[0] or [],'ob')]]</para>
3388+ <blockTable colWidths="794.0" style="CONTENIDOTABLE_LINES_PUR">
3389+ <tr>
3390+ <td><para style="OBSERVACIONES">[[ob.note and 'OBSERVACIONES:' or removeParentNode('para')]]</para></td>
3391+ </tr>
3392+ <tr>
3393+ <td><para style="OBSERVACIONES">[[ ob.note and ob.note or removeParentNode('para') ]]</para></td>
3394+ </tr>
3395+ </blockTable>
3396+ </section>
3397+
3398+
3399+ </story>
3400+</document>
3401+
3402+
3403+
3404+
3405+
3406+
3407+
3408+
3409+
3410+
3411+
3412
3413=== added directory 'l10n_ve_fiscal_reports/report/sources'
3414=== added file 'l10n_ve_fiscal_reports/report/sources/book_seniat.sxw'
3415Binary files l10n_ve_fiscal_reports/report/sources/book_seniat.sxw 1970-01-01 00:00:00 +0000 and l10n_ve_fiscal_reports/report/sources/book_seniat.sxw 2011-12-29 18:55:26 +0000 differ
3416=== added file 'l10n_ve_fiscal_reports/report/sources/book_seniatN.sxw'
3417Binary files l10n_ve_fiscal_reports/report/sources/book_seniatN.sxw 1970-01-01 00:00:00 +0000 and l10n_ve_fiscal_reports/report/sources/book_seniatN.sxw 2011-12-29 18:55:26 +0000 differ
3418=== added file 'l10n_ve_fiscal_reports/report/sources/witholding_book.rml'
3419--- l10n_ve_fiscal_reports/report/sources/witholding_book.rml 1970-01-01 00:00:00 +0000
3420+++ l10n_ve_fiscal_reports/report/sources/witholding_book.rml 2011-12-29 18:55:26 +0000
3421@@ -0,0 +1,246 @@
3422+<?xml version="1.0"?>
3423+<document filename="test.pdf">
3424+ <template pageSize="(792.0,612.0)" title="Test" author="Martin Simon" allowSplitting="20">
3425+ <pageTemplate id="first">
3426+ <frame id="first" x1="31.0" y1="31.0" width="730" height="553"/>
3427+ </pageTemplate>
3428+ </template>
3429+ <stylesheet>
3430+ <blockTableStyle id="Standard_Outline">
3431+ <blockAlignment value="LEFT"/>
3432+ <blockValign value="TOP"/>
3433+ </blockTableStyle>
3434+ <blockTableStyle id="Tabla1">
3435+ <blockAlignment value="LEFT"/>
3436+ <blockValign value="TOP"/>
3437+ </blockTableStyle>
3438+ <blockTableStyle id="Tabla3">
3439+ <blockAlignment value="LEFT"/>
3440+ <blockValign value="TOP"/>
3441+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
3442+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
3443+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
3444+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3445+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
3446+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3447+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
3448+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
3449+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
3450+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
3451+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
3452+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
3453+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
3454+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
3455+ <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
3456+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
3457+ <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
3458+ <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
3459+ <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
3460+ <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
3461+ <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
3462+ <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
3463+ <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
3464+ <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/>
3465+ <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
3466+ <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/>
3467+ </blockTableStyle>
3468+ <blockTableStyle id="Tabla4">
3469+ <blockAlignment value="LEFT"/>
3470+ <blockValign value="TOP"/>
3471+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
3472+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
3473+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
3474+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
3475+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
3476+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3477+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
3478+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
3479+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3480+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
3481+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
3482+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
3483+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
3484+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
3485+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
3486+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
3487+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
3488+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
3489+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="6,0" stop="6,-1"/>
3490+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
3491+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
3492+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="7,0" stop="7,-1"/>
3493+ <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
3494+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
3495+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="8,0" stop="8,-1"/>
3496+ <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
3497+ <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
3498+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="9,0" stop="9,-1"/>
3499+ <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
3500+ <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
3501+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="10,0" stop="10,-1"/>
3502+ <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
3503+ <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
3504+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="11,0" stop="11,-1"/>
3505+ <lineStyle kind="LINEAFTER" colorName="#000000" start="11,0" stop="11,-1"/>
3506+ <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
3507+ <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/>
3508+ </blockTableStyle>
3509+ <blockTableStyle id="Tabla2">
3510+ <blockAlignment value="LEFT"/>
3511+ <blockValign value="TOP"/>
3512+ </blockTableStyle>
3513+ <initialize>
3514+ <paraStyle name="all" alignment="justify"/>
3515+ </initialize>
3516+ <paraStyle name="P1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3517+ <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/>
3518+ <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10"/>
3519+ <paraStyle name="P4" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/>
3520+ <paraStyle name="P5" fontName="Helvetica" fontSize="2.0" leading="3"/>
3521+ <paraStyle name="P6" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT"/>
3522+ <paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="10"/>
3523+ <paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10"/>
3524+ <paraStyle name="P9" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT"/>
3525+ <paraStyle name="P10" fontName="Helvetica" fontSize="2.0" leading="3" alignment="CENTER"/>
3526+ <paraStyle name="P11" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
3527+ <paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/>
3528+ <paraStyle name="P13" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT"/>
3529+ <paraStyle name="Standard" fontName="Times-Roman"/>
3530+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
3531+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
3532+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
3533+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
3534+ <paraStyle name="Index" fontName="Times-Roman"/>
3535+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
3536+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3537+ <paraStyle name="Table Contents" fontName="Times-Roman" fontSize="8.0" leading="10"/>
3538+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3539+ <paraStyle name="Table Heading" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
3540+ </stylesheet>
3541+ <images/>
3542+ <story>
3543+ <section>
3544+ <para style="P13">WITHOLDING BOOK</para>
3545+ <blockTable colWidths="365.0,365.0" style="Tabla1">
3546+ <tr>
3547+ <td>
3548+ <para style="P6">[[ company.partner_id.name ]] [[ get_rif( company.partner_id.vat ) ]]</para>
3549+ <para style="P11">[[ get_partner_addr( company.partner_id.id ) ]]</para>
3550+ </td>
3551+ <td>
3552+ <para style="P12">Month: [[ get_month( data['form'] ) ]]</para>
3553+ <para style="P11">From : [[ time.strftime('%d/%m/%Y', time.strptime(get_dates( data['form'] )[0], '%Y-%m-%d')) ]]</para>
3554+ <para style="P11">To: [[ time.strftime('%d/%m/%Y', time.strptime(get_dates( data['form'] )[1], '%Y-%m-%d')) ]]</para>
3555+ </td>
3556+ </tr>
3557+ </blockTable>
3558+ <para style="P10">
3559+ <font color="white"> </font>
3560+ </para>
3561+ </section>
3562+ <blockTable colWidths="49.0,54.0,168.0,75.0,36.0,48.0,49.0,49.0,42.0,42.0,34.0,41.0,41.0" style="Tabla3">
3563+ <tr>
3564+ <td>
3565+ <para style="P4">Date</para>
3566+ </td>
3567+ <td>
3568+ <para style="P4">R.I.F.</para>
3569+ </td>
3570+ <td>
3571+ <para style="P4">Company Name</para>
3572+ </td>
3573+ <td>
3574+ <para style="P4">Voucher</para>
3575+ </td>
3576+ <td>
3577+ <para style="P4">Fiscal Period</para>
3578+ </td>
3579+ <td>
3580+ <para style="P4">Affected Invoice</para>
3581+ </td>
3582+ <td>
3583+ <para style="P4">Total Sales</para>
3584+ </td>
3585+ <td>
3586+ <para style="P4">Exempt Sales</para>
3587+ </td>
3588+ <td>
3589+ <para style="P4">Tax</para>
3590+ </td>
3591+ <td>
3592+ <para style="P4">Retention Amount</para>
3593+ </td>
3594+ <td>
3595+ <para style="P4">% Ret</para>
3596+ </td>
3597+ <td>
3598+ <para style="P4">Base Ret.</para>
3599+ </td>
3600+ <td>
3601+ <para style="P4">% VAT.</para>
3602+ </td>
3603+ </tr>
3604+ </blockTable>
3605+ <section>
3606+ <para style="P1">[[repeatIn( get_data( data['form'] ),'l')]]</para>
3607+ <para style="P1">[[ setLang(l.ai_id.company_id.partner_id.lang) ]]</para>
3608+ <blockTable colWidths="49.0,54.0,168.0,75.0,37.0,48.0,49.0,49.0,42.0,42.0,34.0,81.0" style="Tabla4">
3609+ <tr>
3610+ <td>
3611+ <para style="P2">[[ time.strftime('%d/%m/%Y', time.strptime(l.ar_date_ret, '%Y-%m-%d')) ]]</para>
3612+ </td>
3613+ <td>
3614+ <para style="P2">[[ get_rif( l.rp_vat) ]]</para>
3615+ </td>
3616+ <td>
3617+ <para style="P2">[[ l.rp_id.name ]]</para>
3618+ </td>
3619+ <td>
3620+ <para style="P2">[[ l.ar_number ]]</para>
3621+ </td>
3622+ <td>
3623+ <para style="P2">[[ l.ar_number.replace("-","")[0:6] ]]</para>
3624+ </td>
3625+ <td>
3626+ <para style="P2">[[ l.ai_reference ]]</para>
3627+ </td>
3628+ <td>
3629+ <para style="P3">[[ formatLang(l.ai_amount_total) ]]</para>
3630+ </td>
3631+ <td>
3632+ <para style="P3">[[ get_exc(l.ar_line_id) ]]</para>
3633+ </td>
3634+ <td>
3635+ <para style="P7">[[ formatLang(l.ar_line_id.base_ret) ]]</para>
3636+ </td>
3637+ <td>
3638+ <para style="P7">[[ formatLang(l.ar_id.total_tax_ret) ]]</para>
3639+ </td>
3640+ <td>
3641+ <para style="P7">[[ formatLang(l.ar_line_id.retention_rate) ]]</para>
3642+ </td>
3643+ <td>
3644+ <para style="P5">[[ repeatIn( l.ar_line_id.tax_line,'t' ) ]]</para>
3645+ <blockTable colWidths="40.0,41.0" style="Tabla2">
3646+ <tr>
3647+ <td>
3648+ <para style="P8">[[ formatLang(t.base_ret) ]]</para>
3649+ </td>
3650+ <td>
3651+ <para style="P8">[[ formatLang(t.tax_amount) ]]</para>
3652+ </td>
3653+ </tr>
3654+ </blockTable>
3655+ <para style="P5">
3656+ <font color="white"> </font>
3657+ </para>
3658+ </td>
3659+ </tr>
3660+ </blockTable>
3661+ </section>
3662+ <para style="P9">
3663+ <font color="white"> </font>
3664+ </para>
3665+ </story>
3666+</document>
3667+
3668
3669=== added file 'l10n_ve_fiscal_reports/report/sources/witholding_book.sxw'
3670Binary files l10n_ve_fiscal_reports/report/sources/witholding_book.sxw 1970-01-01 00:00:00 +0000 and l10n_ve_fiscal_reports/report/sources/witholding_book.sxw 2011-12-29 18:55:26 +0000 differ
3671=== added file 'l10n_ve_fiscal_reports/report/sources/witholding_book_bad.sxw'
3672Binary files l10n_ve_fiscal_reports/report/sources/witholding_book_bad.sxw 1970-01-01 00:00:00 +0000 and l10n_ve_fiscal_reports/report/sources/witholding_book_bad.sxw 2011-12-29 18:55:26 +0000 differ
3673=== added file 'l10n_ve_fiscal_reports/report/sources/witholding_book_cas.sxw'
3674Binary files l10n_ve_fiscal_reports/report/sources/witholding_book_cas.sxw 1970-01-01 00:00:00 +0000 and l10n_ve_fiscal_reports/report/sources/witholding_book_cas.sxw 2011-12-29 18:55:26 +0000 differ
3675=== added directory 'l10n_ve_fiscal_reports/report/tiny_sxw2rml'
3676=== added file 'l10n_ve_fiscal_reports/report/tiny_sxw2rml/__init__.py'
3677--- l10n_ve_fiscal_reports/report/tiny_sxw2rml/__init__.py 1970-01-01 00:00:00 +0000
3678+++ l10n_ve_fiscal_reports/report/tiny_sxw2rml/__init__.py 2011-12-29 18:55:26 +0000
3679@@ -0,0 +1,25 @@
3680+# -*- encoding: utf-8 -*-
3681+##############################################################################
3682+#
3683+# OpenERP, Open Source Management Solution
3684+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
3685+# $Id$
3686+#
3687+# This program is free software: you can redistribute it and/or modify
3688+# it under the terms of the GNU General Public License as published by
3689+# the Free Software Foundation, either version 3 of the License, or
3690+# (at your option) any later version.
3691+#
3692+# This program is distributed in the hope that it will be useful,
3693+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3694+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3695+# GNU General Public License for more details.
3696+#
3697+# You should have received a copy of the GNU General Public License
3698+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3699+#
3700+##############################################################################
3701+
3702+from tiny_sxw2rml import sxw2rml
3703+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3704+
3705
3706=== added file 'l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_odt2rml.xsl'
3707--- l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_odt2rml.xsl 1970-01-01 00:00:00 +0000
3708+++ l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_odt2rml.xsl 2011-12-29 18:55:26 +0000
3709@@ -0,0 +1,696 @@
3710+<?xml version="1.0" encoding="utf-8"?>
3711+<xsl:stylesheet
3712+ version="1.0"
3713+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3714+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
3715+ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
3716+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
3717+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
3718+ xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
3719+ xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
3720+ xmlns:xlink="http://www.w3.org/1999/xlink"
3721+ xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
3722+ xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
3723+ xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
3724+ xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
3725+ xmlns:math="http://www.w3.org/1998/Math/MathML"
3726+ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
3727+ xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
3728+ office:class="text" office:version="1.1"
3729+ exclude-result-prefixes = "xsl fo office style text table draw xlink number svg chart dr3d math form script">
3730+
3731+ <!--TODO's: indent, picture cache (trml2pdf) -->
3732+
3733+<xsl:output method="xml" indent="yes" />
3734+<xsl:strip-space elements="*"/>
3735+
3736+<xsl:key name="text_style" match="style:style[@style:family='text']" use="@style:name" />
3737+<xsl:key name="page_break_before" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-before='page']" use="@style:name" />
3738+<xsl:key name="page_break_after" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-after='page']" use="@style:name" />
3739+<xsl:key name="table_column_style" match="style:style[@style:family='table-column']" use="@style:name" />
3740+<xsl:key name="table_cell_style" match="style:style[@style:family='table-cell']" use="@style:name" />
3741+<xsl:key name="paragraph_style" match="style:style[@style:family='paragraph']" use="@style:name" />
3742+
3743+<xsl:template match="office:document-content">
3744+ <document filename="test.pdf">
3745+ <xsl:apply-templates select="office:automatic-styles" />
3746+ <xsl:apply-templates select="office:body" />
3747+ </document>
3748+</xsl:template>
3749+
3750+<xsl:template name="page_size">
3751+ <xsl:attribute name="pageSize">
3752+ <xsl:text>(</xsl:text>
3753+ <xsl:value-of select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-width" />
3754+ <xsl:text>,</xsl:text>
3755+ <xsl:value-of select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-height" />
3756+ <xsl:text>)</xsl:text>
3757+ </xsl:attribute>
3758+</xsl:template>
3759+
3760+<xsl:template name="fixed_frame">
3761+ <xsl:for-each select="//draw:text-box">
3762+ <frame>
3763+ <xsl:attribute name="id"><xsl:value-of select="./@draw:name" /></xsl:attribute>
3764+ <xsl:attribute name="x1"><xsl:value-of select="./@svg:x" /></xsl:attribute>
3765+ <xsl:attribute name="y1">
3766+ <xsl:value-of
3767+ select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-height - ./@svg:y - ./@fo:min-height" />
3768+ </xsl:attribute>
3769+ <xsl:attribute name="width">
3770+ <xsl:value-of select="./@svg:width" />
3771+ </xsl:attribute>
3772+ <xsl:attribute name="height">
3773+ <xsl:value-of select="./@fo:min-height" />
3774+ </xsl:attribute>
3775+ </frame>
3776+ </xsl:for-each>
3777+</xsl:template>
3778+
3779+<xsl:template name="margin_sizes">
3780+ <xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-left" />
3781+ <xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-right" />
3782+ <xsl:variable name="margin_top" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-top" />
3783+ <xsl:variable name="margin_bottom" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-bottom" />
3784+ <xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-width" />
3785+ <xsl:variable name="page_height" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-height" />
3786+ <xsl:attribute name="x1"><xsl:value-of select="$margin_left" /></xsl:attribute>
3787+ <xsl:attribute name="y1"><xsl:value-of select="$margin_bottom" /></xsl:attribute>
3788+ <xsl:attribute name="width"><xsl:value-of select="$page_width - $margin_left - $margin_right"/></xsl:attribute>
3789+ <xsl:attribute name="height"><xsl:value-of select="$page_height - $margin_bottom - $margin_top"/></xsl:attribute>
3790+</xsl:template>
3791+
3792+<xsl:template name="text_width">
3793+ <!-- You need this for the workaround to make primitive outlines-->
3794+ <xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-left" />
3795+ <xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:margin-right" />
3796+ <xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-layout[1]/style:page-layout-properties/@fo:page-width" />
3797+ <xsl:value-of select="$page_width - $margin_left - $margin_right - 18"/>
3798+</xsl:template>
3799+
3800+
3801+
3802+<xsl:template match="office:automatic-styles">
3803+ <!--<template pageSize="(21cm, 29.7cm)" leftMargin="1.0cm" rightMargin="2.0cm" topMargin="1.0cm" bottomMargin="1.0cm" title="Test" author="Martin Simon" allowSplitting="20">-->
3804+ <template pageSize="(21cm, 29.7cm)" title="Test" author="Martin Simon" allowSplitting="20">
3805+ <xsl:call-template name="page_size" />
3806+ <pageTemplate id="first">
3807+ <xsl:call-template name="fixed_frame" />
3808+ <frame id="first" x1="2cm" y1="2cm" width="17cm" height="26cm">
3809+ <xsl:call-template name="margin_sizes" />
3810+ </frame>
3811+ </pageTemplate>
3812+ </template>
3813+ <stylesheet>
3814+ <!--A table style to simulate primitive outlines -till the <addOutline> tag is implemented in trml2pdf -->
3815+ <blockTableStyle id="Standard_Outline">
3816+ <blockAlignment value="LEFT"/>
3817+ <blockValign value="TOP"/>
3818+ </blockTableStyle>
3819+ <!--use two standard table grid styles like PyOpenOffice "Old Way": with and without a grid-->
3820+ <!--TODO insert table cell colors here, not within the <td> tag - otherwise
3821+ it will not work with flowables as cell content-->
3822+ <xsl:call-template name="make_blocktablestyle" />
3823+ <initialize>
3824+ <paraStyle name="all" alignment="justify" />
3825+ </initialize>
3826+ <xsl:apply-templates select="style:style" />
3827+ </stylesheet>
3828+</xsl:template>
3829+
3830+<xsl:template name="make_blocktablestyle">
3831+ <xsl:for-each select="//table:table">
3832+ <xsl:variable name="test">
3833+ <xsl:value-of select="./@table:name" />
3834+ </xsl:variable>
3835+ <xsl:if test="not(boolean(count(preceding-sibling::table:table[@table:name=$test])))">
3836+ <!--Test if this is the first table with this style, nested tables not counted-->
3837+ <blockTableStyle id="{@table:name}">
3838+ <xsl:if test=".//draw:image">
3839+ <blockTopPadding value="0"/>
3840+ <blockBottomPadding value="0"/>
3841+ </xsl:if>
3842+ <blockAlignment value="LEFT" />
3843+ <blockValign value="TOP" />
3844+ <xsl:call-template name="make_linestyle" />
3845+ <xsl:call-template name="make_tablebackground" />
3846+ </blockTableStyle>
3847+ </xsl:if>
3848+ </xsl:for-each>
3849+</xsl:template>
3850+
3851+<xsl:template name="make_linestyle">
3852+ <xsl:for-each select=".//table:table-row">
3853+ <xsl:variable name="row" select="position() - 1"/>
3854+ <xsl:for-each select=".//table:table-cell">
3855+ <xsl:variable name="col" select="position() - 1"/>
3856+ <xsl:variable name="linebefore">
3857+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-left"/>
3858+ </xsl:variable>
3859+ <xsl:if test="not($linebefore='') and not($linebefore='none')">
3860+ <xsl:variable name="colorname">
3861+ <xsl:value-of select="substring-after($linebefore,'#')"/>
3862+ </xsl:variable>
3863+ <lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
3864+ </xsl:if>
3865+ <xsl:variable name="lineafter">
3866+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-right"/>
3867+ </xsl:variable>
3868+ <xsl:if test="not($lineafter='') and not($lineafter='none')">
3869+ <xsl:variable name="colorname">
3870+ <xsl:value-of select="substring-after($lineafter,'#')"/>
3871+ </xsl:variable>
3872+ <lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
3873+ </xsl:if>
3874+ <xsl:variable name="lineabove">
3875+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-top"/>
3876+ </xsl:variable>
3877+ <xsl:if test="not($lineabove='') and not($lineabove='none')">
3878+ <xsl:variable name="colorname">
3879+ <xsl:value-of select="substring-after($lineabove,'#')"/>
3880+ </xsl:variable>
3881+ <lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
3882+ </xsl:if>
3883+ <xsl:variable name="linebelow">
3884+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-bottom"/>
3885+ </xsl:variable>
3886+ <xsl:if test="not($linebelow='') and not($linebelow='none')">
3887+ <xsl:variable name="colorname">
3888+ <xsl:value-of select="substring-after($linebelow,'#')"/>
3889+ </xsl:variable>
3890+ <lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
3891+ </xsl:if>
3892+ <xsl:variable name="grid">
3893+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border"/>
3894+ </xsl:variable>
3895+ <xsl:if test="not($grid='') and not($grid='none')">
3896+ <xsl:variable name="colorname">
3897+ <xsl:value-of select="substring-after($grid,'#')"/>
3898+ </xsl:variable>
3899+ <!-- Don't use grid because we don't need a line between each rows -->
3900+ <lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
3901+ <lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
3902+ <lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
3903+ <lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
3904+ </xsl:if>
3905+ </xsl:for-each>
3906+ </xsl:for-each>
3907+</xsl:template>
3908+
3909+<!-- Was needed to simulate bulleted lists:
3910+<xsl:template match="text:ordered-list|text:unordered-list">
3911+ <xsl:variable name = "text_width">
3912+ <xsl:call-template name="text_width" />
3913+ </xsl:variable>
3914+ <blockTable style="Standard_Outline" colWidths="18,{$text_width}">
3915+ <xsl:apply-templates match="text:list-item" />
3916+</blockTable>
3917+</xsl:template>
3918+
3919+<xsl:template match="text:list-item">
3920+ <tr>
3921+ <td><para><font face="Helvetica-Bold" size="10">*</font></para></td>
3922+ <td>
3923+ <xsl:apply-templates />
3924+ </td>
3925+ </tr>
3926+</xsl:template>
3927+
3928+-->
3929+
3930+
3931+<xsl:template match="office:body">
3932+ <story>
3933+ <xsl:apply-templates />
3934+ <xsl:for-each select="//draw:text-box">
3935+ <currentFrame>
3936+ <xsl:attribute name="name">
3937+ <xsl:value-of select="./@draw:name" />
3938+ </xsl:attribute>
3939+ </currentFrame>
3940+ <xsl:apply-templates>
3941+ <xsl:with-param name="skip_draw" select="0" />
3942+ </xsl:apply-templates>
3943+ <frameEnd />
3944+ </xsl:for-each>
3945+ <xsl:for-each select="//text:ordered-list">
3946+ <para><seqReset id="{./@text:style-name}"/></para>
3947+ </xsl:for-each>
3948+ </story>
3949+</xsl:template>
3950+
3951+<xsl:template match="table:table">
3952+ <blockTable>
3953+ <xsl:attribute name="colWidths">
3954+ <xsl:call-template name="make_columns" />
3955+ </xsl:attribute>
3956+ <xsl:call-template name="make_tableheaders" />
3957+ <xsl:attribute name="style">
3958+ <xsl:value-of select="@table:name" />
3959+ </xsl:attribute>
3960+ <xsl:apply-templates />
3961+ </blockTable>
3962+</xsl:template>
3963+
3964+<xsl:template name="make_tableheaders">
3965+ <xsl:if test="boolean(count(table:table-header-rows))">
3966+ <xsl:attribute name="repeatRows">1</xsl:attribute>
3967+ </xsl:if>
3968+</xsl:template>
3969+
3970+<xsl:template name="make_tablebackground">
3971+ <xsl:for-each select=".//table:table-row">
3972+ <!--Be careful when there are table:table-header-rows as
3973+ parent node of table:table-row -->
3974+ <xsl:variable name="row" select="position() - 1" />
3975+ <xsl:for-each select="./table:table-cell">
3976+ <xsl:variable name="col" select="position() - 1" />
3977+ <xsl:variable name="background">
3978+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:background-color" />
3979+ </xsl:variable>
3980+ <xsl:if test="not($background='') and boolean(key('table_cell_style',@table:style-name)/style:properties/@fo:background-color) and starts-with($background,'#')">
3981+ <!--only RGB hexcolors are accepted -->
3982+ <blockBackground colorName="{$background}" start="{$col},{$row}" stop="{$col},-1" />
3983+ </xsl:if>
3984+ </xsl:for-each>
3985+ </xsl:for-each>
3986+</xsl:template>
3987+
3988+<xsl:template name="make_columns">
3989+ <xsl:variable name="columns" >
3990+ <xsl:for-each select="table:table-column">
3991+ <xsl:value-of select="key('table_column_style',@table:style-name)/style:properties/@style:column-width" />
3992+ <xsl:text>,</xsl:text>
3993+ </xsl:for-each>
3994+ </xsl:variable>
3995+ <xsl:value-of select="substring($columns,1,string-length($columns) - 1)" />
3996+ <!--strip the last comma-->
3997+</xsl:template>
3998+
3999+<xsl:template match="table:table-row">
4000+ <tr>
4001+ <xsl:apply-templates />
4002+ </tr>
4003+</xsl:template>
4004+
4005+<xsl:template match="table:table-cell">
4006+ <td>
4007+ <xsl:apply-templates />
4008+ </td>
4009+</xsl:template>
4010+
4011+<xsl:template match="text:section">
4012+ <section>
4013+ <xsl:apply-templates />
4014+ </section>
4015+</xsl:template>
4016+
4017+
4018+<xsl:template match="text:span">
4019+ <font>
4020+ <xsl:call-template name="make_fontnames_span" />
4021+ <xsl:call-template name="make_fontsize_span" />
4022+ <xsl:apply-templates />
4023+ </font>
4024+</xsl:template>
4025+
4026+<xsl:template name="make_fontsize_span">
4027+ <xsl:variable name ="fontsize">
4028+ <xsl:value-of select="key('text_style',@text:style-name)/style:properties/@fo:font-size" />
4029+ </xsl:variable>
4030+ <xsl:if test="not($fontsize='') and boolean(key('text_style',@text:style-name)/style:properties/@fo:font-size)" >
4031+ <xsl:attribute name="size">
4032+ <xsl:value-of select="$fontsize" />
4033+ </xsl:attribute>
4034+ </xsl:if>
4035+</xsl:template>
4036+
4037+<xsl:template name="make_fontnames_span">
4038+ <xsl:attribute name="face">
4039+ <xsl:call-template name="make_fontnames">
4040+ <xsl:with-param name="fontName" select="key('text_style',@text:style-name)/style:properties/@style:font-name" />
4041+ <xsl:with-param name="fontWeight" select="key('text_style',@text:style-name)/style:properties/@fo:font-weight" />
4042+ <xsl:with-param name="fontStyle" select="key('text_style',@text:style-name)/style:properties/@fo:font-style" />
4043+ </xsl:call-template>
4044+ </xsl:attribute>
4045+</xsl:template>
4046+
4047+<xsl:template name="make_image">
4048+ <illustration height="{.//draw:frame/@svg:height}" width="{.//draw:frame/@svg:width}">
4049+ <image x="0" y="0" file="{substring-after(.//draw:image/@xlink:href,'Pictures/')}" height="{.//draw:frame/@svg:height}" width="{.//draw:frame/@svg:width}" />
4050+ </illustration>
4051+</xsl:template>
4052+
4053+<xsl:template name="empty_paragraph">
4054+ <xsl:if test="not(boolean(count(descendant::node())))">
4055+ <xsl:call-template name="distance_point">
4056+ <xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
4057+ </xsl:call-template>
4058+ </xsl:if>
4059+</xsl:template>
4060+
4061+<xsl:template name="distance_point">
4062+ <xsl:param name="background" />
4063+ <xsl:param name="tab_stop"></xsl:param>
4064+ <xsl:variable name="local_back">
4065+ <xsl:choose>
4066+ <xsl:when test="not(boolean($background)) or not(contains($background,'#'))">
4067+ <!-- Do not accept OO colors like "transparent", only hex-colors -->
4068+ <xsl:text>white</xsl:text>
4069+ </xsl:when>
4070+ <xsl:otherwise>
4071+ <xsl:value-of select="$background" />
4072+ </xsl:otherwise>
4073+ </xsl:choose>
4074+ </xsl:variable>
4075+ <font color="{$local_back}">
4076+ <xsl:text> </xsl:text>
4077+ <xsl:if test="boolean($tab_stop)">
4078+ <!-- simulate a tabstop with white/background-color points -->
4079+ <xsl:text>.........</xsl:text>
4080+ </xsl:if>
4081+ </font>
4082+</xsl:template>
4083+
4084+<xsl:template match="text:ordered-list">
4085+ <xsl:apply-templates />
4086+
4087+ <!-- Reset the counter. seqreset is not a trml2pdf tag, but a Platypus Intra Paragraph Markup,
4088+ so it needs a dummy paragraph to enclose it -->
4089+</xsl:template>
4090+
4091+<xsl:template name="make_listitem">
4092+ <xsl:if test="(name(..)='text:list-item')">
4093+ <xsl:attribute name="leftIndent">15</xsl:attribute>
4094+ <xsl:attribute name="bulletIndent">0</xsl:attribute>
4095+ <xsl:choose>
4096+ <xsl:when test="(name(../..)='text:unordered-list')">
4097+ <xsl:variable name="fontsize">
4098+ <xsl:value-of select="number(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)" />
4099+ </xsl:variable>
4100+ <xsl:choose>
4101+ <xsl:when test="$fontsize='NaN'">
4102+ <!-- you should exclude non-numerical values for bulletFontSize. <== Sometimes the preprocessing went wrong.-->
4103+ <!--use a default bullet font size-->
4104+ <xsl:attribute name="bulletFontSize">6</xsl:attribute>
4105+ </xsl:when>
4106+ <xsl:otherwise>
4107+ <xsl:attribute name="bulletFontSize"><xsl:value-of select="floor(($fontsize div 2) + 1)" /></xsl:attribute>
4108+ </xsl:otherwise>
4109+ </xsl:choose>
4110+ <xsl:attribute name="bulletFontName">ZapfDingbats</xsl:attribute>
4111+ <xsl:attribute name="bulletText">l</xsl:attribute>
4112+ </xsl:when>
4113+ <xsl:otherwise>
4114+ <!-- Generate the numbers for an ordered list -->
4115+ <xsl:variable name="size">
4116+ <xsl:value-of select="key('paragraph_style',@text:style-name)/style:properties/@fo:font-size" />
4117+ </xsl:variable>
4118+ <!-- For ordered lists we use the bullet tag from Platypus Intra Paragraph Markup -->
4119+ <bullet>
4120+ <xsl:if test="not($size='') and boolean(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)">
4121+ <xsl:attribute name="size">
4122+ <!-- adapt the fontsize to the fontsize of the current paragraph -->
4123+ <xsl:value-of select="$size" />
4124+ </xsl:attribute>
4125+ </xsl:if>
4126+ <seq id="{../../@text:style-name}"/>.</bullet>
4127+ </xsl:otherwise>
4128+ </xsl:choose>
4129+ </xsl:if>
4130+</xsl:template>
4131+
4132+<xsl:template match="text:drop-down">
4133+ <xsl:value-of select="text:label[2]/@text:value" />
4134+</xsl:template>
4135+
4136+
4137+<xsl:template match="text:p|text:h">
4138+ <xsl:param name="skip_draw" select="1" />
4139+ <xsl:if test="boolean(key('page_break_before',@text:style-name))" >
4140+ <pageBreak />
4141+ </xsl:if>
4142+ <xsl:choose>
4143+ <xsl:when test="boolean(.//draw:image)">
4144+ <xsl:call-template name="make_image" />
4145+ </xsl:when>
4146+ <xsl:when test="boolean(name(..) = 'draw:text-box') and boolean($skip_draw)">
4147+ </xsl:when>
4148+ <xsl:otherwise>
4149+ <para>
4150+ <xsl:attribute name="style">
4151+ <xsl:value-of select="@text:style-name" />
4152+ </xsl:attribute>
4153+ <xsl:call-template name="make_listitem" />
4154+ <xsl:apply-templates />
4155+ <xsl:call-template name="empty_paragraph" />
4156+ </para>
4157+ </xsl:otherwise>
4158+ </xsl:choose>
4159+ <xsl:if test="boolean(key('page_break_after',@text:style-name))" >
4160+ <pageBreak />
4161+ </xsl:if>
4162+</xsl:template>
4163+
4164+<xsl:template match="text:p/text:tab-stop">
4165+ <!-- simulate a tabstop -->
4166+ <xsl:call-template name="distance_point">
4167+ <xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
4168+ <xsl:with-param name="tab_stop">yes</xsl:with-param>
4169+ </xsl:call-template>
4170+</xsl:template>
4171+
4172+<!-- experimental - switched off
4173+<xsl:template match="text:h">
4174+ <para>
4175+ <xsl:attribute name="style">
4176+ <xsl:value-of select="@text:style-name" />
4177+ </xsl:attribute>
4178+ <xsl:call-template name="make_number" />
4179+ <xsl:apply-templates />
4180+ <xsl:call-template name="empty_paragraph" />
4181+ </para>
4182+</xsl:template>
4183+
4184+<xsl:template name="make_number">
4185+ <xsl:choose>
4186+ <xsl:when test="@text:level='1'">
4187+ <xsl:number format="1. " />
4188+ </xsl:when>
4189+ <xsl:when test="@text:level='2'">
4190+ <xsl:number count="text:h[@text:level='1']|text:h[text:level='2']" level="any" format="1.1." />
4191+ </xsl:when>
4192+ </xsl:choose>
4193+</xsl:template>
4194+
4195+-->
4196+
4197+<xsl:template match="style:style[@style:family='paragraph']">
4198+ <paraStyle>
4199+ <xsl:attribute name="name">
4200+ <xsl:value-of select="@style:name" />
4201+ </xsl:attribute>
4202+ <xsl:call-template name="make_indent_paragraph" />
4203+ <xsl:call-template name="make_fontnames_paragraph" />
4204+ <xsl:call-template name="make_fontsize" />
4205+ <!--<xsl:call-template name="make_parent" /> not necessary -
4206+ parent styles processed by PyOpenOffice -->
4207+ <xsl:call-template name="make_alignment" />
4208+ <xsl:call-template name="make_background" />
4209+ <xsl:call-template name="make_space_beforeafter" />
4210+ <xsl:call-template name="make_fontcolor" />
4211+ </paraStyle>
4212+</xsl:template>
4213+
4214+<xsl:template name="make_indent_paragraph">
4215+ <xsl:variable name="right_indent"><xsl:value-of select="style:properties/@fo:margin-right" /></xsl:variable>
4216+ <xsl:variable name="left_indent"><xsl:value-of select="style:properties/@fo:margin-left" /></xsl:variable>
4217+ <xsl:if test="not($right_indent='') and boolean(style:properties/@fo:margin-right)">
4218+ <xsl:attribute name="rightIndent">
4219+ <xsl:value-of select="$right_indent" />
4220+ </xsl:attribute>
4221+ </xsl:if>
4222+ <xsl:if test="not($left_indent='') and boolean(style:properties/@fo:margin-left)">
4223+ <xsl:attribute name="leftIndent">
4224+ <xsl:value-of select="$left_indent" />
4225+ </xsl:attribute>
4226+ </xsl:if>
4227+</xsl:template>
4228+
4229+<xsl:template name="make_background">
4230+ <xsl:variable name="background">
4231+ <xsl:value-of select="style:properties/@fo:background-color" />
4232+ </xsl:variable>
4233+ <xsl:if test="not($background='') and boolean(style:properties/@fo:background-color) and starts-with($background,'#')" >
4234+ <xsl:attribute name="backColor">
4235+ <xsl:value-of select="$background" />
4236+ </xsl:attribute>
4237+ </xsl:if>
4238+</xsl:template>
4239+
4240+<xsl:template name="make_space_beforeafter">
4241+ <xsl:variable name="before">
4242+ <xsl:value-of select="style:properties/@fo:margin-top" />
4243+ </xsl:variable>
4244+ <xsl:variable name="after">
4245+ <xsl:value-of select="style:properties/@fo:margin-bottom" />
4246+ </xsl:variable>
4247+ <xsl:if test="not($before='') and boolean(style:properties/@fo:margin-top)" >
4248+ <xsl:attribute name="spaceBefore">
4249+ <xsl:value-of select="$before" />
4250+ </xsl:attribute>
4251+ </xsl:if>
4252+ <xsl:if test="not($after='') and boolean(style:properties/@fo:margin-bottom)" >
4253+ <xsl:attribute name="spaceAfter">
4254+ <xsl:value-of select="$after" />
4255+ </xsl:attribute>
4256+ </xsl:if>
4257+</xsl:template>
4258+
4259+<xsl:template name="make_fontsize">
4260+ <xsl:variable name="fontSize">
4261+ <xsl:value-of select="style:properties/@fo:font-size" />
4262+ </xsl:variable>
4263+ <xsl:if test="not($fontSize='') and boolean(style:properties/@fo:font-size)">
4264+ <xsl:attribute name="fontSize">
4265+ <xsl:value-of select="$fontSize" />
4266+ </xsl:attribute>
4267+ <xsl:attribute name="leading">
4268+ <xsl:value-of select="$fontSize + floor($fontSize div 5) + 1" />
4269+ <!--use a standard leading related to the font size -->
4270+ </xsl:attribute>
4271+ </xsl:if>
4272+</xsl:template>
4273+
4274+<!--this template is not needed anymore for "normalized" sxw files -->
4275+<xsl:template name="make_parent">
4276+ <xsl:variable name="parent">
4277+ <xsl:value-of select="@style:parent-style-name" />
4278+ </xsl:variable>
4279+ <xsl:if test="not($parent='') and boolean(@style:parent-style-name)">
4280+ <xsl:attribute name="parent">
4281+ <xsl:value-of select="$parent" />
4282+ </xsl:attribute>
4283+ </xsl:if>
4284+</xsl:template>
4285+
4286+<xsl:template name="make_alignment">
4287+ <xsl:variable name="alignment">
4288+ <xsl:value-of select="style:properties/@fo:text-align" />
4289+ </xsl:variable>
4290+ <xsl:if test="not($alignment='') and boolean(style:properties/@fo:text-align)">
4291+ <xsl:choose>
4292+ <xsl:when test="$alignment='start'">
4293+ <xsl:attribute name="alignment">LEFT</xsl:attribute>
4294+ </xsl:when>
4295+ <xsl:when test="$alignment='center'">
4296+ <xsl:attribute name="alignment">CENTER</xsl:attribute>
4297+ </xsl:when>
4298+ <xsl:when test="$alignment='end'">
4299+ <xsl:attribute name="alignment">RIGHT</xsl:attribute>
4300+ </xsl:when>
4301+ <xsl:when test="$alignment='justify'">
4302+ <xsl:attribute name="alignment">JUSTIFY</xsl:attribute>
4303+ </xsl:when>
4304+ </xsl:choose>
4305+ </xsl:if>
4306+</xsl:template>
4307+
4308+<xsl:template name="make_fontnames_paragraph">
4309+ <xsl:attribute name="fontName">
4310+ <xsl:call-template name="make_fontnames">
4311+ <xsl:with-param name="fontName" select="style:properties/@style:font-name" />
4312+ <xsl:with-param name="fontWeight" select="style:properties/@fo:font-weight" />
4313+ <xsl:with-param name="fontStyle" select="style:properties/@fo:font-style" />
4314+ </xsl:call-template>
4315+ </xsl:attribute>
4316+</xsl:template>
4317+
4318+<xsl:template name="make_fontnames">
4319+ <!--much too verbose, needs improvement-->
4320+<xsl:param name="fontName" />
4321+<xsl:param name="fontWeight" />
4322+<xsl:param name="fontStyle" />
4323+<xsl:choose>
4324+<xsl:when test="not($fontName='') and boolean($fontName)">
4325+ <xsl:choose>
4326+ <xsl:when test="contains($fontName,'Courier')">
4327+ <xsl:choose>
4328+ <xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
4329+ <xsl:text>Courier-BoldOblique</xsl:text>
4330+ </xsl:when>
4331+ <xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
4332+ <xsl:text>Courier-Bold</xsl:text>
4333+ </xsl:when>
4334+ <xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
4335+ <xsl:text>Courier-Oblique</xsl:text>
4336+ </xsl:when>
4337+ <xsl:otherwise>
4338+ <xsl:text>Courier</xsl:text>
4339+ </xsl:otherwise>
4340+ </xsl:choose>
4341+ </xsl:when>
4342+ <xsl:when test="contains($fontName,'Helvetica') or contains($fontName,'Arial') or contains($fontName,'Sans')">
4343+ <xsl:choose>
4344+ <xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
4345+ <xsl:text>Helvetica-BoldOblique</xsl:text>
4346+ </xsl:when>
4347+ <xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
4348+ <xsl:text>Helvetica-Bold</xsl:text>
4349+ </xsl:when>
4350+ <xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
4351+ <xsl:text>Helvetica-Oblique</xsl:text>
4352+ </xsl:when>
4353+ <xsl:otherwise>
4354+ <xsl:text>Helvetica</xsl:text>
4355+ </xsl:otherwise>
4356+ </xsl:choose>
4357+ </xsl:when>
4358+ <xsl:otherwise>
4359+ <xsl:choose>
4360+ <xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
4361+ <xsl:text>Times-BoldItalic</xsl:text>
4362+ </xsl:when>
4363+ <xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
4364+ <xsl:text>Times-Bold</xsl:text>
4365+ </xsl:when>
4366+ <xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
4367+ <xsl:text>Times-Italic</xsl:text>
4368+ </xsl:when>
4369+ <xsl:otherwise>
4370+ <xsl:text>Times-Roman</xsl:text>
4371+ </xsl:otherwise>
4372+ </xsl:choose>
4373+ </xsl:otherwise>
4374+ </xsl:choose>
4375+</xsl:when>
4376+<xsl:otherwise>
4377+ <!--Use this as default -->
4378+ <xsl:text>Times-Roman</xsl:text>
4379+</xsl:otherwise>
4380+</xsl:choose>
4381+</xsl:template>
4382+
4383+<xsl:template name="make_fontcolor">
4384+ <xsl:variable name="textColor">
4385+ <xsl:value-of select="style:properties/@fo:color"/>
4386+ </xsl:variable>
4387+ <xsl:if test="not($textColor='') and boolean(style:properties/@fo:color)">
4388+ <xsl:attribute name="textColor">
4389+ <xsl:value-of select="$textColor" />
4390+ </xsl:attribute>
4391+ </xsl:if>
4392+</xsl:template>
4393+
4394+<!--
4395+This stylesheet is part of:
4396+PyOpenOffice Version 0.4
4397+Copyright (C) 2005: Martin Simon
4398+Homepage: www.bezirksreiter.de
4399+
4400+GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999
4401+-->
4402+
4403+</xsl:stylesheet>
4404+
4405+
4406
4407=== added file 'l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_oo2rml.xsl'
4408--- l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_oo2rml.xsl 1970-01-01 00:00:00 +0000
4409+++ l10n_ve_fiscal_reports/report/tiny_sxw2rml/normalized_oo2rml.xsl 2011-12-29 18:55:26 +0000
4410@@ -0,0 +1,696 @@
4411+<?xml version="1.0" encoding="utf-8"?>
4412+<xsl:stylesheet
4413+ version="1.0"
4414+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4415+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
4416+ xmlns:office="http://openoffice.org/2000/office"
4417+ xmlns:style="http://openoffice.org/2000/style"
4418+ xmlns:text="http://openoffice.org/2000/text"
4419+ xmlns:table="http://openoffice.org/2000/table"
4420+ xmlns:draw="http://openoffice.org/2000/drawing"
4421+ xmlns:xlink="http://www.w3.org/1999/xlink"
4422+ xmlns:number="http://openoffice.org/2000/datastyle"
4423+ xmlns:svg="http://www.w3.org/2000/svg"
4424+ xmlns:chart="http://openoffice.org/2000/chart"
4425+ xmlns:dr3d="http://openoffice.org/2000/dr3d"
4426+ xmlns:math="http://www.w3.org/1998/Math/MathML"
4427+ xmlns:form="http://openoffice.org/2000/form"
4428+ xmlns:script="http://openoffice.org/2000/script"
4429+ office:class="text" office:version="1.0"
4430+ exclude-result-prefixes = "xsl fo office style text table draw xlink number svg chart dr3d math form script">
4431+
4432+ <!--TODO's: indent, picture cache (trml2pdf) -->
4433+
4434+<xsl:output method="xml" indent="yes" />
4435+<xsl:strip-space elements="*"/>
4436+
4437+<xsl:key name="text_style" match="style:style[@style:family='text']" use="@style:name" />
4438+<xsl:key name="page_break_before" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-before='page']" use="@style:name" />
4439+<xsl:key name="page_break_after" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-after='page']" use="@style:name" />
4440+<xsl:key name="table_column_style" match="style:style[@style:family='table-column']" use="@style:name" />
4441+<xsl:key name="table_cell_style" match="style:style[@style:family='table-cell']" use="@style:name" />
4442+<xsl:key name="paragraph_style" match="style:style[@style:family='paragraph']" use="@style:name" />
4443+
4444+<xsl:template match="office:document-content">
4445+ <document filename="test.pdf">
4446+ <xsl:apply-templates select="office:automatic-styles" />
4447+ <xsl:apply-templates select="office:body" />
4448+ </document>
4449+</xsl:template>
4450+
4451+<xsl:template name="page_size">
4452+ <xsl:attribute name="pageSize">
4453+ <xsl:text>(</xsl:text>
4454+ <xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
4455+ <xsl:text>,</xsl:text>
4456+ <xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
4457+ <xsl:text>)</xsl:text>
4458+ </xsl:attribute>
4459+</xsl:template>
4460+
4461+<xsl:template name="fixed_frame">
4462+ <xsl:for-each select="//draw:text-box">
4463+ <frame>
4464+ <xsl:attribute name="id"><xsl:value-of select="./@draw:name" /></xsl:attribute>
4465+ <xsl:attribute name="x1"><xsl:value-of select="./@svg:x" /></xsl:attribute>
4466+ <xsl:attribute name="y1">
4467+ <xsl:value-of
4468+ select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height - ./@svg:y - ./@fo:min-height" />
4469+ </xsl:attribute>
4470+ <xsl:attribute name="width">
4471+ <xsl:value-of select="./@svg:width" />
4472+ </xsl:attribute>
4473+ <xsl:attribute name="height">
4474+ <xsl:value-of select="./@fo:min-height" />
4475+ </xsl:attribute>
4476+ </frame>
4477+ </xsl:for-each>
4478+</xsl:template>
4479+
4480+<xsl:template name="margin_sizes">
4481+ <xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
4482+ <xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
4483+ <xsl:variable name="margin_top" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-top" />
4484+ <xsl:variable name="margin_bottom" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-bottom" />
4485+ <xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
4486+ <xsl:variable name="page_height" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
4487+ <xsl:attribute name="x1"><xsl:value-of select="$margin_left" /></xsl:attribute>
4488+ <xsl:attribute name="y1"><xsl:value-of select="$margin_bottom" /></xsl:attribute>
4489+ <xsl:attribute name="width"><xsl:value-of select="$page_width - $margin_left - $margin_right"/></xsl:attribute>
4490+ <xsl:attribute name="height"><xsl:value-of select="$page_height - $margin_bottom - $margin_top"/></xsl:attribute>
4491+</xsl:template>
4492+
4493+<xsl:template name="text_width">
4494+ <!-- You need this for the workaround to make primitive outlines-->
4495+ <xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
4496+ <xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
4497+ <xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
4498+ <xsl:value-of select="$page_width - $margin_left - $margin_right - 18"/>
4499+</xsl:template>
4500+
4501+
4502+
4503+<xsl:template match="office:automatic-styles">
4504+ <!--<template pageSize="(21cm, 29.7cm)" leftMargin="1.0cm" rightMargin="2.0cm" topMargin="1.0cm" bottomMargin="1.0cm" title="Test" author="Martin Simon" allowSplitting="20">-->
4505+ <template pageSize="(21cm, 29.7cm)" title="Test" author="Martin Simon" allowSplitting="20">
4506+ <xsl:call-template name="page_size" />
4507+ <pageTemplate id="first">
4508+ <xsl:call-template name="fixed_frame" />
4509+ <frame id="first" x1="2cm" y1="2cm" width="17cm" height="26cm">
4510+ <xsl:call-template name="margin_sizes" />
4511+ </frame>
4512+ </pageTemplate>
4513+ </template>
4514+ <stylesheet>
4515+ <!--A table style to simulate primitive outlines -till the <addOutline> tag is implemented in trml2pdf -->
4516+ <blockTableStyle id="Standard_Outline">
4517+ <blockAlignment value="LEFT"/>
4518+ <blockValign value="TOP"/>
4519+ </blockTableStyle>
4520+ <!--use two standard table grid styles like PyOpenOffice "Old Way": with and without a grid-->
4521+ <!--TODO insert table cell colors here, not within the <td> tag - otherwise
4522+ it will not work with flowables as cell content-->
4523+ <xsl:call-template name="make_blocktablestyle" />
4524+ <initialize>
4525+ <paraStyle name="all" alignment="justify" />
4526+ </initialize>
4527+ <xsl:apply-templates select="style:style" />
4528+ </stylesheet>
4529+</xsl:template>
4530+
4531+<xsl:template name="make_blocktablestyle">
4532+ <xsl:for-each select="//table:table">
4533+ <xsl:variable name="test">
4534+ <xsl:value-of select="./@table:name" />
4535+ </xsl:variable>
4536+ <xsl:if test="not(boolean(count(preceding-sibling::table:table[@table:name=$test])))">
4537+ <!--Test if this is the first table with this style, nested tables not counted-->
4538+ <blockTableStyle id="{@table:name}">
4539+ <xsl:if test=".//draw:image">
4540+ <blockTopPadding value="0"/>
4541+ <blockBottomPadding value="0"/>
4542+ </xsl:if>
4543+ <blockAlignment value="LEFT" />
4544+ <blockValign value="TOP" />
4545+ <xsl:call-template name="make_linestyle" />
4546+ <xsl:call-template name="make_tablebackground" />
4547+ </blockTableStyle>
4548+ </xsl:if>
4549+ </xsl:for-each>
4550+</xsl:template>
4551+
4552+<xsl:template name="make_linestyle">
4553+ <xsl:for-each select=".//table:table-row">
4554+ <xsl:variable name="row" select="position() - 1"/>
4555+ <xsl:for-each select=".//table:table-cell">
4556+ <xsl:variable name="col" select="position() - 1"/>
4557+ <xsl:variable name="linebefore">
4558+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-left"/>
4559+ </xsl:variable>
4560+ <xsl:if test="not($linebefore='') and not($linebefore='none')">
4561+ <xsl:variable name="colorname">
4562+ <xsl:value-of select="substring-after($linebefore,'#')"/>
4563+ </xsl:variable>
4564+ <lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
4565+ </xsl:if>
4566+ <xsl:variable name="lineafter">
4567+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-right"/>
4568+ </xsl:variable>
4569+ <xsl:if test="not($lineafter='') and not($lineafter='none')">
4570+ <xsl:variable name="colorname">
4571+ <xsl:value-of select="substring-after($lineafter,'#')"/>
4572+ </xsl:variable>
4573+ <lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
4574+ </xsl:if>
4575+ <xsl:variable name="lineabove">
4576+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-top"/>
4577+ </xsl:variable>
4578+ <xsl:if test="not($lineabove='') and not($lineabove='none')">
4579+ <xsl:variable name="colorname">
4580+ <xsl:value-of select="substring-after($lineabove,'#')"/>
4581+ </xsl:variable>
4582+ <lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
4583+ </xsl:if>
4584+ <xsl:variable name="linebelow">
4585+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-bottom"/>
4586+ </xsl:variable>
4587+ <xsl:if test="not($linebelow='') and not($linebelow='none')">
4588+ <xsl:variable name="colorname">
4589+ <xsl:value-of select="substring-after($linebelow,'#')"/>
4590+ </xsl:variable>
4591+ <lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
4592+ </xsl:if>
4593+ <xsl:variable name="grid">
4594+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border"/>
4595+ </xsl:variable>
4596+ <xsl:if test="not($grid='') and not($grid='none')">
4597+ <xsl:variable name="colorname">
4598+ <xsl:value-of select="substring-after($grid,'#')"/>
4599+ </xsl:variable>
4600+ <!-- Don't use grid because we don't need a line between each rows -->
4601+ <lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
4602+ <lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
4603+ <lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
4604+ <lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
4605+ </xsl:if>
4606+ </xsl:for-each>
4607+ </xsl:for-each>
4608+</xsl:template>
4609+
4610+<!-- Was needed to simulate bulleted lists:
4611+<xsl:template match="text:ordered-list|text:unordered-list">
4612+ <xsl:variable name = "text_width">
4613+ <xsl:call-template name="text_width" />
4614+ </xsl:variable>
4615+ <blockTable style="Standard_Outline" colWidths="18,{$text_width}">
4616+ <xsl:apply-templates match="text:list-item" />
4617+</blockTable>
4618+</xsl:template>
4619+
4620+<xsl:template match="text:list-item">
4621+ <tr>
4622+ <td><para><font face="Helvetica-Bold" size="10">*</font></para></td>
4623+ <td>
4624+ <xsl:apply-templates />
4625+ </td>
4626+ </tr>
4627+</xsl:template>
4628+
4629+-->
4630+
4631+
4632+<xsl:template match="office:body">
4633+ <story>
4634+ <xsl:apply-templates />
4635+ <xsl:for-each select="//draw:text-box">
4636+ <currentFrame>
4637+ <xsl:attribute name="name">
4638+ <xsl:value-of select="./@draw:name" />
4639+ </xsl:attribute>
4640+ </currentFrame>
4641+ <xsl:apply-templates>
4642+ <xsl:with-param name="skip_draw" select="0" />
4643+ </xsl:apply-templates>
4644+ <frameEnd />
4645+ </xsl:for-each>
4646+ <xsl:for-each select="//text:ordered-list">
4647+ <para><seqReset id="{./@text:style-name}"/></para>
4648+ </xsl:for-each>
4649+ </story>
4650+</xsl:template>
4651+
4652+<xsl:template match="table:table">
4653+ <blockTable>
4654+ <xsl:attribute name="colWidths">
4655+ <xsl:call-template name="make_columns" />
4656+ </xsl:attribute>
4657+ <xsl:call-template name="make_tableheaders" />
4658+ <xsl:attribute name="style">
4659+ <xsl:value-of select="@table:name" />
4660+ </xsl:attribute>
4661+ <xsl:apply-templates />
4662+ </blockTable>
4663+</xsl:template>
4664+
4665+<xsl:template name="make_tableheaders">
4666+ <xsl:if test="boolean(count(table:table-header-rows))">
4667+ <xsl:attribute name="repeatRows">1</xsl:attribute>
4668+ </xsl:if>
4669+</xsl:template>
4670+
4671+<xsl:template name="make_tablebackground">
4672+ <xsl:for-each select=".//table:table-row">
4673+ <!--Be careful when there are table:table-header-rows as
4674+ parent node of table:table-row -->
4675+ <xsl:variable name="row" select="position() - 1" />
4676+ <xsl:for-each select="./table:table-cell">
4677+ <xsl:variable name="col" select="position() - 1" />
4678+ <xsl:variable name="background">
4679+ <xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:background-color" />
4680+ </xsl:variable>
4681+ <xsl:if test="not($background='') and boolean(key('table_cell_style',@table:style-name)/style:properties/@fo:background-color) and starts-with($background,'#')">
4682+ <!--only RGB hexcolors are accepted -->
4683+ <blockBackground colorName="{$background}" start="{$col},{$row}" stop="{$col},-1" />
4684+ </xsl:if>
4685+ </xsl:for-each>
4686+ </xsl:for-each>
4687+</xsl:template>
4688+
4689+<xsl:template name="make_columns">
4690+ <xsl:variable name="columns" >
4691+ <xsl:for-each select="table:table-column">
4692+ <xsl:value-of select="key('table_column_style',@table:style-name)/style:properties/@style:column-width" />
4693+ <xsl:text>,</xsl:text>
4694+ </xsl:for-each>
4695+ </xsl:variable>
4696+ <xsl:value-of select="substring($columns,1,string-length($columns) - 1)" />
4697+ <!--strip the last comma-->
4698+</xsl:template>
4699+
4700+<xsl:template match="table:table-row">
4701+ <tr>
4702+ <xsl:apply-templates />
4703+ </tr>
4704+</xsl:template>
4705+
4706+<xsl:template match="table:table-cell">
4707+ <td>
4708+ <xsl:apply-templates />
4709+ </td>
4710+</xsl:template>
4711+
4712+<xsl:template match="text:section">
4713+ <section>
4714+ <xsl:apply-templates />
4715+ </section>
4716+</xsl:template>
4717+
4718+
4719+<xsl:template match="text:span">
4720+ <font>
4721+ <xsl:call-template name="make_fontnames_span" />
4722+ <xsl:call-template name="make_fontsize_span" />
4723+ <xsl:apply-templates />
4724+ </font>
4725+</xsl:template>
4726+
4727+<xsl:template name="make_fontsize_span">
4728+ <xsl:variable name ="fontsize">
4729+ <xsl:value-of select="key('text_style',@text:style-name)/style:properties/@fo:font-size" />
4730+ </xsl:variable>
4731+ <xsl:if test="not($fontsize='') and boolean(key('text_style',@text:style-name)/style:properties/@fo:font-size)" >
4732+ <xsl:attribute name="size">
4733+ <xsl:value-of select="$fontsize" />
4734+ </xsl:attribute>
4735+ </xsl:if>
4736+</xsl:template>
4737+
4738+<xsl:template name="make_fontnames_span">
4739+ <xsl:attribute name="face">
4740+ <xsl:call-template name="make_fontnames">
4741+ <xsl:with-param name="fontName" select="key('text_style',@text:style-name)/style:properties/@style:font-name" />
4742+ <xsl:with-param name="fontWeight" select="key('text_style',@text:style-name)/style:properties/@fo:font-weight" />
4743+ <xsl:with-param name="fontStyle" select="key('text_style',@text:style-name)/style:properties/@fo:font-style" />
4744+ </xsl:call-template>
4745+ </xsl:attribute>
4746+</xsl:template>
4747+
4748+<xsl:template name="make_image">
4749+ <illustration height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}">
4750+ <image x="0" y="0" file="{substring-after(.//draw:image/@xlink:href,'#Pictures/')}" height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}" />
4751+ </illustration>
4752+</xsl:template>
4753+
4754+<xsl:template name="empty_paragraph">
4755+ <xsl:if test="not(boolean(count(descendant::node())))">
4756+ <xsl:call-template name="distance_point">
4757+ <xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
4758+ </xsl:call-template>
4759+ </xsl:if>
4760+</xsl:template>
4761+
4762+<xsl:template name="distance_point">
4763+ <xsl:param name="background" />
4764+ <xsl:param name="tab_stop"></xsl:param>
4765+ <xsl:variable name="local_back">
4766+ <xsl:choose>
4767+ <xsl:when test="not(boolean($background)) or not(contains($background,'#'))">
4768+ <!-- Do not accept OO colors like "transparent", only hex-colors -->
4769+ <xsl:text>white</xsl:text>
4770+ </xsl:when>
4771+ <xsl:otherwise>
4772+ <xsl:value-of select="$background" />
4773+ </xsl:otherwise>
4774+ </xsl:choose>
4775+ </xsl:variable>
4776+ <font color="{$local_back}">
4777+ <xsl:text> </xsl:text>
4778+ <xsl:if test="boolean($tab_stop)">
4779+ <!-- simulate a tabstop with white/background-color points -->
4780+ <xsl:text>.........</xsl:text>
4781+ </xsl:if>
4782+ </font>
4783+</xsl:template>
4784+
4785+<xsl:template match="text:ordered-list">
4786+ <xsl:apply-templates />
4787+
4788+ <!-- Reset the counter. seqreset is not a trml2pdf tag, but a Platypus Intra Paragraph Markup,
4789+ so it needs a dummy paragraph to enclose it -->
4790+</xsl:template>
4791+
4792+<xsl:template name="make_listitem">
4793+ <xsl:if test="(name(..)='text:list-item')">
4794+ <xsl:attribute name="leftIndent">15</xsl:attribute>
4795+ <xsl:attribute name="bulletIndent">0</xsl:attribute>
4796+ <xsl:choose>
4797+ <xsl:when test="(name(../..)='text:unordered-list')">
4798+ <xsl:variable name="fontsize">
4799+ <xsl:value-of select="number(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)" />
4800+ </xsl:variable>
4801+ <xsl:choose>
4802+ <xsl:when test="$fontsize='NaN'">
4803+ <!-- you should exclude non-numerical values for bulletFontSize. <== Sometimes the preprocessing went wrong.-->
4804+ <!--use a default bullet font size-->
4805+ <xsl:attribute name="bulletFontSize">6</xsl:attribute>
4806+ </xsl:when>
4807+ <xsl:otherwise>
4808+ <xsl:attribute name="bulletFontSize"><xsl:value-of select="floor(($fontsize div 2) + 1)" /></xsl:attribute>
4809+ </xsl:otherwise>
4810+ </xsl:choose>
4811+ <xsl:attribute name="bulletFontName">ZapfDingbats</xsl:attribute>
4812+ <xsl:attribute name="bulletText">l</xsl:attribute>
4813+ </xsl:when>
4814+ <xsl:otherwise>
4815+ <!-- Generate the numbers for an ordered list -->
4816+ <xsl:variable name="size">
4817+ <xsl:value-of select="key('paragraph_style',@text:style-name)/style:properties/@fo:font-size" />
4818+ </xsl:variable>
4819+ <!-- For ordered lists we use the bullet tag from Platypus Intra Paragraph Markup -->
4820+ <bullet>
4821+ <xsl:if test="not($size='') and boolean(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)">
4822+ <xsl:attribute name="size">
4823+ <!-- adapt the fontsize to the fontsize of the current paragraph -->
4824+ <xsl:value-of select="$size" />
4825+ </xsl:attribute>
4826+ </xsl:if>
4827+ <seq id="{../../@text:style-name}"/>.</bullet>
4828+
4829+ </xsl:otherwise>
4830+ </xsl:choose>
4831+ </xsl:if>
4832+</xsl:template>
4833+
4834+<xsl:template match="text:drop-down">
4835+ <xsl:value-of select="text:label[2]/@text:value" />
4836+</xsl:template>
4837+
4838+
4839+<xsl:template match="text:p|text:h">
4840+ <xsl:param name="skip_draw" select="1" />
4841+ <xsl:if test="boolean(key('page_break_before',@text:style-name))" >
4842+ <pageBreak />
4843+ </xsl:if>
4844+ <xsl:choose>
4845+ <xsl:when test="boolean(.//draw:image)">
4846+ <xsl:call-template name="make_image" />
4847+ </xsl:when>
4848+ <xsl:when test="boolean(name(..) = 'draw:text-box') and boolean($skip_draw)">
4849+ </xsl:when>
4850+ <xsl:otherwise>
4851+ <para>
4852+ <xsl:attribute name="style">
4853+ <xsl:value-of select="@text:style-name" />
4854+ </xsl:attribute>
4855+ <xsl:call-template name="make_listitem" />
4856+ <xsl:apply-templates />
4857+ <xsl:call-template name="empty_paragraph" />
4858+ </para>
4859+ </xsl:otherwise>
4860+ </xsl:choose>
4861+ <xsl:if test="boolean(key('page_break_after',@text:style-name))" >
4862+ <pageBreak />
4863+ </xsl:if>
4864+</xsl:template>
4865+
4866+<xsl:template match="text:p/text:tab-stop">
4867+ <!-- simulate a tabstop -->
4868+ <xsl:call-template name="distance_point">
4869+ <xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
4870+ <xsl:with-param name="tab_stop">yes</xsl:with-param>
4871+ </xsl:call-template>
4872+</xsl:template>
4873+
4874+<!-- experimental - switched off
4875+<xsl:template match="text:h">
4876+ <para>
4877+ <xsl:attribute name="style">
4878+ <xsl:value-of select="@text:style-name" />
4879+ </xsl:attribute>
4880+ <xsl:call-template name="make_number" />
4881+ <xsl:apply-templates />
4882+ <xsl:call-template name="empty_paragraph" />
4883+ </para>
4884+</xsl:template>
4885+
4886+<xsl:template name="make_number">
4887+ <xsl:choose>
4888+ <xsl:when test="@text:level='1'">
4889+ <xsl:number format="1. " />
4890+ </xsl:when>
4891+ <xsl:when test="@text:level='2'">
4892+ <xsl:number count="text:h[@text:level='1']|text:h[text:level='2']" level="any" format="1.1." />
4893+ </xsl:when>
4894+ </xsl:choose>
4895+</xsl:template>
4896+
4897+-->
4898+
4899+<xsl:template match="style:style[@style:family='paragraph']">
4900+ <paraStyle>
4901+ <xsl:attribute name="name">
4902+ <xsl:value-of select="@style:name" />
4903+ </xsl:attribute>
4904+ <xsl:call-template name="make_indent_paragraph" />
4905+ <xsl:call-template name="make_fontnames_paragraph" />
4906+ <xsl:call-template name="make_fontsize" />
4907+ <!--<xsl:call-template name="make_parent" /> not necessary -
4908+ parent styles processed by PyOpenOffice -->
4909+ <xsl:call-template name="make_alignment" />
4910+ <xsl:call-template name="make_background" />
4911+ <xsl:call-template name="make_space_beforeafter" />
4912+ <xsl:call-template name="make_fontcolor" />
4913+ </paraStyle>
4914+</xsl:template>
4915+
4916+<xsl:template name="make_indent_paragraph">
4917+ <xsl:variable name="right_indent"><xsl:value-of select="style:properties/@fo:margin-right" /></xsl:variable>
4918+ <xsl:variable name="left_indent"><xsl:value-of select="style:properties/@fo:margin-left" /></xsl:variable>
4919+ <xsl:if test="not($right_indent='') and boolean(style:properties/@fo:margin-right)">
4920+ <xsl:attribute name="rightIndent">
4921+ <xsl:value-of select="$right_indent" />
4922+ </xsl:attribute>
4923+ </xsl:if>
4924+ <xsl:if test="not($left_indent='') and boolean(style:properties/@fo:margin-left)">
4925+ <xsl:attribute name="leftIndent">
4926+ <xsl:value-of select="$left_indent" />
4927+ </xsl:attribute>
4928+ </xsl:if>
4929+</xsl:template>
4930+
4931+<xsl:template name="make_background">
4932+ <xsl:variable name="background">
4933+ <xsl:value-of select="style:properties/@fo:background-color" />
4934+ </xsl:variable>
4935+ <xsl:if test="not($background='') and boolean(style:properties/@fo:background-color) and starts-with($background,'#')" >
4936+ <xsl:attribute name="backColor">
4937+ <xsl:value-of select="$background" />
4938+ </xsl:attribute>
4939+ </xsl:if>
4940+</xsl:template>
4941+
4942+<xsl:template name="make_space_beforeafter">
4943+ <xsl:variable name="before">
4944+ <xsl:value-of select="style:properties/@fo:margin-top" />
4945+ </xsl:variable>
4946+ <xsl:variable name="after">
4947+ <xsl:value-of select="style:properties/@fo:margin-bottom" />
4948+ </xsl:variable>
4949+ <xsl:if test="not($before='') and boolean(style:properties/@fo:margin-top)" >
4950+ <xsl:attribute name="spaceBefore">
4951+ <xsl:value-of select="$before" />
4952+ </xsl:attribute>
4953+ </xsl:if>
4954+ <xsl:if test="not($after='') and boolean(style:properties/@fo:margin-bottom)" >
4955+ <xsl:attribute name="spaceAfter">
4956+ <xsl:value-of select="$after" />
4957+ </xsl:attribute>
4958+ </xsl:if>
4959+</xsl:template>
4960+
4961+<xsl:template name="make_fontsize">
4962+ <xsl:variable name="fontSize">
4963+ <xsl:value-of select="style:properties/@fo:font-size" />
4964+ </xsl:variable>
4965+ <xsl:if test="not($fontSize='') and boolean(style:properties/@fo:font-size)">
4966+ <xsl:attribute name="fontSize">
4967+ <xsl:value-of select="$fontSize" />
4968+ </xsl:attribute>
4969+ <xsl:attribute name="leading">
4970+ <xsl:value-of select="$fontSize + floor($fontSize div 5) + 1" />
4971+ <!--use a standard leading related to the font size -->
4972+ </xsl:attribute>
4973+ </xsl:if>
4974+</xsl:template>
4975+
4976+<!--this template is not needed anymore for "normalized" sxw files -->
4977+<xsl:template name="make_parent">
4978+ <xsl:variable name="parent">
4979+ <xsl:value-of select="@style:parent-style-name" />
4980+ </xsl:variable>
4981+ <xsl:if test="not($parent='') and boolean(@style:parent-style-name)">
4982+ <xsl:attribute name="parent">
4983+ <xsl:value-of select="$parent" />
4984+ </xsl:attribute>
4985+ </xsl:if>
4986+</xsl:template>
4987+
4988+<xsl:template name="make_alignment">
4989+ <xsl:variable name="alignment">
4990+ <xsl:value-of select="style:properties/@fo:text-align" />
4991+ </xsl:variable>
4992+ <xsl:if test="not($alignment='') and boolean(style:properties/@fo:text-align)">
4993+ <xsl:choose>
4994+ <xsl:when test="$alignment='start'">
4995+ <xsl:attribute name="alignment">LEFT</xsl:attribute>
4996+ </xsl:when>
4997+ <xsl:when test="$alignment='center'">
4998+ <xsl:attribute name="alignment">CENTER</xsl:attribute>
4999+ </xsl:when>
5000+ <xsl:when test="$alignment='end'">
The diff has been truncated for viewing.