2015-11-19 13:57:23 +00:00
|
|
|
<vn>
|
|
|
|
<vn-group>
|
|
|
|
<db-form id="ticket">
|
|
|
|
<db-model property="model" id="ticket-data" conn="conn" batch="batch">
|
|
|
|
<custom>
|
|
|
|
SELECT t.id, date, a.Agencia, note, p.name province,
|
|
|
|
zip_code, city, c.name, consignee, invoice
|
|
|
|
FROM ticket_view t
|
|
|
|
JOIN address_view c ON t.address_id = c.id
|
|
|
|
JOIN vn2008.Agencias a ON t.agency_id = a.Id_Agencia
|
|
|
|
JOIN vn2008.province p ON c.province_id = p.province_id
|
|
|
|
WHERE t.id = #ticket
|
|
|
|
</custom>
|
|
|
|
</db-model>
|
|
|
|
</db-form>
|
|
|
|
</vn-group>
|
|
|
|
<div id="report" class="sheet">
|
2015-11-26 12:30:04 +00:00
|
|
|
<h2>
|
|
|
|
<htk-text column="id" form="ticket"/>
|
|
|
|
</h2>
|
|
|
|
<div class="header">
|
|
|
|
<p>
|
|
|
|
<htk-text form="ticket" column="consignee"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<htk-text form="ticket" column="date" format="%A, %e of %B %Y"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<htk-text form="ticket" column="name"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<htk-text form="ticket" column="zip_code"/>
|
|
|
|
<htk-text form="ticket" column="city"/>
|
|
|
|
(<htk-text form="ticket" column="province"/>)
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<t>Delivery</t> <htk-text form="ticket" column="Agencia"/>
|
|
|
|
</p>
|
|
|
|
</div>
|
2015-11-19 13:57:23 +00:00
|
|
|
<htk-grid>
|
|
|
|
<db-model property="model" id="movements" conn="conn" batch="batch">
|
|
|
|
<custom>
|
|
|
|
SELECT m.item_id, amount, concept, Categoria, Medida, Tallos, Color,
|
|
|
|
Abreviatura, IF(fixed != FALSE, price, NULL) price, fixed, discount
|
|
|
|
FROM ticket_row_view m
|
|
|
|
INNER JOIN vn2008.Articles a
|
|
|
|
ON m.item_id = a.Id_Article AND ticket_id = #ticket
|
|
|
|
LEFT JOIN vn2008.Origen o
|
|
|
|
ON a.id_origen = o.id
|
|
|
|
ORDER BY concept
|
|
|
|
</custom>
|
|
|
|
</db-model>
|
2015-11-26 12:30:04 +00:00
|
|
|
<htk-column-spin title="_Ref" column="item_id"/>
|
2015-11-19 13:57:23 +00:00
|
|
|
<htk-column-spin title="_Amount" column="amount"/>
|
|
|
|
<htk-column-text title="_Item" column="concept"/>
|
|
|
|
<htk-column-text title="_S1" column="Medida"/>
|
2015-11-26 12:30:04 +00:00
|
|
|
<htk-column-text title="_Cat" column="Categoria"/>
|
2015-11-19 13:57:23 +00:00
|
|
|
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
|
|
|
<htk-column-spin title="_Subtotal" unit="€" digits="2" renderer="subtotalRenderer"/>
|
|
|
|
</htk-grid>
|
2015-11-26 12:30:04 +00:00
|
|
|
<p class="footer">
|
|
|
|
<htk-text format="%.2d€">
|
|
|
|
<db-calc-sum property="param" func="subtotal" model="movements"/>
|
|
|
|
</htk-text>
|
|
|
|
</p>
|
2015-11-19 13:57:23 +00:00
|
|
|
</div>
|
|
|
|
</vn>
|