Code and DB refactor

This commit is contained in:
Juan Ferrer Toribio 2018-01-22 09:52:43 +01:00
parent 3d222a5d53
commit 6acf00a556
12 changed files with 28 additions and 30 deletions

View File

@ -22,4 +22,3 @@
AllowOverride FileInfo Options
Require all granted
</Directory>

View File

@ -12,7 +12,7 @@
*
* - http://www.mydomain.org -> config.www.php
* - http://test.mydomain.org -> config.test.php
**/
*/
return [
/**
@ -27,4 +27,3 @@ return [
]
];

2
debian/changelog vendored
View File

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

2
debian/control vendored
View File

@ -4,7 +4,7 @@ Maintainer: Juan Ferrer Toribio <juan@verdnatura.es>
Build-Depends: build-essential, debhelper, nodejs
Standards-Version: 3.9.3
Section: misc
Homepage: http://www.verdnatura.es
Homepage: https://verdnatura.es
Vcs-Git: https://git.verdnatura.es/hedera-web
Package: hedera-web

View File

@ -26,7 +26,7 @@ Hedera.AddressList = new Class
{
if (confirm (_('AreYouSureDeleteAddress')))
{
form.set ('active', false);
form.set ('isActive', false);
form.refresh ();
}
}

View File

@ -11,11 +11,11 @@
<db-model id="addresses" updatable="true">
<custom>
SELECT a.id, a.nickname, p.name province, a.postalCode,
a.city, a.street, a.active, c.country
a.city, a.street, a.isActive, c.country
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.active != FALSE
WHERE a.isActive
</custom>
</db-model>
</vn-group>

View File

@ -15,7 +15,7 @@
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.active AND a.id = #address
WHERE a.id = #address
</custom>
<sql-batch property="batch">
<custom>

View File

@ -53,7 +53,7 @@
<htk-combo form="user-form" column="lang">
<db-model property="model">
<custom>
SELECT code, name FROM language WHERE active
SELECT code, name FROM language WHERE isActive
</custom>
</db-model>
</htk-combo>

View File

@ -26,9 +26,9 @@ Hedera.Users = new Class
this.onUserSupplant.bind (this));
}
,onUserSupplant: function (userName)
,onUserSupplant: function ()
{
this.hash.set ({'form': 'ecomerce/orders'});
this.hash.set ({form: 'ecomerce/orders'});
}
});

View File

@ -123,20 +123,20 @@
renderer="addressRenderer">
<db-model property="model" id="addresses">
<custom>
SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
FROM address_view a
LEFT JOIN vn2008.province p ON a.province_id = p.province_id
JOIN vn2008.Paises c ON c.Id = p.Paises_Id
WHERE active != FALSE
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.isActive
</custom>
</db-model>
<custom>
<div class="address" id="address">
<p class="consignee">
<htk-text form="iter" column="consignee"/>
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="name"/>
<htk-text form="iter" column="street"/>
</p>
</div>
</custom>
@ -171,7 +171,7 @@
<htk-text format="%D" param="date"/>
</p>
<p>
<htk-text form="address-form" column="name"/>
<htk-text form="address-form" column="street"/>
</p>
<p>
<t>Agency</t>
@ -191,7 +191,7 @@
<htk-text format="%D" param="date"/>
</p>
<p>
<htk-text form="address-form" column="name"/>
<htk-text form="address-form" column="street"/>
</p>
<p>
<t>ReceiveThroughtRoute</t>

View File

@ -6,13 +6,13 @@
CALL basketGetTax;
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,
ad.nickname, ad.postalCode, ad.city, ad.street,
t.*, c.credit, myClientGetDebt(NULL) debt
FROM basket o
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_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 customer_view c
JOIN vn.agencyMode ag ON ag.id = o.agency_id
LEFT JOIN myAddress ad ON ad.id = o.address_id
JOIN vn.deliveryMethod v ON v.id = o.delivery_method_id
JOIN myClient c
JOIN (
SELECT
IFNULL(SUM(taxBase), 0) taxBase,
@ -47,13 +47,13 @@
</div>
<div id="address" class="address">
<p>
<htk-text form="order-form" column="consignee"/>
<htk-text form="order-form" column="nickname"/>
</p>
<p>
<htk-text form="order-form" column="address"/>
<htk-text form="order-form" column="street"/>
</p>
<p>
<htk-text form="order-form" column="zip_code"/>,
<htk-text form="order-form" column="postalCode"/>,
<htk-text form="order-form" column="city"/>
</p>
</div>

View File

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