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

215 lines
5.2 KiB
XML
Raw Normal View History

<vn>
<vn-group>
2022-10-03 12:49:41 +00:00
<db-form v-model="order" on-ready="onOrderReady">
<db-model property="model" result-index="1">
2019-05-21 14:16:27 +00:00
CALL myBasket_getTax;
2018-05-18 11:52:05 +00:00
SELECT o.id, o.sent, o.notes, o.companyFk,
2019-03-13 08:57:18 +00:00
ag.description agency, v.code method,
ad.nickname, ad.postalCode, ad.city, ad.street,
2019-05-28 14:27:28 +00:00
t.*, c.credit, myClient_getDebt(NULL) debt
2018-05-18 11:52:05 +00:00
FROM myBasket o
JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk
LEFT JOIN myAddress ad ON ad.id = o.addressFk
JOIN vn.deliveryMethod v ON v.id = o.deliveryMethodFk
2018-05-17 10:09:29 +00:00
JOIN myClient c
JOIN (
SELECT
2019-03-13 08:57:18 +00:00
IFNULL(SUM(taxableBase), 0) taxableBase,
IFNULL(SUM(tax), 0) tax
FROM tmp.orderAmount
2018-05-17 10:09:29 +00:00
) t;
2022-10-13 15:01:18 +00:00
DROP TEMPORARY TABLE
tmp.orderAmount,
tmp.orderTax;
</db-model>
</db-form>
2015-07-17 14:34:42 +00:00
<db-query id="confirm-query" on-ready="onConfirm">
2019-05-21 14:16:27 +00:00
CALL myBasket_confirm
2015-07-17 14:34:42 +00:00
</db-query>
</vn-group>
<div id="title">
<h1><t>Order summary</t></h1>
</div>
2015-07-07 15:27:47 +00:00
<div id="form" class="confirm">
2022-05-26 06:08:31 +00:00
<div class="vn-w-sm">
<div class="box vn-pa-lg summary">
<div>
<div class="delivery">
2022-05-26 14:26:20 +00:00
<h6><t>ShippingInformation</t></h6>
2022-05-26 06:08:31 +00:00
<p>
2022-10-03 12:49:41 +00:00
<t>Delivery at</t> {{Vn.Value.format(order.sent, _('%D'))}}
2022-05-26 06:08:31 +00:00
</p>
<p>
2022-10-03 12:49:41 +00:00
<span id="method"><t>Agency</t></span> {{order.agency}}
2022-05-26 06:08:31 +00:00
</p>
</div>
2022-05-26 14:26:20 +00:00
<div id="address" class="address vn-mt-md">
<h6><t>DeliveryAddress</t></h6>
2022-10-03 12:49:41 +00:00
<p>{{order.nickname}}</p>
<p>{{order.street}}</p>
<p>{{order.postalCode}}, {{order.city}}</p>
</div>
2015-07-07 15:27:47 +00:00
</div>
</div>
2022-05-26 06:08:31 +00:00
<div class="box vn-pa-lg payment">
<div>
<table class="debt-info">
<tbody>
<tr>
2022-10-03 12:49:41 +00:00
<td><t>Previous balance</t></td>
2022-05-26 06:08:31 +00:00
<td class="currency">
<htk-text format="%.2d€" id="debt"/>
</td>
</tr>
<tr>
<td>
<t>Order total</t>
</td>
<td class="currency">
2022-10-03 12:49:41 +00:00
{{Vn.Value.format(order.taxableBase, _('%.2d€'))}}
2022-05-26 06:08:31 +00:00
</td>
</tr>
<tr>
<td>
<t>Order VAT</t>
</td>
<td class="currency">
2022-10-03 12:49:41 +00:00
{{Vn.Value.format(order.tax, _('%.2d€'))}}
2022-05-26 06:08:31 +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">
2022-10-03 12:49:41 +00:00
{{Vn.Value.format(order.credit, _('%.2d€'))}}
2022-05-26 06:08:31 +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"/>
2018-05-17 11:22:13 +00:00
<div>
2022-05-26 06:08:31 +00:00
<htk-radio radio-group="pay-amount" value="ALL"/>
<label>
<t>Total debt</t>,
<htk-text format="%.2d€" id="total-amount"/>
</label>
</div>
2018-05-17 11:22:13 +00:00
<div>
2022-05-26 06:08:31 +00:00
<htk-radio radio-group="pay-amount" value="EXCEEDED"/>
<label>
<t>Exceeded credit</t>,
<htk-text format="%.2d€" id="excess-amount"/>
</label>
</div>
</div>
2022-05-26 06:08:31 +00:00
</div>
<div>
2022-05-26 14:26:20 +00:00
<h6><t>Pay method</t></h6>
2022-05-26 06:08:31 +00:00
<div class="pay-methods">
<htk-radio-group
id="pay-method"
on-changed="onPayMethodChange"/>
<div id="balance-method">
<label>
<htk-radio radio-group="pay-method" value="BALANCE"/>
<t>Use my balance</t>
</label>
<div>
<t>You have a favorable balance.</t>
</div>
</div>
2022-05-26 06:08:31 +00:00
<div id="credit-method">
<label>
<htk-radio radio-group="pay-method" value="CREDIT"/>
<t>Use my credit</t>
</label>
<div>
<t>You have a favorable credit.</t>
</div>
</div>
<div id="card-method">
<label>
<htk-radio radio-group="pay-method" value="CARD"/>
<t>Credit card</t>
</label>
<div>
<t>You will be redirected to the payment.</t>
</div>
</div>
<div id="transfer-method">
<label>
<htk-radio radio-group="pay-method" value="TRANSFER"/>
<t>Bank Transfer</t>
</label>
<div>
<t>Make a transfer to one account.</t>
<htk-repeater form-id="iter">
<db-model property="model">
SELECT name, iban FROM mainAccountBank
</db-model>
<custom>
<div class="transfer-account">
2022-10-03 12:49:41 +00:00
<p>{{iter.name}}</p>
<p>{{iter.iban}}</p>
2022-05-26 06:08:31 +00:00
</div>
</custom>
</htk-repeater>
</div>
</div>
<div id="later-method">
<label>
<htk-radio radio-group="pay-method" value="LATER"/>
<t>Pay later</t>
</label>
</div>
</div>
</div>
2022-05-26 14:26:20 +00:00
<div class="button-bar vn-mt-md">
<button
id="modify"
on-click="this.onModifyClick()"
class="modify-order">
2022-05-26 06:08:31 +00:00
<t>Modify</t>
</button>
2022-05-26 14:26:20 +00:00
<button
id="confirm"
on-click="this.onConfirmClick()"
class="confirm-order">
2022-05-26 06:08:31 +00:00
<t>Confirm</t>
</button>
</div>
</div>
</div>
2015-07-07 15:27:47 +00:00
</div>
<htk-dialog
id="success-dialog"
icon="ok"
message="_Order confirmed successfully"
buttons="ACCEPT"
on-response="onDialogResponse"/>
</vn>