1 |
<?xml version="1.0"?> |
<?xml version="1.0"?> |
2 |
<report> |
<report> |
3 |
<parameters/> |
<parameters> |
4 |
|
<parameter name="id" description="nothing"/> |
5 |
|
</parameters> |
6 |
<sortoptions/> |
<sortoptions/> |
7 |
|
|
8 |
<sources> |
<sources> |
9 |
<datasource database="papo" name="invoiceDataSource" |
<datasource database="papo" name="invoiceDataSource" |
10 |
table="owndocument, ownitem, ownproditem, price, product"> |
table="own_document, own_item, own_product_item, price, product"> |
11 |
<condition> |
<condition> |
12 |
<and> |
<and> |
13 |
<eq> |
<eq> |
14 |
<cfield name="owndocument.id"/> |
<cfield name="own_document.id"/> |
15 |
<cfield name="ownitem.id"/> |
<cfield name="own_item.id"/> |
16 |
</eq> |
</eq> |
17 |
<eq> |
<eq> |
18 |
<cfield name="ownitem.id"/> |
<cfield name="own_item.id"/> |
19 |
<cfield name="ownproditem.own_item"/> |
<cfield name="own_product_item.own_item"/> |
20 |
</eq> |
</eq> |
21 |
<eq> |
<eq> |
22 |
<cfield name="ownproditem.price"/> |
<cfield name="own_product_item.price"/> |
23 |
<cfield name="price.id"/> |
<cfield name="price.id"/> |
24 |
</eq> |
</eq> |
25 |
<eq> |
<eq> |
26 |
<cfield name="price.product"/> |
<cfield name="price.product"/> |
27 |
<cfield name="product.id"/> |
<cfield name="product.id"/> |
28 |
</eq> |
</eq> |
29 |
</and> |
</and> |
30 |
</condition> |
</condition> |
31 |
</datasource> |
</datasource> |
32 |
</sources> |
</sources> |
34 |
<layout xmlns:out="GNUe:Reports:SimpleTabulation"> |
<layout xmlns:out="GNUe:Reports:SimpleTabulation"> |
35 |
<out:report> |
<out:report> |
36 |
<out:section break="page"> |
<out:section break="page"> |
37 |
<out:reportTitle>Facturas</out:reportTitle> |
<out:table width="100%"> |
|
<out:table width="100%"> |
|
|
<out:tablehead> |
|
|
<out:colhead width="25">Numero</out:colhead> |
|
|
<out:colhead width="25">Numero</out:colhead> |
|
|
<out:colhead width="25">Fecha</out:colhead> |
|
|
<out:colhead width="25">Bonificacion</out:colhead> |
|
|
</out:tablehead> |
|
38 |
|
|
39 |
<section name="cabeceras" source="invoiceDataSource"> |
<section name="cabeceras" source="invoiceDataSource"> |
40 |
<section name="detalles"> |
<out:row> |
41 |
<out:row> |
<out:col align="center"><field name="own_document.date" section="cabeceras"/></out:col> |
42 |
<firstrow> |
<out:col><field name="_entity_data.name" section="cabeceras"/></out:col> |
43 |
<out:col><field name="owndocument.recipient" section="cabeceras"/></out:col> |
<!-- this empty thing is for simulating the recipient address --> |
44 |
</firstrow> |
<out:col align="right"></out:col> |
45 |
<notfirstrow><out:col/></notfirstrow> |
</out:row> |
46 |
<out:col><field name="ownproditem.qty"/></out:col> |
|
47 |
<out:col><field name="product.name"/></out:col> |
<section name="detalles"> |
48 |
<out:col><field name="price.unit_price"/></out:col> |
<out:row> |
49 |
<out:col><field name="ownproditem.qty+price.unit_price"/></out:col> |
<out:col><field name="own_product_item.qty"/></out:col> |
50 |
</out:row> |
<out:col><field name="product.name"/></out:col> |
51 |
</section> |
<out:col><field name="price.unit_price"/></out:col> |
52 |
|
<out:col><!--field name="ownproditem.qty*price.unit_price"/--></out:col> |
53 |
|
<out:col><!--field name="own_item_tax.amount"/--></out:col> |
54 |
|
<out:col><field name="round (own_product_item.amount*ownproditem.qty*(1+own_item_tax.amount/100), 2)"/></out:col> |
55 |
|
</out:row> |
56 |
|
</section> |
57 |
|
|
58 |
<out:row type="subtotal" level="2"> |
<out:row type="subtotal" level="2"> |
59 |
<out:col align="center">Total: </out:col> |
<!-- these ones simulates net total and tax total --> |
60 |
<out:col align="right"> |
<out:col align="right"></out:col> |
61 |
<summ function="sum" section="detalles" field="price.unit_price"/> |
<out:col align="right"></out:col> |
62 |
</out:col> |
<!-- do _not_ 'fix' this veeeery long line --> |
63 |
</out:row> |
<out:col align="right"><summ function="sum" section="detalles" field="round (own_product_item.amount*ownproditem.qty*(1+own_item_tax.amount/100), 2)"/></out:col> |
64 |
</section> |
</out:row> |
65 |
|
</section> |
66 |
<out:row type="subtotal" level="1"> |
</out:table> |
|
<out:col align="center">Total: </out:col> |
|
|
<out:col align="right"> |
|
|
<summ function="sum" section="cabeceras" field="price.unit_price"/> |
|
|
</out:col> |
|
|
</out:row> |
|
|
|
|
|
</out:table> |
|
67 |
</out:section> |
</out:section> |
68 |
</out:report> |
</out:report> |
69 |
</layout> |
</layout> |
70 |
</report> |
</report> |