221 lines
5.6 KiB
XML
Executable File
221 lines
5.6 KiB
XML
Executable File
<vn>
|
|
<vn-group>
|
|
<vn-basic-set id="lot"/>
|
|
<db-form id="order" on-ready="onOrderReady">
|
|
<db-model property="model" result-index="1">
|
|
CALL basket_get_vat ();
|
|
SELECT o.id, o.date_send sendDate, o.note, o.company_id company,
|
|
ag.description agency, v.code method,
|
|
ad.consignee, ad.zip_code zipCode, ad.city, ad.name address,
|
|
t.*, c.credit, clientGetDebt() debt
|
|
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
|
|
JOIN (
|
|
SELECT
|
|
IFNULL(SUM(tax_base), 0) taxBase,
|
|
IFNULL(SUM(vat + surcharge), 0) vat
|
|
FROM t_order_vat
|
|
) t;
|
|
DROP TEMPORARY TABLE t_order_vat;
|
|
</db-model>
|
|
</db-form>
|
|
<db-query id="confirm-query" on-ready="onConfirm">
|
|
CALL basket_confirm ()
|
|
</db-query>
|
|
</vn-group>
|
|
<h1 id="title">
|
|
<t>Order summary</t>
|
|
</h1>
|
|
<div id="main" class="confirm">
|
|
<div class="summary form card">
|
|
<div>
|
|
<div class="delivery">
|
|
<p>
|
|
<t>Delivery at</t>
|
|
<htk-text format="%D" lot="order" name="sendDate"/>
|
|
</p>
|
|
<p>
|
|
<span id="method"><t>Agency</t></span>
|
|
<htk-text lot="order" name="agency"/>
|
|
</p>
|
|
</div>
|
|
<div id="address" class="address">
|
|
<p>
|
|
<htk-text lot="order" name="consignee"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="order" name="address"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="order" name="zipCode"/>,
|
|
<htk-text lot="order" name="city"/>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="payment form card">
|
|
<div>
|
|
<table class="debt-info">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<t>Previous balance</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="order" name="debt"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<t>Order total</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="order" name="taxBase"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<t>Order VAT</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="order" name="vat"/>
|
|
</td>
|
|
</tr>
|
|
<tr class="total-debt sum-total">
|
|
<td>
|
|
<t>Total debt</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="lot" name="totalDebt"/>
|
|
</td>
|
|
</tr>
|
|
<tr id="credit-info" class="credit-info">
|
|
<td>
|
|
<t>Credit</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="order" name="credit"/>
|
|
</td>
|
|
</tr>
|
|
<tr id="exceeded-info" class="exceeded-info sum-total">
|
|
<td>
|
|
<t>Exceeded credit</t>
|
|
</td>
|
|
<td class="currency">
|
|
<htk-text format="%.2d€" lot="lot" name="exceededCredit"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="amount-selector" class="amount-selector">
|
|
<h2>
|
|
<t>Amount to pay</t>
|
|
</h2>
|
|
<div class="radio">
|
|
<htk-radio-group
|
|
id="pay-amount"
|
|
lot="lot"
|
|
name="payAmount"/>
|
|
<div>
|
|
<htk-radio radio-group="pay-amount" value="ALL"/>
|
|
<label>
|
|
<t>Total debt</t>,
|
|
<htk-text format="%.2d€" lot="lot" name="totalDebt"/>
|
|
</label>
|
|
</div>
|
|
<div>
|
|
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
|
|
<label>
|
|
<t>Exceeded credit</t>,
|
|
<htk-text format="%.2d€" lot="lot" name="exceededCredit"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h2>
|
|
<t>Pay method</t>
|
|
</h2>
|
|
<div class="pay-methods radio">
|
|
<htk-radio-group
|
|
lot="lot"
|
|
id="pay-method"
|
|
name="payMethod"
|
|
on-changed="onPayMethodChange"/>
|
|
<div id="balance-method">
|
|
<htk-radio radio-group="pay-method" value="BALANCE"/>
|
|
<label><t>Use my balance</t></label>
|
|
<div class="pay-info">
|
|
<t>You have a favorable balance.</t>
|
|
</div>
|
|
</div>
|
|
<div id="credit-method">
|
|
<htk-radio radio-group="pay-method" value="CREDIT"/>
|
|
<label><t>Use my credit</t></label>
|
|
<div class="pay-info">
|
|
<t>You have a favorable credit.</t>
|
|
</div>
|
|
</div>
|
|
<div id="card-method">
|
|
<htk-radio radio-group="pay-method" value="CARD"/>
|
|
<label><t>Credit card</t></label>
|
|
<div class="pay-info">
|
|
<t>You will be redirected to the payment.</t>
|
|
</div>
|
|
</div>
|
|
<div id="transfer-method">
|
|
<htk-radio radio-group="pay-method" value="TRANSFER"/>
|
|
<label><t>Bank Transfer</t></label>
|
|
<div class="pay-info">
|
|
<t>Make a transfer to one account.</t>
|
|
<htk-repeater form-id="iter">
|
|
<db-model property="model">
|
|
SELECT description, iban, entity_id, office, dc, number
|
|
FROM vn2008.account_customer c
|
|
</db-model>
|
|
<custom>
|
|
<div class="transfer-account">
|
|
<p>
|
|
<htk-text lot="iter" name="description"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="iter" name="iban"/>
|
|
<htk-text lot="iter" name="entity_id"/>
|
|
<htk-text lot="iter" name="office"/>
|
|
<htk-text lot="iter" name="dc"/>
|
|
<htk-text lot="iter" name="number"/>
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
</div>
|
|
</div>
|
|
<div id="later-method">
|
|
<htk-radio radio-group="pay-method" value="LATER"/>
|
|
<label><t>Pay later</t></label>
|
|
</div>
|
|
</div>
|
|
</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>
|
|
<htk-dialog
|
|
id="success-dialog"
|
|
icon="ok"
|
|
message="_Order confirmed successfully"
|
|
buttons="ACCEPT"
|
|
on-response="onDialogResponse"/>
|
|
</vn>
|