hedera-web/web/forms/ecomerce/confirm/ui.xml

100 lines
2.7 KiB
XML
Executable File

<vn>
<vn-group>
<db-form id="order-form" on-ready="onOrderReady">
<db-model property="model">
<custom>
SELECT o.id, o.date_send, o.note, o.company_id,
ag.description agency, v.code method, c.credit,
ad.consignee, ad.zip_code, ad.city, ad.name address
FROM basket o
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id
LEFT JOIN address_view ad ON ad.id = o.address_id
JOIN vn2008.Vistas v ON v.vista_id = o.delivery_method_id
JOIN customer_view c
</custom>
</db-model>
</db-form>
<db-form id="total-form" on-ready="onImportReady">
<db-model property="model" result-index="1">
<custom>
CALL basket_get_vat ();
SELECT
IFNULL(SUM(tax_base), 0) tax_base,
IFNULL(SUM(vat + surcharge), 0) vat
FROM t_order_vat;
DROP TEMPORARY TABLE t_order_vat;
</custom>
</db-model>
</db-form>
<db-query id="confirm-query" on-ready="onConfirm">
<custom>
CALL basket_confirm ();
SELECT customer_get_debt();
</custom>
</db-query>
</vn-group>
<div id="title">
<h1><t>OrderSummary</t></h1>
</div>
<div id="form" class="confirm">
<div class="box">
<div class="form">
<div class="section">
<p class="important">
<t>Arrival</t>
<htk-text format="_%A, %e of %B" form="order-form" column="date_send"/>
</p>
<p>
<span id="method"><t>Agency</t></span>
<htk-text form="order-form" column="agency"/>
</p>
</div>
<div id="address" class="section">
<p class="important">
<htk-text form="order-form" column="consignee"/>
</p>
<p>
<htk-text form="order-form" column="address"/>
</p>
<p>
<htk-text form="order-form" column="zip_code"/>,
<htk-text form="order-form" column="city"/>
</p>
</div>
<div class="section">
<p class="important">
<t>Total</t>
<htk-text id="total" format="%.2d€"/>
</p>
<p>
(<t>TaxBase</t> <htk-text form="total-form" column="tax_base" format="%.2d€"/> +
<t>VAT</t> <htk-text form="total-form" column="vat" format="%.2d€"/>)
</p>
</div>
<div class="button-bar">
<button on-click="onModifyClick" id="modify" class="thin modify-order">
<t>Modify</t>
</button>
<button on-click="onConfirmClick" id="confirm" class="thin confirm-order">
<t>Confirm</t>
</button>
<div class="clear"/>
</div>
</div>
</div>
</div>
<htk-popup id="success-dialog" modal="true" on-closed="onPopupClose">
<div property="child-node" class="success-dialog">
<div>
<img src="image/ok.svg" alt="_Ok"/>
<p><t>OrderPlacedSuccessfully</t></p>
<div class="clear"/>
</div>
<button on-click="onAcceptClick" class="thin confirm-order">
<t>Accept</t>
</button>
<div class="clear"/>
</div>
</htk-popup>
</vn>