From 7f2f0372b3cea315e975fc3fa923e35f9e663d28 Mon Sep 17 00:00:00 2001 From: Juan Date: Fri, 18 May 2018 13:52:05 +0200 Subject: [PATCH] SQL refactor --- debian/changelog | 2 +- forms/ecomerce/catalog/ui.xml | 20 ++++++++++---------- forms/ecomerce/confirm/confirm.js | 2 +- forms/ecomerce/confirm/ui.xml | 12 ++++++------ package.json | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index 42ce0a3f..08d7140b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.405.99) stable; urgency=low +hedera-web (1.406.01) stable; urgency=low * Initial Release. diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 01fc8017..39a8fda6 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -212,11 +212,11 @@ conn="conn" result-index="1" on-status-changed="refreshTitle"> - CALL item_available (); + CALL itemGetAvailable; SELECT DISTINCT t.id, l.name FROM vn.item i JOIN vn.itemType t ON t.id = i.typeFk - JOIN tmp.item_available a ON a.item_id = i.id + JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.itemTypeL10n l ON l.id = t.id WHERE #filter ORDER BY name @@ -232,11 +232,11 @@ placeholder="_Color" param="color"> - CALL item_available (); + CALL itemGetAvailable; SELECT DISTINCT l.id, l.name FROM vn.item i JOIN vn.itemType t ON t.id = i.typeFk - JOIN tmp.item_available a ON a.item_id = i.id + JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.inkL10n l ON l.id = i.inkFk WHERE #filter ORDER BY name @@ -254,11 +254,11 @@ placeholder="_Producer" param="producer"> - CALL item_available (); + CALL itemGetAvailable; SELECT DISTINCT p.id, p.name FROM vn.item i JOIN vn.itemType t ON t.id = i.typeFk - JOIN tmp.item_available a ON a.item_id = i.id + JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.producer p ON p.id = i.producerFk WHERE #filter ORDER BY name @@ -276,11 +276,11 @@ placeholder="_Origin" param="origin"> - CALL item_available (); + CALL itemGetAvailable; SELECT DISTINCT o.id, l.name, o.code FROM vn.item i JOIN vn.itemType t ON t.id = i.typeFk - JOIN tmp.item_available a ON a.item_id = i.id + JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.origin o ON o.id = i.originFk JOIN vn.originL10n l ON l.id = o.id WHERE #filter @@ -299,11 +299,11 @@ placeholder="_Category" param="category"> - CALL item_available (); + CALL itemGetAvailable; SELECT DISTINCT i.category, i.category FROM vn.item i JOIN vn.itemType t ON t.id = i.typeFk - JOIN tmp.item_available a ON a.item_id = i.id + JOIN tmp.itemAvailable a ON a.id = i.id WHERE #filter ORDER BY category diff --git a/forms/ecomerce/confirm/confirm.js b/forms/ecomerce/confirm/confirm.js index 1f510b0e..f1976a6f 100644 --- a/forms/ecomerce/confirm/confirm.js +++ b/forms/ecomerce/confirm/confirm.js @@ -162,7 +162,7 @@ Hedera.Confirm = new Class var payAmount = this.$('total-amount').value; var tpv = new Hedera.Tpv ({conn: this.conn}); - tpv.pay (payAmount, this.$('order-form').get ('company_id')); + tpv.pay (payAmount, this.$('order-form').get ('companyFk')); } else this.hash.set ({'form': 'ecomerce/orders'}); diff --git a/forms/ecomerce/confirm/ui.xml b/forms/ecomerce/confirm/ui.xml index 6eaebc9a..1d653e47 100644 --- a/forms/ecomerce/confirm/ui.xml +++ b/forms/ecomerce/confirm/ui.xml @@ -3,14 +3,14 @@ CALL basketGetTax; - SELECT o.id, o.date_send, o.note, o.company_id, + SELECT o.id, o.sent, o.notes, o.companyFk, ag.description agency, v.code method, ad.nickname, ad.postalCode, ad.city, ad.street, t.*, c.credit, myClientGetDebt(NULL) debt - FROM basket o - 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 + FROM myBasket o + JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk + LEFT JOIN myAddress ad ON ad.id = o.addressFk + JOIN vn.deliveryMethod v ON v.id = o.deliveryMethodFk JOIN myClient c JOIN ( SELECT @@ -34,7 +34,7 @@

Delivery at - +

Agency diff --git a/package.json b/package.json index df5647da..e23e4dc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.405.99", + "version": "1.406.01", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {