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 AllowOverride FileInfo Options
Require all granted Require all granted
</Directory> </Directory>

View File

@ -12,7 +12,7 @@
* *
* - http://www.mydomain.org -> config.www.php * - http://www.mydomain.org -> config.www.php
* - http://test.mydomain.org -> config.test.php * - http://test.mydomain.org -> config.test.php
**/ */
return [ 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. * 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 Build-Depends: build-essential, debhelper, nodejs
Standards-Version: 3.9.3 Standards-Version: 3.9.3
Section: misc Section: misc
Homepage: http://www.verdnatura.es Homepage: https://verdnatura.es
Vcs-Git: https://git.verdnatura.es/hedera-web Vcs-Git: https://git.verdnatura.es/hedera-web
Package: hedera-web Package: hedera-web

View File

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

View File

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

View File

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

View File

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

View File

@ -26,9 +26,9 @@ Hedera.Users = new Class
this.onUserSupplant.bind (this)); 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"> renderer="addressRenderer">
<db-model property="model" id="addresses"> <db-model property="model" id="addresses">
<custom> <custom>
SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
FROM address_view a FROM myAddress a
LEFT JOIN vn2008.province p ON a.province_id = p.province_id LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn2008.Paises c ON c.Id = p.Paises_Id JOIN vn.country c ON c.id = p.countryFk
WHERE active != FALSE WHERE a.isActive
</custom> </custom>
</db-model> </db-model>
<custom> <custom>
<div class="address" id="address"> <div class="address" id="address">
<p class="consignee"> <p class="consignee">
<htk-text form="iter" column="consignee"/> <htk-text form="iter" column="nickname"/>
</p> </p>
<p> <p>
<htk-text form="iter" column="name"/> <htk-text form="iter" column="street"/>
</p> </p>
</div> </div>
</custom> </custom>
@ -171,7 +171,7 @@
<htk-text format="%D" param="date"/> <htk-text format="%D" param="date"/>
</p> </p>
<p> <p>
<htk-text form="address-form" column="name"/> <htk-text form="address-form" column="street"/>
</p> </p>
<p> <p>
<t>Agency</t> <t>Agency</t>
@ -191,7 +191,7 @@
<htk-text format="%D" param="date"/> <htk-text format="%D" param="date"/>
</p> </p>
<p> <p>
<htk-text form="address-form" column="name"/> <htk-text form="address-form" column="street"/>
</p> </p>
<p> <p>
<t>ReceiveThroughtRoute</t> <t>ReceiveThroughtRoute</t>

View File

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

View File

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