Agency text clarified

This commit is contained in:
Juan Ferrer Toribio 2018-02-06 09:57:05 +01:00
parent 584026a909
commit 27aa233237
20 changed files with 154 additions and 38 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.77) stable; urgency=low
hedera-web (1.405.78) stable; urgency=low
* Initial Release.

View File

@ -33,7 +33,8 @@
ON m.agencyFk = a.agencyFk
JOIN vn.deliveryMethod d
ON d.id = m.deliveryMethodFk
WHERE d.code IN ('AGENCY', 'DELIVERY');
WHERE d.code IN ('AGENCY', 'DELIVERY')
ORDER BY m.description;
DROP TEMPORARY TABLE tmp.agencyAvailable;
</custom>
<sql-batch property="batch">
@ -55,7 +56,8 @@
ON m.agencyFk = a.agencyFk
JOIN vn.deliveryMethod d
ON d.id = m.deliveryMethodFk
WHERE d.code IN ('PICKUP');
WHERE d.code IN ('PICKUP')
ORDER BY m.description;
DROP TEMPORARY TABLE tmp.agencyAvailable;
</custom>
<sql-batch property="batch">

View File

@ -28,7 +28,8 @@ Boxes: Caixes
TotalWithVAT: Total amb IVA
PayOrder: Pagar encàrrec
'AmountToPay:': 'Quantitat a pagar (€):'
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
An error has been in the payment: Sembla que hi ha hagut un error en el pagament
Retry: Reintenta

View File

@ -31,6 +31,7 @@ AmountError: >-
The amount must be a positive number less than or equal to the outstanding
amount
PayError: Failed to make the payment
An error has been in the payment: It seems that there has been an error in the payment
An error has been in the payment: >-
It seems that there has been an error in the payment
Retry: Retry
Accept: Accept

View File

@ -32,6 +32,7 @@ AmountError: >-
La quantité doit être un neméro positif et inférieur ou égal à la somme
restant à payer
PayError: Impossible d'effectuer le paiement
An error has been in the payment: Il semble qu'il ya eu une erreur dans le paiement
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

@ -31,6 +31,7 @@ AmountError: >-
The amount must be a positive number less than or equal to the outstanding
amount
PayError: Failed to make the payment
An error has been in the payment: It seems that there has been an error in the payment
An error has been in the payment: >-
It seems that there has been an error in the payment
Retry: Retry
Accept: Accept

View File

@ -1,6 +1,7 @@
OrderDetail: Detall de l'encarrec
Print delivery note: Imprimir albarà
Delivery: Entrega
Agency: Agència
Warehouse: Magatzem
Total: Total
Total + tax: Total + IVA
Tax base: Base imposable

View File

@ -1,6 +1,7 @@
OrderDetail: Order detail
Print delivery note: Print delivery note
Delivery: Delivery
Agency: Agency
Warehouse: Store
Total: Total
Total + tax: Total + tax
Tax base: Tax base

View File

@ -1,6 +1,7 @@
OrderDetail: Detalle del pedido
Print delivery note: Imprimir albarán
Delivery: Entrega
Agency: Agencia
Warehouse: Almacén
Total: Total
Total + tax: Total + IVA
Tax base: Base imponible

View File

@ -1,6 +1,7 @@
OrderDetail: Détails de la commande
Print delivery note: Imprimer bulletin de livraison
Delivery: Livraison
Agency: Agence
Warehouse: Entrepôt
Total: Total
Total + tax: Total + impôt
Tax base: Imposable

View File

@ -1,6 +1,7 @@
OrderDetail: Detalhes da encomenda
Print delivery note: Imprimir nota de entrega
Delivery: Entrega
Agency: Agência
Warehouse: Armazém
Total: Total
Total + tax: Total + IVA
Tax base: Base tributável

View File

@ -19,6 +19,11 @@
border-bottom: 1px solid #DDD;
margin-bottom: 1em;
}
.ticket .address,
.ticket .total
{
margin-top: .8em;
}
.ticket .head > div
{
padding-bottom: .8em;

View File

@ -13,6 +13,14 @@ Hedera.Ticket = new Class
this.conn.execQuery ('CALL myTicketLogAccess (#ticket)', null, batch);
}
,onTicketReady: function (form)
{
if (form.get ('method') != 'PICKUP')
Vn.Node.setText (this.$('method'), _('Agency'));
else
Vn.Node.setText (this.$('method'), _('Warehouse'));
}
,onPrintClick: function ()
{
var batch = new Sql.Batch ();

View File

@ -7,7 +7,7 @@
<item name="ticket" param="ticket-id"/>
</custom>
</sql-batch>
<db-form id="ticket">
<db-form id="ticket" on-ready="onTicketReady">
<db-model id="ticket-data" property="model" batch="batch">
<custom>
CALL myTicketGet (#ticket)
@ -34,11 +34,11 @@
<p>
<htk-text form="ticket" column="landed" format="%D"/>
</p>
</div>
<div>
<p>
<t>Delivery</t> <htk-text form="ticket" column="agency"/>
<span id="method"></span> <htk-text form="ticket" column="agency"/>
</p>
</div>
<div class="address">
<p>
<htk-text form="ticket" column="nickname"/>
</p>
@ -51,7 +51,7 @@
(<htk-text form="ticket" column="province"/>)
</p>
</div>
<div>
<div class="total">
<p class="important total">
<t>Total</t>
<htk-text format="%.2d€" form="ticket" column="taxBase"/>

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.405.77",
"version": "1.405.78",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -2,7 +2,15 @@
Hedera.DeliveryNote = new Class
({
Extends: Hedera.Report
,onTicketReady: function (form)
{
if (form.get ('method') != 'PICKUP')
Vn.Node.setText (this.$('method'), _('Agency'));
else
Vn.Node.setText (this.$('method'), _('Warehouse'));
}
,subtotalRenderer: function (column, form)
{
column.value = this.subtotal (form);

View File

@ -16,11 +16,15 @@ h2
{
margin-bottom: 2em;
}
.header > p
.header > div > p
{
text-align: right;
margin: .1em 0;
}
.address
{
margin-top: .8em;
}
.important
{
font-size: 1.2em;

View File

@ -1,6 +1,6 @@
<vn>
<vn-group>
<db-form id="ticket">
<db-form id="ticket" on-ready="onTicketReady">
<db-model property="model" id="ticket-data" conn="conn" batch="batch">
<custom>
CALL myTicketGet (#ticket)
@ -13,23 +13,27 @@
<htk-text column="id" form="ticket"/>
</h2>
<div class="header">
<p>
<htk-text form="ticket" column="nickname"/>
</p>
<p>
<htk-text form="ticket" column="landed" format="%D"/>
</p>
<p>
<htk-text form="ticket" column="street"/>
</p>
<p>
<htk-text form="ticket" column="postalCode"/>
<htk-text form="ticket" column="city"/>
(<htk-text form="ticket" column="province"/>) aaa
</p>
<p>
<t>Delivery</t> <htk-text form="ticket" column="agency"/>
</p>
<div>
<p>
<htk-text form="ticket" column="landed" format="%D"/>
</p>
<p>
<span id="method"></span> <htk-text form="ticket" column="agency"/>
</p>
</div>
<div class="address">
<p>
<htk-text form="ticket" column="nickname"/>
</p>
<p>
<htk-text form="ticket" column="street"/>
</p>
<p>
<htk-text form="ticket" column="postalCode"/>
<htk-text form="ticket" column="city"/>
(<htk-text form="ticket" column="province"/>)
</p>
</div>
</div>
<htk-grid>
<db-model property="model" id="movements" conn="conn" batch="batch">

55
utils/deploy Executable file
View File

@ -0,0 +1,55 @@
#!/bin/bash
set -e
baseDir=$(dirname "$0")
gitDir="$baseDir/.."
projectName=$(basename "$(realpath "$gitDir")")
buildDir="/tmp/git-deploy/$projectName"
srcDir="$buildDir/src"
repreproDir="/var/cache/reprepro"
codename="stable"
logFile="$buildDir/deploy.log"
echo "Building source code."
echo " * Directory $buildDir"
rm -f "$logFile"
mkdir -p "$srcDir"
git --work-tree="$srcDir" --git-dir="$gitDir" checkout -f
if [ -f "$srcDir/package.json" ]
then
echo "Installing Node dependencies."
(cd "$srcDir" && npm --silent install >> "$logFile")
fi
if [ -f "$srcDir/debian/changelog" ]
then
echo "Cleaning last build."
rm -f "$buildDir/*.deb"
rm -f "$buildDir/*.changes"
rm -f "$buildDir/*.build"
(cd "$srcDir" && debian/rules clean >> "$logFile")
echo "Building Debian packages."
(cd "$srcDir" && debuild -uc -us -b >> "$logFile")
echo "Adding packages to repository."
packages=""
cut -d" " -f1 "$srcDir/debian/files" |
while read debFile
do
if [[ ! "$debFile" =~ .*\.deb$ ]]
then
continue
fi
packageName=$(echo $debFile | cut -d"_" -f1)
packages="$packages $packageName"
echo " * Adding $debFile"
reprepro -b "$repreproDir" includedeb $codename "$buildDir/$debFile" >> "$logFile"
done
fi

21
utils/upgrade Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
set -e
packages=$1
hosts="www1.static.verdnatura.es www2.static.verdnatura.es"
if [ -z "$packages" ]
then
echo "Usage: $(basename $0) package_name..."
exit 1
fi
# FIXME: Packages are not upgraded when config files are changed
echo "Upgrading servers."
for host in $hosts
do
echo " * Upgrading $host"
ssh root@$host "update-repo vn && apt-get install $packages >> /dev/null"
done