From 6f1b96cb4a7f3347a9d84d20d94041db7db7fa13 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 13 Mar 2019 09:57:18 +0100 Subject: [PATCH] #10134 #9819 Fixed --- debian/changelog | 2 +- forms/admin/items/style.css | 7 +- forms/admin/items/ui.xml | 14 ++-- forms/ecomerce/basket/ui.xml | 7 +- forms/ecomerce/confirm/confirm.js | 129 ++++++++++++------------------ forms/ecomerce/confirm/ui.xml | 15 ++-- package.json | 2 +- 7 files changed, 77 insertions(+), 99 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0ecabb61..3e88519f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.406.34) stable; urgency=low +hedera-web (1.406.35) stable; urgency=low * Initial Release. diff --git a/forms/admin/items/style.css b/forms/admin/items/style.css index efe68e09..c702ed05 100644 --- a/forms/admin/items/style.css +++ b/forms/admin/items/style.css @@ -27,10 +27,9 @@ { margin: .1em 0; margin-left: 5em; -} -.items .row > p.important -{ - font-size: 1.2em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } /* Topbar */ diff --git a/forms/admin/items/ui.xml b/forms/admin/items/ui.xml index 711fdfea..b09cc9c0 100644 --- a/forms/admin/items/ui.xml +++ b/forms/admin/items/ui.xml @@ -13,7 +13,8 @@
- SELECT id, longName, size, category, image + SELECT id, longName, size, category, image, + value5, value6, value7 FROM vn.item WHERE longName LIKE CONCAT('%', #filter, '%') OR id = #filter @@ -36,12 +37,15 @@ editable="true" conn="conn"/>

- - - + +

+

+ + +

- + @

diff --git a/forms/ecomerce/basket/ui.xml b/forms/ecomerce/basket/ui.xml index a215b268..5cc6fb6f 100644 --- a/forms/ecomerce/basket/ui.xml +++ b/forms/ecomerce/basket/ui.xml @@ -55,11 +55,8 @@

- - , - - , - + +

diff --git a/forms/ecomerce/confirm/confirm.js b/forms/ecomerce/confirm/confirm.js index f1976a6f..7fec5102 100644 --- a/forms/ecomerce/confirm/confirm.js +++ b/forms/ecomerce/confirm/confirm.js @@ -1,53 +1,46 @@ -Hedera.Confirm = new Class -({ - Extends: Hedera.Form +Hedera.Confirm = new Class({ + Extends: Hedera.Form, - ,open: function () - { - this.close (); + open: function() { + this.close(); this.isOpen = true; - Hedera.BasketChecker.check (this.conn, - this.onBasketCheck.bind (this)); - } + Hedera.BasketChecker.check(this.conn, + this.onBasketCheck.bind(this)); + }, - ,onBasketCheck: function (isOk) - { + onBasketCheck: function(isOk) { if (isOk) - this.loadUi (); - } + this.loadUi(); + }, - ,onOrderReady: function (form) - { + onOrderReady: function(form) { if (form.row < 0) return; - if (form.get ('method') != 'PICKUP') - { - Vn.Node.show (this.$('address')); - Vn.Node.setText (this.$('method'), _('Agency')); - } - else - { - Vn.Node.hide (this.$('address')); - Vn.Node.setText (this.$('method'), _('Warehouse')); + if (form.get('method') != 'PICKUP') { + Vn.Node.show(this.$('address')); + Vn.Node.setText(this.$('method'), _('Agency')); + } else { + Vn.Node.hide(this.$('address')); + Vn.Node.setText(this.$('method'), _('Warehouse')); } - var total = form.get ('taxBase') + form.get ('tax'); + var total = form.get('taxableBase') + form.get('tax'); if (total === null) total = 0; - var credit = form.get ('credit'); - var debt = form.get ('debt'); + var credit = form.get('credit'); + var debt = form.get('debt'); var totalDebt = debt + total; var exceededCredit = totalDebt - credit; var creditExceededCond = exceededCredit > 0; if (creditExceededCond) - Htk.Toast.showWarning ( + Htk.Toast.showWarning( _('You have exceeded your credit.')); this.$('debt').value = debt; @@ -58,12 +51,10 @@ Hedera.Confirm = new Class this.$('pay-amount').value = 'ALL'; - if (credit > 0) - { + if (credit > 0) { this.$('credit-info').style.display = 'table-row'; - if (creditExceededCond) - { + if (creditExceededCond) { this.$('amount-selector').style.display = 'block'; this.$('exceeded-info').style.display = 'table-row'; this.$('pay-amount').value = 'EXCEEDED'; @@ -72,21 +63,16 @@ Hedera.Confirm = new Class var methods = []; - if (totalDebt <= 0) - { + if (totalDebt <= 0) { methods = ['balance']; selectedMethod = 'BALANCE'; - } - else - { + } else { methods = ['card', 'transfer', 'later']; - if (!creditExceededCond) - { - methods.push ('credit'); + if (!creditExceededCond) { + methods.push('credit'); selectedMethod = 'CREDIT'; - } - else + } else selectedMethod = 'CARD'; } @@ -94,17 +80,15 @@ Hedera.Confirm = new Class this.$(methods[i] +'-method').style.display = 'block'; this.$('pay-method').value = selectedMethod; - } + }, - ,onPayMethodChange: function (payMethod) - { + onPayMethodChange: function(payMethod) { var id = this.displayedInfo; if (id) - Vn.Node.removeClass (this.$(id), 'selected'); + Vn.Node.removeClass(this.$(id), 'selected'); - switch (payMethod.value) - { + switch (payMethod.value) { case 'BALANCE': id = 'balance-method'; break; @@ -124,48 +108,41 @@ Hedera.Confirm = new Class this.displayedInfo = id; if (id) - Vn.Node.addClass (this.$(id), 'selected'); - } + Vn.Node.addClass(this.$(id), 'selected'); + }, - ,disableButtons: function (disable) - { + disableButtons: function(disable) { this.$('modify').disabled = disable; this.$('confirm').disabled = disable; - } + }, - ,onModifyClick: function () - { + onModifyClick: function() { window.history.back(); - } + }, - ,onConfirmClick: function () - { - this.disableButtons (true); - this.$('confirm-query').execute (); - } + onConfirmClick: function() { + this.disableButtons(true); + this.$('confirm-query').execute(); + }, - ,onConfirm: function (query, resultSet) - { - this.disableButtons (false); + onConfirm: function(query, resultSet) { + this.disableButtons(false); - if (resultSet.fetchResult ()) - this.$('success-dialog').show (); - } + if (resultSet.fetchResult()) + this.$('success-dialog').show(); + }, - ,onDialogResponse: function () - { - if (this.$('pay-method').value === 'CARD') - { + onDialogResponse: function() { + if (this.$('pay-method').value === 'CARD') { if (this.$('pay-amount').value === 'EXCEEDED') var payAmount = this.$('excess-amount').value; else var payAmount = this.$('total-amount').value; - var tpv = new Hedera.Tpv ({conn: this.conn}); - tpv.pay (payAmount, this.$('order-form').get ('companyFk')); - } - else - this.hash.set ({'form': 'ecomerce/orders'}); + var tpv = new Hedera.Tpv({conn: this.conn}); + 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 1d653e47..90dcf285 100644 --- a/forms/ecomerce/confirm/ui.xml +++ b/forms/ecomerce/confirm/ui.xml @@ -4,9 +4,9 @@ CALL basketGetTax; 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 + ag.description agency, v.code method, + ad.nickname, ad.postalCode, ad.city, ad.street, + t.*, c.credit, myClientGetDebt(NULL) debt FROM myBasket o JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk LEFT JOIN myAddress ad ON ad.id = o.addressFk @@ -14,10 +14,11 @@ JOIN myClient c JOIN ( SELECT - IFNULL(SUM(taxBase), 0) taxBase, - IFNULL(SUM(tax + equalizationTax), 0) tax - FROM tmp.orderTax + IFNULL(SUM(taxableBase), 0) taxableBase, + IFNULL(SUM(tax), 0) tax + FROM tmp.orderAmount ) t; + DROP TEMPORARY TABLE tmp.orderAmount; DROP TEMPORARY TABLE tmp.orderTax; @@ -72,7 +73,7 @@ Order total - + diff --git a/package.json b/package.json index 6fe4b324..19d4ab47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.406.34", + "version": "1.406.35", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {