Merge with master

This commit is contained in:
Juan Ferrer Toribio 2017-11-24 12:38:07 +01:00
commit 42b5662b23
10 changed files with 34 additions and 19 deletions

1
debian/cron.d vendored
View File

@ -5,4 +5,3 @@ MAILTO=webmaster
0 5 * * * root hedera-web.php -m edi/update
*/1 * * * * root hedera-web.php -m misc/mail
0 5 * * * root hedera-web.php -m misc/exchange-rate
45 14 20 11 * root hedera-web.php -m misc/exchange-rate

View File

@ -4,6 +4,8 @@
,"Username": "Nom d'usuari"
,"Password": "Contrasenya"
,"Email": "Correu electrònic"
,"Display name": "Nom a mostrar"
,"Language": "Idioma"
,"Billing": "Facturació"
,"Receive invoices by email": "Rebre factures per correu electrònic"

View File

@ -4,6 +4,8 @@
,"Username": "Username"
,"Password": "Password"
,"Email": "Email"
,"Display name": "Display name"
,"Language": "Language"
,"Billing": "Billing"
,"Receive invoices by email": "Receive invoices by email"

View File

@ -4,6 +4,8 @@
,"Username": "Nombre de usuario"
,"Password": "Contraseña"
,"Email": "Correo electrónico"
,"Display name": "Nombre a mostrar"
,"Language": "Idioma"
,"Billing": "Facturación"
,"Receive invoices by email": "Recibir facturas por correo electrónico"

View File

@ -4,6 +4,8 @@
,"Username": "Utilisateur"
,"Password": "Mot de passe"
,"Email": "Courriel"
,"Display name": "Nom à afficher"
,"Language": "Langage"
,"Billing": "Facturation"
,"Receive invoices by email": "Recevoir des factures par e-mail"

View File

@ -4,6 +4,8 @@
,"Username": "Nome de usuario"
,"Password": "Palavra-Passe"
,"Email": "E-Mail"
,"Display name": "Nome para mostrar"
,"Language": "Linguagem"
,"Billing": "Facturação"
,"Receive invoices by email": "Receber facturas por e-mail"

View File

@ -1,14 +1,13 @@
<vn>
<vn-group>
<db-form id="password-form">
<db-model property="model">
SELECT length, nAlpha, nUpper, nDigits, nPunct
FROM account.userPassword
</db-model>
</db-form>
<db-lot id="password-form">
SELECT length, nAlpha, nUpper, nDigits, nPunct
FROM account.userPassword
</db-lot>
<db-form id="user">
<db-model property="model" id="user-model" updatable="true">
SELECT u.id, u.name, u.email, u.recoverPass, c.mail, c.user_id
SELECT u.id, u.name, u.email, u.recoverPass,
u.nickname, u.lang, c.mail, c.user_id
FROM account.userView u
LEFT JOIN customer_view c
ON u.id = c.user_id
@ -38,6 +37,19 @@
<label for="email">_Email</label>
<htk-entry lot="user" name="email"></htk-entry>
</div>
<div>
<label for="nickname">_Display name</label>
<htk-entry lot="user" name="nickname"/>
</div>
<div>
<label for="lang">_Language</label>
<htk-combo lot="user" name="lang"
value-field="code">
<db-model property="model">
SELECT code, name FROM language WHERE active
</db-model>
</htk-combo>
</div>
<div>
<span>
<htk-check id="mail" lot="user" name="mail"/>

View File

@ -1,7 +1,7 @@
<vn>
<vn-lot id="new-version"/>
<db-lot id="user">
SELECT name FROM customer_user
SELECT nickname FROM account.userView
</db-lot>
<db-query id="config-query" on-ready="onConfigQueryReady">
SELECT default_form, image_dir, image_host FROM config;
@ -24,7 +24,7 @@
<button class="logout" on-click="onLogoutClick" title="_Exit">
<img src="image/icon/dark/exit.svg" alt="_Exit"/>
</button>
<p>{{user.name}}</p>
<p>{{user.nickname}}</p>
</div>
<div id="supplant" class="user-info">
<button class="logout" on-click="onSupplantExitClick" title="_Exit">

View File

@ -22,9 +22,9 @@ class ExchangeRate extends Vn\Lib\Method
{
$xmlDate = new DateTime ($cube['time']);
// Si existen datos m<EFBFBD>s recientes de la m<>xima fecha los a<>ade
// Si existen datos más recientes de la máxima fecha los añade
if ($maxDate < $xmlDate)
if ($maxDate <= $xmlDate)
foreach ($cube->Cube as $subCube)
if ($subCube['currency'] == 'USD')
{
@ -37,15 +37,9 @@ class ExchangeRate extends Vn\Lib\Method
VALUES (2, #date, #rate)',
$params
);
$db->query (
'REPLACE INTO reference_rate (moneda_id, date, rate)
VALUES (2, TIMESTAMPADD(DAY, 1, #date), #rate)',
$params
);
}
}
$db->queryFromFile (__DIR__.'/exrate-add');
}
}

View File

@ -3,4 +3,4 @@ INSERT INTO reference_rate (moneda_id, date, rate)
FROM reference_rate r1
LEFT JOIN reference_rate r2
ON TIMESTAMPADD(DAY, 1, r1.date) = r2.date
WHERE r2.date IS NULL AND r1.date < TIMESTAMPADD (DAY, -1, CURDATE())
WHERE r2.date IS NULL AND r1.date < TIMESTAMPADD (DAY, -2, CURDATE())