98 lines
2.8 KiB
XML
98 lines
2.8 KiB
XML
|
<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">
|
||
|
<table class="form">
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td class="label">
|
||
|
<label><t>TicketNumber:</t></label>
|
||
|
</td>
|
||
|
<td>
|
||
|
<htk-text column="id" form="ticket"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">
|
||
|
<label><t>DateExit:</t></label>
|
||
|
</td>
|
||
|
<td>
|
||
|
<htk-date-chooser column="date" form="ticket" editable="false"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">
|
||
|
<label><t>SendMethod:</t></label>
|
||
|
</td>
|
||
|
<td>
|
||
|
<htk-text column="Agencia" form="ticket"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">
|
||
|
<label><t>Notes:</t></label>
|
||
|
</td>
|
||
|
<td>
|
||
|
<htk-text column="note" form="ticket"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">
|
||
|
<label for="total"><t>Subtotal:</t></label>
|
||
|
</td>
|
||
|
<td>
|
||
|
<htk-text format="%.2d€">
|
||
|
<db-calc-sum func="subtotal" model="movements"/>
|
||
|
</htk-text>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<htk-grid model="ticket-data">
|
||
|
<htk-column-spin title="_PC" column="zip_code"/>
|
||
|
<htk-column-text title="_City" column="city"/>
|
||
|
<htk-column-text title="_Province" column="province"/>
|
||
|
<htk-column-text title="_Address" column="name"/>
|
||
|
<htk-column-text title="_Consignee" column="consignee"/>
|
||
|
</htk-grid>
|
||
|
<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>
|
||
|
<htk-column-spin title="_ItemNumber" column="item_id"/>
|
||
|
<htk-column-spin title="_Amount" column="amount"/>
|
||
|
<htk-column-text title="_Item" column="concept"/>
|
||
|
<htk-column-text title="_Category" column="Categoria"/>
|
||
|
<htk-column-text title="_S1" column="Medida"/>
|
||
|
<htk-column-text title="_Stems" column="Tallos"/>
|
||
|
<htk-column-text title="_Color" column="Color"/>
|
||
|
<htk-column-text title="_Origin" column="Abreviatura"/>
|
||
|
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
||
|
<htk-column-spin title="_Desc" column="discount" unit="%"/>
|
||
|
<htk-column-spin title="_Subtotal" unit="€" digits="2" renderer="subtotalRenderer"/>
|
||
|
</htk-grid>
|
||
|
</div>
|
||
|
</vn>
|