2015-06-30 12:06:19 +00:00
|
|
|
<vn>
|
|
|
|
<vn-group>
|
2015-07-17 14:34:42 +00:00
|
|
|
<db-form id="order-form" on-ready="onOrderReady">
|
2016-01-15 12:31:08 +00:00
|
|
|
<db-model property="model" result-index="1">
|
2015-11-17 10:34:33 +00:00
|
|
|
<custom>
|
2016-01-15 12:31:08 +00:00
|
|
|
CALL basket_get_vat ();
|
|
|
|
SELECT o.id, o.date_send, o.note, o.company_id,
|
|
|
|
ag.description agency, v.code method,
|
|
|
|
ad.consignee, ad.zip_code, ad.city, ad.name address,
|
2017-03-30 11:44:53 +00:00
|
|
|
t.*, c.credit, clientGetDebt() debt
|
2015-11-17 10:34:33 +00:00
|
|
|
FROM basket o
|
2016-01-15 12:31:08 +00:00
|
|
|
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id
|
|
|
|
LEFT JOIN address_view ad ON ad.id = o.address_id
|
2015-11-17 10:34:33 +00:00
|
|
|
JOIN vn2008.Vistas v ON v.vista_id = o.delivery_method_id
|
|
|
|
JOIN customer_view c
|
2016-01-15 12:31:08 +00:00
|
|
|
JOIN (
|
|
|
|
SELECT
|
|
|
|
IFNULL(SUM(tax_base), 0) tax_base,
|
|
|
|
IFNULL(SUM(vat + surcharge), 0) vat
|
|
|
|
FROM t_order_vat
|
|
|
|
) t;
|
|
|
|
DROP TEMPORARY TABLE t_order_vat;
|
2015-11-17 10:34:33 +00:00
|
|
|
</custom>
|
2015-06-30 12:06:19 +00:00
|
|
|
</db-model>
|
|
|
|
</db-form>
|
2015-07-17 14:34:42 +00:00
|
|
|
<db-query id="confirm-query" on-ready="onConfirm">
|
2015-11-17 10:34:33 +00:00
|
|
|
<custom>
|
2016-01-15 12:31:08 +00:00
|
|
|
CALL basket_confirm ()
|
2015-11-17 10:34:33 +00:00
|
|
|
</custom>
|
2015-07-17 14:34:42 +00:00
|
|
|
</db-query>
|
2015-06-30 12:06:19 +00:00
|
|
|
</vn-group>
|
2017-03-17 12:42:10 +00:00
|
|
|
<h1 id="title">
|
|
|
|
<t>Order summary</t>
|
|
|
|
</h1>
|
2017-03-23 16:20:51 +00:00
|
|
|
<div id="main" class="confirm">
|
2016-12-23 08:57:49 +00:00
|
|
|
<div class="summary form card">
|
2016-01-15 12:31:08 +00:00
|
|
|
<div>
|
|
|
|
<div class="delivery">
|
|
|
|
<p>
|
|
|
|
<t>Delivery at</t>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text format="%D" lot="order-form" name"date_send"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</p>
|
2015-12-15 15:22:46 +00:00
|
|
|
<p>
|
2015-07-17 14:34:42 +00:00
|
|
|
<span id="method"><t>Agency</t></span>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text lot="order-form" name"agency"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2016-01-15 12:31:08 +00:00
|
|
|
<div id="address" class="address">
|
|
|
|
<p>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text lot="order-form" name"consignee"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</p>
|
2015-12-15 15:22:46 +00:00
|
|
|
<p>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text lot="order-form" name"address"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</p>
|
2015-12-15 15:22:46 +00:00
|
|
|
<p>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text lot="order-form" name"zip_code"/>,
|
|
|
|
<htk-text lot="order-form" name"city"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2016-01-15 12:31:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-23 08:57:49 +00:00
|
|
|
<div class="payment form card">
|
2016-01-15 12:31:08 +00:00
|
|
|
<div>
|
|
|
|
<table class="debt-info">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<t>Previous balance</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
|
|
|
<htk-text format="%.2d€" id="debt"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<t>Order total</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text format="%.2d€" lot="order-form" name"tax_base"/>
|
2016-01-15 12:31:08 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<t>Order VAT</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text format="%.2d€" lot="order-form" name"vat"/>
|
2016-01-15 12:31:08 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="total-debt sum-total">
|
|
|
|
<td>
|
|
|
|
<t>Total debt</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
|
|
|
<htk-text format="%.2d€" id="total-debt"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr id="credit-info" class="credit-info">
|
|
|
|
<td>
|
|
|
|
<t>Credit</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text format="%.2d€" lot="order-form" name"credit"/>
|
2016-01-15 12:31:08 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr id="exceeded-info" class="exceeded-info sum-total">
|
|
|
|
<td>
|
|
|
|
<t>Exceeded credit</t>
|
|
|
|
</td>
|
|
|
|
<td class="currency">
|
|
|
|
<htk-text format="%.2d€" id="credit-excess"/>
|
|
|
|
</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"/>
|
|
|
|
<div>
|
|
|
|
<htk-radio radio-group="pay-amount" value="ALL"/>
|
|
|
|
<label>
|
|
|
|
<t>Total debt</t>,
|
|
|
|
<htk-text format="%.2d€" id="total-amount"/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
|
|
|
|
<label>
|
|
|
|
<t>Exceeded credit</t>,
|
|
|
|
<htk-text format="%.2d€" id="excess-amount"/>
|
|
|
|
</label>
|
|
|
|
</div>
|
2015-07-07 15:27:47 +00:00
|
|
|
</div>
|
2016-01-15 12:31:08 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h2>
|
|
|
|
<t>Pay method</t>
|
|
|
|
</h2>
|
|
|
|
<div class="pay-methods radio">
|
|
|
|
<htk-radio-group
|
|
|
|
id="pay-method"
|
|
|
|
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">
|
|
|
|
<custom>
|
|
|
|
SELECT description, iban, entity_id, office, dc, number
|
|
|
|
FROM vn2008.account_customer c
|
|
|
|
</custom>
|
|
|
|
</db-model>
|
|
|
|
<custom>
|
|
|
|
<div class="transfer-account">
|
|
|
|
<p>
|
2017-04-05 14:06:07 +00:00
|
|
|
<htk-text lot="iter" name"description"/>
|
2016-01-15 12:31:08 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2017-04-05 14:06:07 +00:00
|
|
|
<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"/>
|
2016-01-15 12:31:08 +00:00
|
|
|
</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>
|
2015-06-30 12:06:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-01-15 12:31:08 +00:00
|
|
|
<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>
|
2015-06-30 12:06:19 +00:00
|
|
|
</div>
|
2015-07-07 15:27:47 +00:00
|
|
|
</div>
|
2016-10-20 08:37:08 +00:00
|
|
|
<htk-dialog
|
|
|
|
id="success-dialog"
|
|
|
|
icon="ok"
|
|
|
|
message="_Order confirmed successfully"
|
|
|
|
buttons="ACCEPT"
|
|
|
|
on-response="onDialogResponse"/>
|
2015-06-30 12:06:19 +00:00
|
|
|
</vn>
|