Formulario de confirmar pedido muestra información de saldo, ahora se usa la fuente Roboto, ahora ofrece la opción de reintentar pago cuando hay un error, varios errores solucionados

This commit is contained in:
Juan Ferrer Toribio 2016-01-15 13:31:08 +01:00
parent 4675bd4a3e
commit 6a28912da5
55 changed files with 1039 additions and 392 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.322-deb8) stable; urgency=low hedera-web (1.323-deb8) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -33,6 +33,10 @@
{ {
float: right; float: right;
} }
.address .actions > .htk-button
{
margin: 0;
}
.address .actions > * .address .actions > *
{ {
display: inline-block; display: inline-block;

View File

@ -28,6 +28,7 @@
.connections .item > button .connections .item > button
{ {
float: right; float: right;
margin: 0;
} }
.connections .item > p .connections .item > p
{ {

View File

@ -0,0 +1,102 @@
Vn.Queries = new Class
({
Extends: Vn.Form
,activate: function ()
{
this.$('result-index').value = 0;
}
,clean: function ()
{
if (this._grid)
{
this.$('grid-holder').removeChild (this._grid.getNode ());
this._grid.unref ();
this._grid = null;
}
}
,_onExecuteClick: function ()
{
this.clean ();
var model = new Db.Model ({
conn: this.conn,
query: this.$('sql').value,
resultIndex: this.$('result-index').value,
updatable: this.$('updatable').value
});
model.on ('status-changed', this._onModelChange, this);
}
,_onCleanClick: function ()
{
this.clean ();
}
,_onModelChange: function (model, status)
{
if (status !== Db.Model.Status.LOADING)
{
model.disconnect ('status-changed', this._onModelChange, this);
model.unref ();
}
if (status !== Db.Model.Status.READY)
return;
Htk.Toast.showMessage (_('Query executed!'));
var gridHolder = this.$('grid-holder');
if (gridHolder.firstChild)
gridHolder.removeChilds (gridHolder.firstChild);
var grid = new Htk.Grid ();
var columns = model.columns;
for (var i = 0; i < columns.length; i++)
{
var c = columns[i];
switch (c.type)
{
case Db.Conn.Type.BOOLEAN:
var column = new Htk.ColumnCheck ();
break;
case Db.Conn.Type.INTEGER:
var column = new Htk.ColumnSpin ();
break;
case Db.Conn.Type.DOUBLE:
var column = new Htk.ColumnSpin ({digits: 2});
break;
case Db.Conn.Type.DATE:
var column = new Htk.ColumnDate ({format: '%a, %e %b %Y'});
break;
case Db.Conn.Type.DATE_TIME:
var column = new Htk.ColumnDate ({format: '%a, %e %b %Y, %T'});
break;
case Db.Conn.Type.STRING:
default:
var column = new Htk.ColumnText ();
}
column.setProperties ({
title: c.name,
editable: this.$('updatable').value,
columnIndex: i
});
grid.appendColumn (column);
}
grid.model = model;
gridHolder.appendChild (grid.getNode ());
this._grid = grid;
}
});

View File

@ -0,0 +1,25 @@
.queries
{
padding: 1em;
}
.queries .box
{
max-width: 40em;
margin: 0 auto;
}
.queries .form
{
box-sizing: border-box;
padding: 2em;
}
.queries textarea
{
display: block;
width: 100%;
height: 8em;
}
.queries .result
{
margin-top: 1em;
overflow: auto;
}

40
web/forms/admin/queries/ui.xml Executable file
View File

@ -0,0 +1,40 @@
<vn>
<div id="title">
<h1><t>Queries</t></h1>
</div>
<div id="actions">
<htk-button
image="image/dark/ok.svg"
tip="_Execute"
on-click="_onExecuteClick"
showText="true"/>
<htk-button
image="image/dark/delete.svg"
tip="_Clean"
on-click="_onCleanClick"
showText="true"/>
</div>
<div id="form" class="queries">
<div class="box form">
<div class="form-group">
<label><t>SQL query</t></label>
<textarea
id="sql"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
</div>
<div class="form-group">
<label><t>Result index</t></label>
<htk-spin id="result-index"/>
</div>
<div class="form-group">
<label><t>Updatable</t></label>
<htk-check id="updatable"/>
</div>
</div>
<div class="box result">
<div id="grid-holder"/>
</div>
</div>
</vn>

View File

@ -15,6 +15,7 @@
.users-box > button .users-box > button
{ {
float: right; float: right;
margin: 0;
} }
.users-box > p .users-box > p
{ {

View File

@ -159,68 +159,41 @@
/* Lots popup*/ /* Lots popup*/
div.amount .lots-popup .footer
{ {
text-align: center; text-align: center;
background-color: #009688; background-color: #009688;
color: white; color: white;
line-height: 2.5em; line-height: 2em;
padding: 0.2em; padding: .4em;
} }
button.erase .lots-popup .footer > button
{
margin: 0;
}
.lots-popup .erase
{ {
float: left; float: left;
} }
button.confirm .lots-popup .confirm
{ {
float: right; float: right;
} }
button.erase > img, .lots-popup .erase > img,
button.confirm > img .lots-popup .confirm > img
{ {
display: block;
height: 1em; height: 1em;
} }
/* Items */ /* Items */
/*
.catalog .list-view .catalog .second-category
{
margin: 0 auto;
padding: 1em;
max-width: 45em;
min-width: 25em;
}
.items
{
width: 100%;
}
.catalog div.box div.header,
.items > thead > tr,
.realms-bar
{
background-color: #777;
}
.items > tbody > tr
{
height: 4em;
}
.items .icon
{
width: 4em;
padding: 0;
}
.items .icon > img
{
max-height: 2.5em;
max-width: 2.5em;
border-radius: 50%;
}*/
td.second-category
{ {
font-weight: bold; font-weight: bold;
color: orange; color: orange;
} }
td.third-category .catalog .third-category
{ {
font-weight: bold; font-weight: bold;
color: red; color: red;
@ -235,6 +208,38 @@ td.third-category
padding-bottom: 1em; padding-bottom: 1em;
text-align: center; text-align: center;
} }
.catalog .item-info > h2
{
font-weight: normal;
}
.catalog .item-info > p
{
margin: 0;
padding: 0;
color: #777;
font-size: .8em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.grid-view .item-info > .producer
{
text-transform: uppercase;
}
.catalog .item-info > .htk-button
{
margin: -0.3em;
padding: .3em;
}
.catalog .item-info > .htk-button > img
{
vertical-align: middle;
}
.catalog .item-info .from
{
font-size: .8em;
font-style: italic;
}
/* List view */ /* List view */
@ -273,35 +278,21 @@ td.third-category
.list-view .item-info .list-view .item-info
{ {
position: absolute; position: absolute;
left: 4.6em; left: 5.5em;
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: .9em; margin: .9em;
margin-left: 0;
} }
.list-view .item-info > h2 .list-view .item-info > h2
{ {
font-size: 1em; font-size: 1em;
font-weight: normal;
padding: 0; padding: 0;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
.list-view .item-info > p
{
margin: 0;
padding: 0;
color: #777;
font-size: .8em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.list-view .item-info > .producer
{
text-transform: uppercase;
}
.list-view .item-info > .color .list-view .item-info > .color
{ {
display: none; display: none;
@ -312,20 +303,9 @@ td.third-category
bottom: 0; bottom: 0;
right: .3em; right: .3em;
} }
.list-view .item-info .from
{
font-size: .8em;
font-style: italic;
}
.list-view .item-info > .htk-button .list-view .item-info > .htk-button
{ {
float: right; float: right;
margin: -0.3em;
padding: .3em;
}
.list-view .item-info > .htk-button > img
{
vertical-align: middle;
} }
.list-view .item-info > .info-button .list-view .item-info > .info-button
{ {
@ -377,45 +357,20 @@ td.third-category
} }
.grid-view .item-info > h2 .grid-view .item-info > h2
{ {
font-size: 1.2em;
font-weight: normal; font-weight: normal;
padding-top: 0; padding-top: 0;
} }
.grid-view .item-info > p
{
margin: 0;
padding: 0;
color: #777;
font-size: .8em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.grid-view .item-info > .producer
{
text-transform: uppercase;
}
.grid-view .item-info > .aval-price .grid-view .item-info > .aval-price
{ {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 2.8em; right: 2.8em;
} }
.grid-view .item-info .from
{
font-size: .8em;
font-style: italic;
}
.grid-view .item-info .add-button .grid-view .item-info .add-button
{ {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
padding: .3em;
}
.grid-view .item-info .add-button > img
{
vertical-align: middle;
} }
.grid-view .item-info > .info-button .grid-view .item-info > .info-button
{ {

View File

@ -120,7 +120,6 @@
<div id="main" class="main"> <div id="main" class="main">
<htk-repeater <htk-repeater
id="grid-view" id="grid-view"
class="grid-view"
empty-message="_Choose filter from right menu" empty-message="_Choose filter from right menu"
form-id="item" form-id="item"
renderer="gridRenderer" renderer="gridRenderer"
@ -409,7 +408,7 @@
tip="_Add" tip="_Add"
on-clicked="onAddLotClick"/> on-clicked="onAddLotClick"/>
</htk-grid> </htk-grid>
<div class="amount"> <div class="footer">
<button on-click="onEraseClick" title="_Erase" class="erase"> <button on-click="onEraseClick" title="_Erase" class="erase">
<img <img
src="image/dark/delete.svg" src="image/dark/delete.svg"

View File

@ -33,14 +33,98 @@ Vn.Confirm = new Class
Vn.Node.hide (this.$('address')); Vn.Node.hide (this.$('address'));
Vn.Node.setText (this.$('method'), _('Warehouse')); Vn.Node.setText (this.$('method'), _('Warehouse'));
} }
var total = form.get ('tax_base') + form.get ('vat');
if (total === null)
total = 0;
var credit = form.get ('credit');
var debt = form.get ('debt');
var totalDebt = debt + total;
var exceededCredit = totalDebt - credit;
var creditExceededCond = exceededCredit > 0;
if (creditExceededCond)
Htk.Toast.showWarning (
_('You have exceeded your credit.'));
this.$('debt').value = debt;
this.$('total-debt').value = totalDebt;
this.$('total-amount').value = totalDebt;
this.$('credit-excess').value = exceededCredit;
this.$('excess-amount').value = exceededCredit;
this.$('pay-amount').value = 'ALL';
if (credit > 0)
{
this.$('credit-info').style.display = 'table-row';
if (creditExceededCond)
{
this.$('amount-selector').style.display = 'block';
this.$('exceeded-info').style.display = 'table-row';
this.$('pay-amount').value = 'EXCEEDED';
}
} }
,onImportReady: function (form) var methods = [];
if (totalDebt <= 0)
{ {
if (form.row != -1) methods = ['balance'];
this.$('total').value = form.get ('tax_base') + form.get ('vat'); selectedMethod = 'BALANCE';
}
else else
this.$('total').value = null; {
methods = ['card', 'transfer', 'later'];
if (!creditExceededCond)
{
methods.push ('credit');
selectedMethod = 'CREDIT';
}
else
selectedMethod = 'CARD';
}
for (var i = 0; i < methods.length; i++)
this.$(methods[i] +'-method').style.display = 'block';
this.$('pay-method').value = selectedMethod;
}
,onPayMethodChange: function (payMethod)
{
var id = this.displayedInfo;
if (id)
Vn.Node.removeClass (this.$(id), 'selected');
switch (payMethod.value)
{
case 'BALANCE':
id = 'balance-method';
break;
case 'CREDIT':
id = 'credit-method';
break;
case 'CARD':
id = 'card-method';
break;
case 'TRANSFER':
id = 'transfer-method';
break;
default:
id = null;
}
this.displayedInfo = id;
if (id)
Vn.Node.addClass (this.$(id), 'selected');
} }
,disableButtons: function (disable) ,disableButtons: function (disable)
@ -64,15 +148,9 @@ Vn.Confirm = new Class
{ {
this.disableButtons (false); this.disableButtons (false);
var res = resultSet.fetchResult (); if (resultSet.fetchResult ())
if (res)
{ {
Vn.Cookie.unset ('order'); Vn.Cookie.unset ('order');
var debt = resultSet.fetchValue ();
this._pay = debt > this.$('order-form').get ('credit');
this.$('success-dialog').show (); this.$('success-dialog').show ();
} }
} }
@ -84,9 +162,16 @@ Vn.Confirm = new Class
,onPopupClose: function () ,onPopupClose: function ()
{ {
if (this._pay) if (this.$('pay-method').value === 'CARD')
Vn.Tpv.pay (this.conn, this.$('total').value, {
this.$('order-form').get ('company_id')); if (this.$('pay-amount').value === 'EXCEEDED')
var payAmount = this.$('excess-amount').value;
else
var payAmount = this.$('total-amount').value;
var tpv = new Vn.Tpv ({conn: this.conn});
tpv.pay (payAmount, this.$('order-form').get ('company_id'));
}
else else
this.hash.set ({'form': 'ecomerce/orders'}); this.hash.set ({'form': 'ecomerce/orders'});
} }

View File

@ -1,70 +1,125 @@
.confirm .confirm
{ {
padding: 1em; padding: 1em;
max-width: 40em; max-width: 30em;
margin: 0 auto; margin: 0 auto;
color: #555;
}
.confirm .box
{
padding: 2.2em 2.5em;
}
.confirm .summary
{
margin-bottom: 1em;
}
.confirm .address
{
margin-top: .8em;
} }
.confirm h2 .confirm h2
{ {
font-size: 1.1em;
font-weight: normal;
padding: 0; padding: 0;
font-size: 1.6em; margin: 0;
color: black; margin-bottom: .5em;
margin: 0 3em; color: #333;
} }
.confirm .form .confirm button
{
margin: 0 auto;
padding: 2.5em 3em;
color: #555;
}
.confirm .form p.important,
.confirm .form button
{ {
font-size: 1.4em; font-size: 1.4em;
} }
.confirm .form > div.section .confirm p
{
margin-bottom: 1.5em;
}
.confirm .form p
{ {
margin: .2em 0; margin: .2em 0;
} }
.button-bar .confirm .modify-order
{
margin-top: 2em;
}
.modify-order
{ {
float: left; float: left;
} }
.confirm-order .confirm .confirm-order
{ {
float: right; float: right;
} }
.confirm .payment > div
/* Success dialog */
.success-dialog
{ {
padding: 1em; margin-bottom: 1.4em;
max-width: 35em;
font-weight: normal;
color: #555;
} }
.success-dialog img .confirm .payment > .button-bar
{ {
float: left; margin: 0;
height: 3em; margin-top: 1.8em;
margin-top: 0;
margin-right: 1em;
} }
.success-dialog p
/* Table */
.confirm .debt-info
{ {
padding: 0; padding: 0;
} }
.success-dialog > button .confirm .debt-info > table
{ {
margin-top: 0.5em; border-collapse: collapse;
}
.confirm td
{
padding: .15em 0;
}
.confirm .sum-total > td
{
border-top: solid 1px #DDD;
font-weight: bold;
}
.confirm .currency
{
text-align: right;
}
.confirm .credit-info
{
display: none;
}
.confirm .exceeded-info
{
display: none;
color: #E53935;
}
/* Pay */
.confirm .amount-selector,
.confirm .pay-methods > div,
.confirm .pay-info
{
display: none;
}
.confirm .pay-methods > div.selected > .pay-info
{
display: block;
}
.confirm .radio > div
{
margin: .3em 0;
}
.confirm .radio > div > *
{
vertical-align: middle;
}
.confirm .radio > div > input[type=radio]
{
margin: 0;
margin-right: .5em;
}
.confirm .pay-info
{
padding: .5em 1.3em;
}
.confirm .transfer-account
{
margin-top: .5em;
}
.confirm .transfer-account > p
{
margin: .1em 0;
} }

View File

@ -1,56 +1,52 @@
<vn> <vn>
<vn-group> <vn-group>
<db-form id="order-form" on-ready="onOrderReady"> <db-form id="order-form" on-ready="onOrderReady">
<db-model property="model"> <db-model property="model" result-index="1">
<custom> <custom>
CALL basket_get_vat ();
SELECT o.id, o.date_send, o.note, o.company_id, SELECT o.id, o.date_send, o.note, o.company_id,
ag.description agency, v.code method, c.credit, ag.description agency, v.code method,
ad.consignee, ad.zip_code, ad.city, ad.name address ad.consignee, ad.zip_code, ad.city, ad.name address,
t.*, c.credit, customer_get_debt() debt
FROM basket o FROM basket o
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id
LEFT JOIN address_view ad ON ad.id = o.address_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 vn2008.Vistas v ON v.vista_id = o.delivery_method_id
JOIN customer_view c JOIN customer_view c
</custom> JOIN (
</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 SELECT
IFNULL(SUM(tax_base), 0) tax_base, IFNULL(SUM(tax_base), 0) tax_base,
IFNULL(SUM(vat + surcharge), 0) vat IFNULL(SUM(vat + surcharge), 0) vat
FROM t_order_vat; FROM t_order_vat
) t;
DROP TEMPORARY TABLE t_order_vat; DROP TEMPORARY TABLE t_order_vat;
</custom> </custom>
</db-model> </db-model>
</db-form> </db-form>
<db-query id="confirm-query" on-ready="onConfirm"> <db-query id="confirm-query" on-ready="onConfirm">
<custom> <custom>
CALL basket_confirm (); CALL basket_confirm ()
SELECT customer_get_debt();
</custom> </custom>
</db-query> </db-query>
</vn-group> </vn-group>
<div id="title"> <div id="title">
<h1><t>OrderSummary</t></h1> <h1><t>Order summary</t></h1>
</div> </div>
<div id="form" class="confirm"> <div id="form" class="confirm">
<div class="box"> <div class="box summary">
<div class="form"> <div>
<div class="section"> <div class="delivery">
<p class="important"> <p>
<t>Arrival</t> <t>Delivery at</t>
<htk-text format="_%A, %e of %B" form="order-form" column="date_send"/> <htk-text format="%D" form="order-form" column="date_send"/>
</p> </p>
<p> <p>
<span id="method"><t>Agency</t></span> <span id="method"><t>Agency</t></span>
<htk-text form="order-form" column="agency"/> <htk-text form="order-form" column="agency"/>
</p> </p>
</div> </div>
<div id="address" class="section"> <div id="address" class="address">
<p class="important"> <p>
<htk-text form="order-form" column="consignee"/> <htk-text form="order-form" column="consignee"/>
</p> </p>
<p> <p>
@ -61,16 +57,150 @@
<htk-text form="order-form" column="city"/> <htk-text form="order-form" column="city"/>
</p> </p>
</div> </div>
<div class="section"> </div>
<p class="important"> </div>
<t>Total</t> <div class="box payment">
<htk-text id="total" format="%.2d€"/> <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">
<htk-text format="%.2d€" form="order-form" column="tax_base"/>
</td>
</tr>
<tr>
<td>
<t>Order VAT</t>
</td>
<td class="currency">
<htk-text format="%.2d€" form="order-form" column="vat"/>
</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">
<htk-text format="%.2d€" form="order-form" column="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€" 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>
</div>
</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>
<htk-text form="iter" column="description"/>
</p> </p>
<p> <p>
(<t>TaxBase</t> <htk-text form="total-form" column="tax_base" format="%.2d€"/> + <htk-text form="iter" column="iban"/>
<t>VAT</t> <htk-text form="total-form" column="vat" format="%.2d€"/>) <htk-text form="iter" column="entity_id"/>
<htk-text form="iter" column="office"/>
<htk-text form="iter" column="DC"/>
<htk-text form="iter" column="number"/>
</p> </p>
</div> </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"> <div class="button-bar">
<button on-click="onModifyClick" id="modify" class="thin modify-order"> <button on-click="onModifyClick" id="modify" class="thin modify-order">
<t>Modify</t> <t>Modify</t>
@ -82,15 +212,14 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<htk-popup id="success-dialog" modal="true" on-closed="onPopupClose"> <htk-popup id="success-dialog" modal="true" on-closed="onPopupClose">
<div property="child-node" class="success-dialog"> <div property="child-node" class="dialog">
<div> <div>
<img src="image/ok.svg" alt="_Ok"/> <img src="image/ok.svg" alt="_Ok"/>
<p><t>OrderPlacedSuccessfully</t></p> <p><t>Order confirmed successfully</t></p>
<div class="clear"/> <div class="clear"/>
</div> </div>
<button on-click="onAcceptClick" class="thin confirm-order"> <button class="thin" on-click="onAcceptClick">
<t>Accept</t> <t>Accept</t>
</button> </button>
<div class="clear"/> <div class="clear"/>

View File

@ -5,7 +5,14 @@ Vn.Orders = new Class
,activate: function () ,activate: function ()
{ {
Vn.Tpv.check (this.conn); this.tpv = new Vn.Tpv ({conn: this.conn});
this.tpv.check (this._onTpvCheck.bind (this));
}
,_onTpvCheck: function (tpv, tpvOrder, tpvStatus)
{
if (tpvStatus === 'ko')
this.$('error-dialog').show ();
} }
,onBasketClick: function () ,onBasketClick: function ()
@ -44,7 +51,18 @@ Vn.Orders = new Class
var amount = parseFloat (prompt (_('AmountToPay:'), defaultAmountStr)); var amount = parseFloat (prompt (_('AmountToPay:'), defaultAmountStr));
Vn.Tpv.pay (this.conn, amount, null); this.tpv.pay (amount, null);
}
,onCancelPay: function ()
{
this.$('error-dialog').hide ();
}
,onRetryPay: function ()
{
this.$('error-dialog').hide ();
this.tpv.retryPay ();
} }
}); });

View File

@ -57,7 +57,7 @@
<htk-text form="iter" column="total" format="%.2d€"/> <htk-text form="iter" column="total" format="%.2d€"/>
</p> </p>
<p class="important"> <p class="important">
<htk-text form="iter" column="date" format="%A, %e of %B"/> <htk-text form="iter" column="date" format="%D"/>
</p> </p>
<p> <p>
<htk-text form="iter" column="consignee"/> <htk-text form="iter" column="consignee"/>
@ -71,4 +71,20 @@
</htk-repeater> </htk-repeater>
</div> </div>
</div> </div>
<htk-popup id="error-dialog" modal="true">
<div property="child-node" class="dialog">
<div>
<img src="image/error.svg" alt="_Error"/>
<p><t>An error has been in the payment</t></p>
<div class="clear"/>
</div>
<button class="thin" on-click="onRetryPay">
<t>Retry</t>
</button>
<button class="thin" on-click="onCancelPay">
<t>Accept</t>
</button>
<div class="clear"/>
</div>
</htk-popup>
</vn> </vn>

View File

@ -44,4 +44,5 @@
.news .item > button .news .item > button
{ {
float: right; float: right;
margin: 0;
} }

View File

@ -9,10 +9,10 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="ok-dark.svg" sodipodi:docname="ok.svg"
height="13.21348" height="16"
id="svg7384" id="svg7384"
inkscape:version="0.48.5 r10040" inkscape:version="0.91 r13725"
version="1.1" version="1.1"
width="16"> width="16">
<metadata <metadata
@ -32,8 +32,8 @@
bordercolor="#666666" bordercolor="#666666"
borderopacity="1" borderopacity="1"
inkscape:current-layer="layer15" inkscape:current-layer="layer15"
inkscape:cx="8.032386" inkscape:cx="8"
inkscape:cy="6.60674" inkscape:cy="8"
gridtolerance="10" gridtolerance="10"
inkscape:guide-bbox="true" inkscape:guide-bbox="true"
guidetolerance="10" guidetolerance="10"
@ -54,12 +54,12 @@
inkscape:snap-nodes="false" inkscape:snap-nodes="false"
inkscape:snap-others="false" inkscape:snap-others="false"
inkscape:snap-to-guides="true" inkscape:snap-to-guides="true"
inkscape:window-height="1014" inkscape:window-height="1016"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-x="1920" inkscape:window-x="1920"
inkscape:window-y="27" inkscape:window-y="27"
inkscape:zoom="61.755117" inkscape:zoom="51.6875"
fit-margin-top="0" fit-margin-top="0"
fit-margin-left="0" fit-margin-left="0"
fit-margin-right="0" fit-margin-right="0"
@ -85,55 +85,55 @@
id="layer9" id="layer9"
inkscape:label="status" inkscape:label="status"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer10" id="layer10"
inkscape:label="devices" inkscape:label="devices"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer11" id="layer11"
inkscape:label="apps" inkscape:label="apps"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer13" id="layer13"
inkscape:label="places" inkscape:label="places"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer14" id="layer14"
inkscape:label="mimetypes" inkscape:label="mimetypes"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer15" id="layer15"
inkscape:label="emblems" inkscape:label="emblems"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)"> transform="translate(-463.9375,-398.125)">
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
d="m 475.64536,402.5632 -5.32585,5.32584 -2.08987,-2.08989 -2.29214,2.29215 3.23595,3.23594 1.14606,1.14607 1.14607,-1.14607 6.47192,-6.47192 -2.29214,-2.29212 z" d="m 475.64536,401.16994 -5.32585,5.32584 -2.08987,-2.08989 -2.29214,2.29215 3.23595,3.23594 1.14606,1.14608 1.14607,-1.14608 6.47192,-6.47192 -2.29214,-2.29212 z"
id="path5037" id="path5037"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;marker:none;enable-background:accumulate" />
</g> </g>
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="g71291" id="g71291"
inkscape:label="emotes" inkscape:label="emotes"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="g4953" id="g4953"
inkscape:label="categories" inkscape:label="categories"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer12" id="layer12"
inkscape:label="actions" inkscape:label="actions"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -10,9 +10,9 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="ok.svg" sodipodi:docname="ok.svg"
height="13.21348" height="16"
id="svg7384" id="svg7384"
inkscape:version="0.48.5 r10040" inkscape:version="0.91 r13725"
version="1.1" version="1.1"
width="16"> width="16">
<metadata <metadata
@ -33,7 +33,7 @@
borderopacity="1" borderopacity="1"
inkscape:current-layer="layer15" inkscape:current-layer="layer15"
inkscape:cx="8" inkscape:cx="8"
inkscape:cy="6.60674" inkscape:cy="8"
gridtolerance="10" gridtolerance="10"
inkscape:guide-bbox="true" inkscape:guide-bbox="true"
guidetolerance="10" guidetolerance="10"
@ -54,12 +54,12 @@
inkscape:snap-nodes="false" inkscape:snap-nodes="false"
inkscape:snap-others="false" inkscape:snap-others="false"
inkscape:snap-to-guides="true" inkscape:snap-to-guides="true"
inkscape:window-height="1014" inkscape:window-height="1016"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-x="1920" inkscape:window-x="1920"
inkscape:window-y="27" inkscape:window-y="27"
inkscape:zoom="61.755117" inkscape:zoom="51.6875"
fit-margin-top="0" fit-margin-top="0"
fit-margin-left="0" fit-margin-left="0"
fit-margin-right="0" fit-margin-right="0"
@ -85,55 +85,55 @@
id="layer9" id="layer9"
inkscape:label="status" inkscape:label="status"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer10" id="layer10"
inkscape:label="devices" inkscape:label="devices"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer11" id="layer11"
inkscape:label="apps" inkscape:label="apps"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer13" id="layer13"
inkscape:label="places" inkscape:label="places"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer14" id="layer14"
inkscape:label="mimetypes" inkscape:label="mimetypes"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer15" id="layer15"
inkscape:label="emblems" inkscape:label="emblems"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)"> transform="translate(-463.9375,-398.125)">
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
d="m 475.64536,402.5632 -5.32585,5.32584 -2.08987,-2.08989 -2.29214,2.29215 3.23595,3.23594 1.14606,1.14607 1.14607,-1.14607 6.47192,-6.47192 -2.29214,-2.29212 z" d="m 475.64536,401.16994 -5.32585,5.32584 -2.08987,-2.08989 -2.29214,2.29215 3.23595,3.23594 1.14606,1.14608 1.14607,-1.14608 6.47192,-6.47192 -2.29214,-2.29212 z"
id="path5037" id="path5037"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#78d478;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#78d478;fill-opacity:1;stroke:none;stroke-width:3;marker:none;enable-background:accumulate" />
</g> </g>
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="g71291" id="g71291"
inkscape:label="emotes" inkscape:label="emotes"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="g4953" id="g4953"
inkscape:label="categories" inkscape:label="categories"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer12" id="layer12"
inkscape:label="actions" inkscape:label="actions"
style="display:inline" style="display:inline"
transform="translate(-463.9375,-400.91152)" /> transform="translate(-463.9375,-398.125)" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -16,9 +16,9 @@ Db.Conn = new Class ().extend
,Type: ,Type:
{ {
BOOLEAN : 1 BOOLEAN : 1
,INTEGER : 2 ,INTEGER : 3
,DOUBLE : 3 ,DOUBLE : 4
,STRING : 4 ,STRING : 5
,DATE : 8 ,DATE : 8
,DATE_TIME : 9 ,DATE_TIME : 9
} }

View File

@ -62,7 +62,7 @@
{ {
font-weight: normal; font-weight: normal;
font-size: 1.4em; font-size: 1.4em;
padding: .7em .6em; padding: .8em .6em;
padding-right: .3em; padding-right: .3em;
margin: 0; margin: 0;
} }
@ -164,21 +164,22 @@
} }
.vn-gui .user-info .vn-gui .user-info
{ {
position: relative; width: 100%;
overflow: hidden;
} }
.vn-gui .user-info > span .vn-gui .user-info > p
{ {
max-width: 8em; margin: .1em 0;
display: inline-block; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden;
vertical-align: middle;
} }
.vn-gui button.logout .vn-gui button.logout
{ {
float: right; float: right;
margin: 0;
padding: .2em; padding: .2em;
display: block;
} }
.vn-gui button.logout > img .vn-gui button.logout > img
{ {

View File

@ -16,13 +16,13 @@
<button class="logout" on-click="onLogoutClick" title="_Exit"> <button class="logout" on-click="onLogoutClick" title="_Exit">
<img src="image/dark/exit.svg" alt="_Exit"/> <img src="image/dark/exit.svg" alt="_Exit"/>
</button> </button>
<span id="user-name"/> <p id="user-name"/>
</div> </div>
<div id="supplant" class="supplant user-info"> <div id="supplant" class="supplant user-info">
<button class="logout" on-click="onSupplantExitClick" title="_Exit"> <button class="logout" on-click="onSupplantExitClick" title="_Exit">
<img src="image/dark/exit.svg" alt="_Exit"/> <img src="image/dark/exit.svg" alt="_Exit"/>
</button> </button>
<span id="supplanted"/> <p id="supplanted"/>
</div> </div>
</div> </div>
<a id="test-link" class="test-link" href="#"></a> <a id="test-link" class="test-link" href="#"></a>
@ -32,9 +32,6 @@
<a target="_blank" href="https://blog.verdnatura.es/"> <a target="_blank" href="https://blog.verdnatura.es/">
<img alt="Blogger" src="image/blog.svg" title="Blog"/> <img alt="Blogger" src="image/blog.svg" title="Blog"/>
</a> </a>
<a target="_blank" href="http://verdnaturacomunicacion.blogspot.com.es/">
<img alt="Blogger" src="image/blogger.svg" title="Blogger"/>
</a>
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts"> <a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
<img alt="Google+" src="image/google-plus.svg" title="Google+"/> <img alt="Google+" src="image/google-plus.svg" title="Google+"/>
</a> </a>

View File

@ -43,9 +43,6 @@
<a target="_blank" href="https://blog.verdnatura.es/"> <a target="_blank" href="https://blog.verdnatura.es/">
<img alt="Blogger" src="image/blog.svg" title="Blog"/> <img alt="Blogger" src="image/blog.svg" title="Blog"/>
</a> </a>
<a target="_blank" href="http://verdnaturacomunicacion.blogspot.com.es/">
<img alt="Blogger" src="image/blogger.svg" title="Blogger"/>
</a>
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts"> <a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
<img alt="Google+" src="image/google-plus.svg" title="Google+"/> <img alt="Google+" src="image/google-plus.svg" title="Google+"/>
</a> </a>

Binary file not shown.

View File

@ -1,8 +1,8 @@
@font-face @font-face
{ {
font-family: 'Open Sans'; font-family: 'Roboto';
src: url('opensans.ttf') format('truetype'); src: url('roboto.ttf') format('truetype');
} }
@media print @media print
{ {
@ -67,7 +67,7 @@
} }
* *
{ {
font-family: 'Open Sans'; font-family: 'Roboto';
} }
body body
{ {

BIN
web/js/hedera/roboto.ttf Normal file

Binary file not shown.

View File

@ -66,7 +66,7 @@
body body
{ {
color: #333; color: #333;
font-family: 'Open Sans', 'Verdana', 'Sans'; font-family: 'Roboto', 'Verdana', 'Sans';
margin: 0; margin: 0;
} }
label, label,
@ -247,6 +247,7 @@ input[type=reset]
padding: 0.5em; padding: 0.5em;
cursor: pointer; cursor: pointer;
border-radius: 0.1em; border-radius: 0.1em;
margin: -0.5em;
} }
button:hover, button:hover,
input[type=submit]:hover, input[type=submit]:hover,
@ -435,3 +436,35 @@ img.icon
.masonry-box { width: 25%; } .masonry-box { width: 25%; }
} }
/* Dialog */
.dialog
{
padding: 1.5em;
max-width: 35em;
font-weight: normal;
color: #555;
}
.dialog p
{
margin: 0;
}
.dialog img
{
float: left;
height: 3em;
margin-top: 0;
margin-right: 1em;
}
.dialog p
{
padding: 0;
}
.dialog > button
{
float: right;
margin-left: 1em;
margin-top: .5em;
}

View File

@ -1,23 +1,36 @@
Vn.Tpv = Vn.Tpv = new Class
{ ({
check: function (conn) Extends: Vn.Object
{
var tpvStatus = Vn.Hash.get ('tpv_status');
if (tpvStatus) ,tpvOrder: null
,tpvStatus: null
,check: function (callback)
{
this.tpvOrder = Vn.Hash.get ('tpv_order');
this.tpvStatus = Vn.Hash.get ('tpv_status');
if (this.tpvStatus)
{ {
var batch = new Sql.Batch (); var batch = new Sql.Batch ();
batch.addValue ('transaction', Vn.Hash.get ('tpv_order')); batch.addValue ('transaction', this.tpvOrder);
batch.addValue ('status', tpvStatus); batch.addValue ('status', this.tpvStatus);
var query = 'CALL transaction_end (#transaction, #status)'; var query = 'CALL transaction_end (#transaction, #status)';
this.conn.execQuery (query, null, batch);
conn.execQuery (query, null, batch);
}
} }
,pay: function (conn, amount, company) if (callback)
callback (this, this.tpvOrder, this.tpvStatus);
}
,pay: function (amount, company)
{
this._realPpay (amount * 100, company);
}
,_realPpay: function (amount, company)
{ {
if (amount > 0) if (amount > 0)
{ {
@ -25,7 +38,7 @@ Vn.Tpv =
request.add request.add
({ ({
'action': 'tpv' 'action': 'tpv'
,'amount': parseInt (amount * 100) ,'amount': parseInt (amount)
,'urlOk': this._makeUrl ('ok') ,'urlOk': this._makeUrl ('ok')
,'urlKo': this._makeUrl ('ko') ,'urlKo': this._makeUrl ('ko')
,'company': company ,'company': company
@ -38,6 +51,29 @@ Vn.Tpv =
Htk.Toast.showError (_('AmountError')); Htk.Toast.showError (_('AmountError'));
} }
,retryPay: function ()
{
var batch = new Sql.Batch ();
batch.addValue ('transaction', parseInt (this.tpvOrder));
var query = 'SELECT t.amount, m.company_id '
+'FROM tpv_transaction_view t '
+'JOIN tpv_merchant m ON t.merchant_id = m.id '
+'WHERE t.id = #transaction';
this.conn.execQuery (query,
this._onRetryPayDone.bind (this), batch);
}
,_onRetryPayDone: function (resultSet)
{
var res = resultSet.fetchResult ();
if (res.next ())
this._realPpay (res.get ('amount'), res.get ('company_id'));
else
Htk.Toast.showError (_('AmountError'));
}
,_onTransactionStart: function (request, success) ,_onTransactionStart: function (request, success)
{ {
var data = null; var data = null;
@ -104,7 +140,7 @@ Vn.Tpv =
return path; return path;
} }
}; });
Vn.BasketChecker = Vn.BasketChecker =
{ {

View File

@ -7,12 +7,12 @@ Htk.Entry = new Class
{ {
this.createElement ('input'); this.createElement ('input');
this.node.type = 'text'; this.node.type = 'text';
this.node.addEventListener ('change', this.onChange.bind (this)); this.node.addEventListener ('change', this._onChange.bind (this));
this.parent (props); this.parent (props);
} }
,onChange: function (event) ,_onChange: function (event)
{ {
var newValue; var newValue;

View File

@ -1,40 +1,25 @@
Htk.Spin = new Class Htk.Spin = new Class
({ ({
Extends: Htk.Entry Extends: Htk.Field
,Tag: 'htk-spin' ,Tag: 'htk-spin'
,initialize: function (props) ,initialize: function (props)
{ {
var input = this.createElement ('input');
//setInputTypeNumber (input);
this.node.type = 'number';
input.addEventListener ('change', this._onChange.bind (this));
this.unit = null; this.unit = null;
this.digits = 0; this.digits = 0;
this.parent (props); this.parent (props);
} }
,changed: function () ,_onChange: function ()
{ {
var newValue = (this.node.value == '') ? null : parseFloat (this.node.value); var newValue = (this.node.value == '') ? null : parseFloat (this.node.value);
this.node.value = newValue; this.node.value = newValue;
this.realValue = value; this.valueChanged (newValue);
this.signalEmit ('changed');
}
,setEditable: function (editable)
{
if (editable)
{
var input = document.createElement ('input');
input.style.textAlign = 'right';
input.style.width = '100%';
setInputTypeNumber (input);
input.addEventListener ('change', this.changed.bind (this));
this.node.appendChild (input);
this.entry = input;
}
else
{
removeChilds (this.node);
this.entry = null;
}
} }
,putValue: function (value) ,putValue: function (value)
@ -51,9 +36,11 @@ Htk.Spin = new Class
else else
text = ''; text = '';
if (!this.editable) this.node.value = text;
setText (this.node, text); }
else
this.entry.value = text; ,setEditable: function (editable)
{
this.node.readOnly = !editable;
} }
}); });

View File

@ -339,15 +339,18 @@ td.cell-image img
} }
.htk-toast > .message .htk-toast > .message
{ {
background-color: #BFB; background-color: #B3E5FC;
color: #037;
} }
.htk-toast > .warning .htk-toast > .warning
{ {
background-color: #FFB; background-color: #FFE0B2;
color: #C30;
} }
.htk-toast > .error .htk-toast > .error
{ {
background-color: #FBB; background-color: #FFCDD2;
color: #A00;
} }
/* Popup */ /* Popup */

View File

@ -60,6 +60,8 @@ Vn.Date =
,_('Dec') ,_('Dec')
] ]
,tokenD: _('%A, %B %e')
,regexp: new RegExp ('%[a-zA-Z]', 'g') ,regexp: new RegExp ('%[a-zA-Z]', 'g')
,pad: function (number) ,pad: function (number)
@ -106,6 +108,9 @@ Vn.Date =
// Year with 4 digits // Year with 4 digits
case 'Y': return d.getFullYear (); case 'Y': return d.getFullYear ();
// Complete date without year
case 'D': return this.tokenD.replace (this.regexp, this.regexpFunc.bind (this, d));
} }
return token; return token;

View File

@ -0,0 +1,11 @@
{
"Queries": "Consultes"
,"Execute": "Executar"
,"Clean": "Netejar"
,"SQL query": "Consulta SQL"
,"Updatable": "Actualitzable"
,"Query executed!": "Consulta executada!"
}

View File

@ -1,25 +1,37 @@
{ {
"Checkout": "Finalitzar comanda" "Checkout": "Finalitzar comanda"
,"OrderSummary": "Resum de la comanda" ,"Order summary": "Resum de la comanda"
,"Arrival": "Arribada" ,"Delivery at": "Lliurament el"
,"%A, %e of %B": "%A, %e de %B"
,"Agency": "Agència" ,"Agency": "Agència"
,"Warehouse": "Magatzem" ,"Warehouse": "Magatzem"
,"DeliveryAddress": "Adreça d'enviament" ,"Previous balance": "Saldo anterior"
,"Order total": "Total comanda"
,"Order VAT": "IVA comanda"
,"Total debt": "Total deute"
,"Credit": "Crèdit"
,"Exceeded credit": "Crèdit excedit"
,"Import": "Import" ,"Amount to pay": "Quantitat a pagar"
,"TaxBase": "Base imposable" ,"Pay method": "Mètode de pagament"
,"VAT": "IVA"
,"Total": "Total" ,"Use my balance": "Utilitzar el meu saldo"
,"You have a favorable balance.": "No necessites pagar res, tens un saldo faborable."
,"Use my credit": "Utilitzar el meu crèdit"
,"You have a favorable credit.": "No necessites pagar res, tens crèdit faborable."
,"Credit card": "Targeta de crèdit"
,"You will be redirected to the payment.": "En confirmar la comanda seràs redirigit a la plataforma de pagament."
,"Bank Transfer": "Transferència bancària"
,"Make a transfer to one account.": "Fer una transferecia a una de les següents comptes i envia el justificant al teu comercial."
,"Pay later": "Pagar més tard"
,"Cancel": "Cancel"
,"Modify": "Modificar" ,"Modify": "Modificar"
,"Confirm": "Confirmar" ,"Confirm": "Confirmar"
,"OrderPlacedSuccessfully": "La teva comanda ha estat realitzat amb èxit" ,"Order confirmed successfully": "La teva comanda ha estat realitzat amb èxit"
,"OrderReserved": "Hem reservat la teva comanda però sembla que hi ha hagut problemes amb el pagament. Contacta amb el teu comercial."
,"Accept": "D'acord" ,"Accept": "D'acord"
,"PayNow": "Pagar ara"
,"You have exceeded your credit.": "Has excedit el teu crèdit, si us plau realitza el pagament perquè puguem preparar la teva comanda."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "La quantitat ha de ser un nombre positiu i inferior o igual a l'import pendent" ,"AmountError": "La quantitat ha de ser un nombre positiu i inferior o igual a l'import pendent"
,"PayError": "Error al realitzar el pagament" ,"PayError": "Error al realitzar el pagament"
,"%A, %e of %B": "%A, %e de %B" ,"An error has been in the payment": "Sembla que hi ha hagut un error en el pagament"
,"Retry": "Reintenta"
,"Accept": "Acceptar"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Oct" ,"Oct": "Oct"
,"Nov": "Nov" ,"Nov": "Nov"
,"Dec": "Des" ,"Dec": "Des"
,"%A, %B %e": "%A, %e de %B"
}); });

View File

@ -0,0 +1,11 @@
{
"Queries": "Queries"
,"Execute": "Execute"
,"Clean": "Clean"
,"SQL query": "SQL query"
,"Updatable": "Updatable"
,"Query executed!": "Query executed!"
}

View File

@ -1,25 +1,36 @@
{ {
"Checkout": "Checkout" "Checkout": "Checkout"
,"OrderSummary": "Order summary" ,"Order summary": "Order summary"
,"Arrival": "Arrival" ,"Delivery at": "Delivery at"
,"%A, %e of %B": "%A, %e of %B"
,"Agency": "Agency" ,"Agency": "Agency"
,"Warehouse": "Store" ,"Warehouse": "Store"
,"DeliveryAddress": "Delivery address" ,"Previous balance": "Previous balance"
,"Order total": "Order total"
,"Order VAT": "Order VAT"
,"Total debt": "Total debt"
,"Credit": "Credit"
,"Exceeded credit": "Exceeded credit"
,"Import": "Import" ,"Amount to pay": "Amount to pay"
,"TaxBase": "Tax base" ,"Pay method": "Pay method"
,"VAT": "VAT"
,"Total": "Total" ,"Use my balance": "Use my balance"
,"You have a favorable balance.": "You do not need to perform any payment, you have a favorable balance."
,"Use my credit": "Use my credit"
,"You have a favorable credit.": "You do not need to pay now, you have a favorable credit."
,"Credit card": "Credit card"
,"You will be redirected to the payment.": "By confirming the order you will be redirected to the payment platform."
,"Bank Transfer": "Bank Transfer"
,"Make a transfer to one account.": "Make a transfer to one of the following accounts and send the receipt to your salesperson."
,"Pay later": "Pay later"
,"Cancel": "Cancel"
,"Modify": "Modify" ,"Modify": "Modify"
,"Confirm": "Confirm" ,"Confirm": "Confirm"
,"OrderPlacedSuccessfully": "Your order has been confirmed successfully" ,"Order confirmed successfully": "Your order has been confirmed successfully"
,"OrderReserved": "We've booked your order but it seems that there have been problems with payment. Contact your sales."
,"Accept": "Accept" ,"Accept": "Accept"
,"PayNow": "Pay now"
,"You have exceeded your credit.": "You have exceeded your credit, in order to prepare your order please pay your debt."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "The amount must be a positive number less than or equal to the outstanding amount" ,"AmountError": "The amount must be a positive number less than or equal to the outstanding amount"
,"PayError": "Failed to make the payment" ,"PayError": "Failed to make the payment"
,"%A, %e of %B": "%A, %e of %B" ,"An error has been in the payment": "It seems that there has been an error in the payment"
,"Retry": "Retry"
,"Accept": "Accept"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Oct" ,"Oct": "Oct"
,"Nov": "Nov" ,"Nov": "Nov"
,"Dec": "Dic" ,"Dec": "Dic"
,"%A, %B %e": "%A, %B %e"
}); });

View File

@ -0,0 +1,11 @@
{
"Queries": "Consultas"
,"Execute": "Ejecutar"
,"Clean": "Limpiar"
,"SQL query": "Consulta SQL"
,"Updatable": "Actualizable"
,"Query executed!": "¡Consulta ejecutada!"
}

View File

@ -1,25 +1,36 @@
{ {
"Checkout": "Finalizar pedido" "Checkout": "Finalizar pedido"
,"OrderSummary": "Resumen del pedido" ,"Order summary": "Resumen del pedido"
,"Arrival": "Llegada" ,"Delivery at": "Entrega el"
,"%A, %e of %B": "%A, %e de %B"
,"Agency": "Agencia" ,"Agency": "Agencia"
,"Warehouse": "Almacén" ,"Warehouse": "Almacén"
,"DeliveryAddress": "Dirección de envío" ,"Previous balance": "Saldo anterior"
,"Order total": "Total pedido"
,"Order VAT": "IVA pedido"
,"Total debt": "Total deuda"
,"Credit": "Crédito"
,"Exceeded credit": "Crédito excedido"
,"Import": "Importe" ,"Amount to pay": "Cantidad a pagar"
,"TaxBase": "Base imponible" ,"Pay method": "Método de pago"
,"VAT": "IVA"
,"Total": "Total" ,"Use my balance": "Usar mi saldo"
,"You have a favorable balance.": "No necesitas pagar nada, tienes un saldo faborable."
,"Use my credit": "Usar mi crédito"
,"You have a favorable credit.": "No necesitas pagar nada, tienes crédito faborable."
,"Credit card": "Tarjeta de crédito"
,"You will be redirected to the payment.": "Al confirmar el pedido serás redirigido a la plataforma de pago."
,"Bank Transfer": "Transferencia bancaria"
,"Make a transfer to one account.": "Haz una transferecia a una de las siguientes cuentas y envía el justificante a tu comercial."
,"Pay later": "Pagar más tarde"
,"Cancel": "Cancelar"
,"Modify": "Modificar" ,"Modify": "Modificar"
,"Confirm": "Confirmar" ,"Confirm": "Confirmar"
,"OrderPlacedSuccessfully": "Tu pedido ha sido realizado con éxito" ,"Order confirmed successfully": "Tu pedido ha sido realizado con éxito"
,"OrderReserved": "Hemos reservado tu pedido pero parece que ha habido problemas con el pago. Contacta con tu comercial."
,"Accept": "Aceptar" ,"Accept": "Aceptar"
,"PayNow": "Pagar ahora"
,"You have exceeded your credit.": "Has excedido tu crédito, por favor realiza el pago para que podamos preparar tu pedido."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "La cantidad debe ser un número positivo e inferior o igual al importe pendiente" ,"AmountError": "La cantidad debe ser un número positivo e inferior o igual al importe pendiente"
,"PayError": "Error al realizar el pago" ,"PayError": "Error al realizar el pago"
,"%A, %e of %B": "%A, %e de %B" ,"An error has been in the payment": "Parece que ha habido un error en el pago"
,"Retry": "Reintentar"
,"Accept": "Aceptar"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Oct" ,"Oct": "Oct"
,"Nov": "Nov" ,"Nov": "Nov"
,"Dec": "Dic" ,"Dec": "Dic"
,"%A, %B %e": "%A, %e de %B"
}); });

View File

@ -0,0 +1,11 @@
{
"Queries": "Queries"
,"Execute": "Execute"
,"Clean": "Clean"
,"SQL query": "SQL query"
,"Updatable": "Updatable"
,"Query executed!": "Query executed!"
}

View File

@ -1,25 +1,36 @@
{ {
"Checkout": "Finir la commande" "Checkout": "Finir la commande"
,"OrderSummary": "Résumé de la commande" ,"Order summary": "Résumé de la commande"
,"Arrival": "Arrivée" ,"Delivery at": "Livraison à"
,"%A, %e of %B": "%A %e %B"
,"Agency": "Agence" ,"Agency": "Agence"
,"Warehouse": "Entrepôt" ,"Warehouse": "Entrepôt"
,"DeliveryAddress": "Adresse de livraison" ,"Previous balance": "Solde précédent"
,"Order total": "Total de la commande"
,"Order VAT": "TVA de la commande"
,"Total debt": "Total de la dette"
,"Credit": "Crédit"
,"Exceeded credit": "Crédit dépassée"
,"Import": "Montant" ,"Amount to pay": "Montant à payer"
,"TaxBase": "Imposable" ,"Pay method": "Mode de paiement"
,"VAT": "TVA"
,"Total": "Total" ,"Use my balance": "Utiliser mon équilibre"
,"You have a favorable balance.": "Pas besoin de payer quoi que ce soit, vous avez un solde faborable."
,"Use my credit": "Utiliser mon crédit"
,"You have a favorable credit.": "Pas besoin de payer quoi que ce soit, vous faborable crédit."
,"Credit card": "Carte de crédit"
,"You will be redirected to the payment.": "En confirmant la commande, vous serez redirigé vers la plateforme de paiement."
,"Bank Transfer": "Virement bancaire"
,"Make a transfer to one account.": "Faire Transféré à l'un des comptes suivants et envoyer le coupon à votre entreprise."
,"Pay later": "Payer plus tard"
,"Cancel": "Annuler"
,"Modify": "Modifier" ,"Modify": "Modifier"
,"Confirm": "Confirmer" ,"Confirm": "Confirmer"
,"OrderPlacedSuccessfully": "Votre commande a été complété avec succès" ,"Order confirmed successfully": "Votre commande a été complété avec succès"
,"OrderReserved": "Nous avons réservé votre commande, mais il semble qu'il y a eu des problèmes avec le paiement Contactez vos commercial."
,"Accept": "OK" ,"Accept": "OK"
,"PayNow": "Payer maintenant"
,"You have exceeded your credit.": "Vous avez dépassé votre crédit, s'il vous plaît effectuer le paiement afin que nous puissions préparer votre commande."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "La quantité doit être un neméro positif et inférieur ou égal à la somme restant à payer" ,"AmountError": "La quantité doit être un neméro positif et inférieur ou égal à la somme restant à payer"
,"PayError": "Impossible d'effectuer le paiement" ,"PayError": "Impossible d'effectuer le paiement"
,"%A, %e of %B": "%A, %e %B" ,"An error has been in the payment": "Il semble qu'il ya eu une erreur dans le paiement"
,"Retry": "Réessayez"
,"Accept": "Accepter"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Oct" ,"Oct": "Oct"
,"Nov": "Nov" ,"Nov": "Nov"
,"Dec": "Déc" ,"Dec": "Déc"
,"%A, %B %e": "%A, %B %e"
}); });

View File

@ -0,0 +1,11 @@
{
"Queries": "Queries"
,"Execute": "Execute"
,"Clean": "Clean"
,"SQL query": "SQL query"
,"Updatable": "Updatable"
,"Query executed!": "Query executed!"
}

View File

@ -1,25 +1,36 @@
{ {
"Checkout": "Checkout" "Checkout": "Checkout"
,"OrderSummary": "Order summary" ,"Order summary": "Order summary"
,"Arrival": "Arrival" ,"Delivery at": "Delivery at"
,"%A, %e of %B": "%A, %e of %B"
,"Agency": "Agency" ,"Agency": "Agency"
,"Warehouse": "Store" ,"Warehouse": "Store"
,"DeliveryAddress": "Delivery address" ,"Previous balance": "Previous balance"
,"Order total": "Order total"
,"Order VAT": "Order VAT"
,"Total debt": "Total debt"
,"Credit": "Credit"
,"Exceeded credit": "Exceeded credit"
,"Import": "Import" ,"Amount to pay": "Amount to pay"
,"TaxBase": "Tax base" ,"Pay method": "Pay method"
,"VAT": "VAT"
,"Total": "Total" ,"Use my balance": "Use my balance"
,"You have a favorable balance.": "You do not need to perform any payment, you have a favorable balance."
,"Use my credit": "Use my credit"
,"You have a favorable credit.": "You do not need to pay now, you have a favorable credit."
,"Credit card": "Credit card"
,"You will be redirected to the payment.": "By confirming the order you will be redirected to the payment platform."
,"Bank Transfer": "Bank Transfer"
,"Make a transfer to one account.": "Make a transfer to one of the following accounts and send the receipt to your salesperson."
,"Pay later": "Pay later"
,"Cancel": "Cancel"
,"Modify": "Modify" ,"Modify": "Modify"
,"Confirm": "Confirm" ,"Confirm": "Confirm"
,"OrderPlacedSuccessfully": "Your order has been successfully completed" ,"Order confirmed successfully": "Your order has been confirmed successfully"
,"OrderReserved": "We've booked your order but it seems that there have been problems with payment. Contact your sales."
,"Accept": "Accept" ,"Accept": "Accept"
,"PayNow": "Pay now"
,"You have exceeded your credit.": "You have exceeded your credit, in order to prepare your order please pay your debt."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "The amount must be a positive number less than or equal to the outstanding amount" ,"AmountError": "The amount must be a positive number less than or equal to the outstanding amount"
,"PayError": "Failed to make the payment" ,"PayError": "Failed to make the payment"
,"%A, %e of %B": "%A, %e of %B" ,"An error has been in the payment": "It seems that there has been an error in the payment"
,"Retry": "Retry"
,"Accept": "Accept"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Ара" ,"Oct": "Ара"
,"Nov": "Арв" ,"Nov": "Арв"
,"Dec": "Арв" ,"Dec": "Арв"
,"%A, %B %e": "%A, %B %e"
}); });

View File

@ -0,0 +1,11 @@
{
"Queries": "Queries"
,"Execute": "Execute"
,"Clean": "Clean"
,"SQL query": "SQL query"
,"Updatable": "Updatable"
,"Query executed!": "Query executed!"
}

View File

@ -1,25 +1,36 @@
{ {
"Checkout": "Finalizar pedido" "Checkout": "Finalizar pedido"
,"OrderSummary": "Resumo do pedido" ,"Order summary": "Resumo do pedido"
,"Arrival": "Chegada" ,"Delivery at": "Entrega na"
,"%A, %e of %B": "%A, %e de %B"
,"Agency": "Agência" ,"Agency": "Agência"
,"Warehouse": "Armazém" ,"Warehouse": "Armazém"
,"DeliveryAddress": "Endereço de envío" ,"Previous balance": "Equilíbrio anterior"
,"Order total": "Total pedido"
,"Order VAT": "IVA pedido"
,"Total debt": "Total deuda"
,"Credit": "Crédito"
,"Exceeded credit": "Crédito excedido"
,"Import": "Importe" ,"Amount to pay": "Valor devido"
,"TaxBase": "Base tributável" ,"Pay method": "Método de pagamento"
,"VAT": "IVA"
,"Total": "Total" ,"Use my balance": "Use o meu equilíbrio"
,"You have a favorable balance.": "Não há necessidade de pagar qualquer coisa, você tem um saldo faborable."
,"Use my credit": "Use o meu crédito"
,"You have a favorable credit.": "Não há necessidade de pagar nada, você faborable de crédito."
,"Credit card": "Cartão de crédito"
,"You will be redirected to the payment.": "Ao confirmar o pedido, você será redirecionado para a plataforma de pagamento."
,"Bank Transfer": "Transferência bancária"
,"Make a transfer to one account.": "Faça Transferido para uma das seguintes contas e enviar o comprovante para o seu negócio."
,"Pay later": "Pagar mais tarde"
,"Cancel": "Cancelar"
,"Modify": "Modificar" ,"Modify": "Modificar"
,"Confirm": "Confirmar" ,"Confirm": "Confirmar"
,"OrderPlacedSuccessfully": "Seu pedido foi realizado com êxito" ,"Order confirmed successfully": "Seu pedido foi realizado com êxito"
,"OrderReserved": "Seu pedido foi reservado mas parece que houve um problema com o pagamento. Contacte com seu comercial."
,"Accept": "Aceitar" ,"Accept": "Aceitar"
,"PayNow": "Pagar agora"
,"You have exceeded your credit.": "Você ultrapassou o seu crédito, por favor, fazer o pagamento para que possamos preparar a sua ordem."
} }

View File

@ -33,5 +33,7 @@
,"AmountError": "A quantidade deve ser um número positivo e inferior ou igual ao importe pendiente" ,"AmountError": "A quantidade deve ser um número positivo e inferior ou igual ao importe pendiente"
,"PayError": "Erro ao realizar o pagamento" ,"PayError": "Erro ao realizar o pagamento"
,"%A, %e of %B": "%A, %e de %B" ,"An error has been in the payment": "Parece que não houve um erro no pagamento"
,"Retry": "Tentar novamente"
,"Accept": "Aceitar"
} }

View File

@ -41,4 +41,6 @@ Vn.Locale.add
,"Oct": "Out" ,"Oct": "Out"
,"Nov": "Nov" ,"Nov": "Nov"
,"Dec": "Dez" ,"Dec": "Dez"
,"%A, %B %e": "%A, %B %e"
}); });

View File

@ -1,8 +1,8 @@
@font-face @font-face
{ {
font-family: 'Open Sans'; font-family: 'Roboto';
src: url('opensans.ttf') format('truetype'); src: url('roboto.ttf') format('truetype');
} }
body body