From 8af6e0ca2bab7078a7c85b84ac1dee65ac2d9422 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 25 Aug 2015 11:16:13 +0200 Subject: [PATCH] =?UTF-8?q?Adaptaci=C3=B3n=20al=20nuevo=20calculo=20del=20?= =?UTF-8?q?bionic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/links | 2 +- web/forms/ecomerce/basket/ui.xml | 14 +++++----- web/forms/ecomerce/catalog/catalog.js | 5 +--- web/forms/ecomerce/catalog/style.css | 5 ++-- web/forms/ecomerce/catalog/ui.xml | 38 +++++++++------------------ web/js/htk/column/image.js | 2 +- 6 files changed, 24 insertions(+), 42 deletions(-) diff --git a/debian/links b/debian/links index 1a36d1b2..97b506b0 100644 --- a/debian/links +++ b/debian/links @@ -1 +1 @@ -etc/hedera-web/apache.conf etc/apache/conf-available/hedera-web.conf +etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf diff --git a/web/forms/ecomerce/basket/ui.xml b/web/forms/ecomerce/basket/ui.xml index d1db27df..2675029d 100755 --- a/web/forms/ecomerce/basket/ui.xml +++ b/web/forms/ecomerce/basket/ui.xml @@ -17,14 +17,12 @@
- - CALL bionic_from_basket (@calc); - SELECT m.id, m.amount, t.available, a.Article, a.Categoria, - a.Medida, a.Tallos, a.Color, o.Abreviatura, m.price price, a.Foto - FROM basket_item m - INNER JOIN vn2008.Articles a ON a.Id_Article = m.item_id - LEFT JOIN vn2008.Origen o ON a.id_origen = o.id - LEFT JOIN cache.bionic t ON m.warehouse_id = t.warehouse_id AND m.item_id = t.item_id AND t.calc_id = @calc; + + SELECT i.id, i.amount, i.price, a.Article, a.Categoria, + a.Medida, a.Tallos, a.Color, o.Abreviatura, a.Foto + FROM basket_item i + INNER JOIN vn2008.Articles a ON a.Id_Article = i.item_id + LEFT JOIN vn2008.Origen o ON a.id_origen = o.id; diff --git a/web/forms/ecomerce/catalog/catalog.js b/web/forms/ecomerce/catalog/catalog.js index 5ee44317..f513ad07 100755 --- a/web/forms/ecomerce/catalog/catalog.js +++ b/web/forms/ecomerce/catalog/catalog.js @@ -187,10 +187,7 @@ Vn.Catalog = new Class ,onAddItemClick: function (column, value, row, button) { var itemId = this.$('items-model').get (row, 'item_id') - - var batch = this.$('lots-batch'); - batch.addValue ('item', itemId); - batch.changed (); + this.$('lots-batch').addValue ('item', itemId); this.itemId = itemId; this.onEraseClick (); diff --git a/web/forms/ecomerce/catalog/style.css b/web/forms/ecomerce/catalog/style.css index 6cb08fde..9130f25a 100755 --- a/web/forms/ecomerce/catalog/style.css +++ b/web/forms/ecomerce/catalog/style.css @@ -207,9 +207,8 @@ div.amount text-align: center; background-color: #009688; color: white; - height: 2em; - line-height: 2em; - padding: 0.4em; + line-height: 2.5em; + padding: 0.2em; } button.erase { diff --git a/web/forms/ecomerce/catalog/ui.xml b/web/forms/ecomerce/catalog/ui.xml index 90b64a40..03c22679 100755 --- a/web/forms/ecomerce/catalog/ui.xml +++ b/web/forms/ecomerce/catalog/ui.xml @@ -23,20 +23,13 @@ GROUP BY warehouse_id - CALL bionic_from_type (@calc, #type); - SELECT t.item_id, SUM(t.available) - IFNULL(m.amount, 0) available, MIN(t.price) price, + CALL bionic_from_type (#type); + SELECT t.item_id, t.available, t.price, a.Foto, a.Article, a.Categoria, a.Medida, a.Tallos, a.Color, o.Abreviatura - FROM cache.bionic t + FROM vn2008.t_bionic_item t JOIN vn2008.Articles a ON a.Id_Article = t.item_id LEFT JOIN vn2008.Origen o ON a.id_origen = o.id - LEFT JOIN ( - SELECT item_id, SUM(amount) amount - FROM basket_item - GROUP BY item_id - ) m - ON m.item_id = t.item_id - WHERE t.calc_id = @calc AND t.available > 0 - GROUP BY item_id + WHERE t.available > 0 ORDER BY a.Article, a.Medida LIMIT 400; @@ -44,27 +37,21 @@ - CALL bionic_from_type (@calc, #type); - SELECT l.warehouse_id, l.items, l.grouping, l.price, l.rate, - t.amount, b.available - IFNULL(t.amount, 0) available - FROM cache.bionic b + CALL bionic_from_item (#item); + SELECT p.warehouse_id, p.items, p.grouping, p.price, p.rate, + t.amount, l.available - IFNULL(t.amount, 0) available + FROM vn2008.t_bionic_lot l + JOIN vn2008.t_bionic_price p + ON p.warehouse_id = l.warehouse_id LEFT JOIN ( SELECT warehouse_id, SUM(amount) amount FROM basket_item WHERE item_id = #item GROUP BY warehouse_id ) t - ON t.warehouse_id = b.warehouse_id - JOIN cache.bionic_lot l - ON l.warehouse_id = b.warehouse_id - AND l.item_id = b.item_id - AND l.calc_id = @calc - WHERE b.calc_id = @calc - AND b.item_id = #item + ON t.warehouse_id = l.warehouse_id ORDER BY warehouse_id, grouping; - - - +
@@ -174,6 +161,7 @@ src="image/dark/ok.svg" alt="_Confirm"/> +