diff --git a/back/model-config.json b/back/model-config.json index 0a0772b04a..537ffb569c 100644 --- a/back/model-config.json +++ b/back/model-config.json @@ -32,9 +32,6 @@ "Sip": { "dataSource": "vn" }, - "Route": { - "dataSource": "vn" - }, "Vehicle": { "dataSource": "vn" }, diff --git a/back/models/route.json b/back/models/route.json deleted file mode 100644 index 1bfddd3de1..0000000000 --- a/back/models/route.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Route", - "base": "VnModel", - "options": { - "mysql": { - "table": "route" - } - }, - "properties": { - "id": { - "type": "Number", - "id": true, - "description": "Identifier" - }, - "date": { - "type": "date" - } - } -} \ No newline at end of file diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 8b4b0e1846..d84dc3f052 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -490,6 +490,7 @@ export default { orderBasicData: { clientAutocomplete: `vn-autocomplete[label="Client"]`, addressAutocomplete: `vn-autocomplete[label="Address"]`, + agencyAutocomplete: `vn-autocomplete[label="Agency"]`, observationInput: `vn-textarea[label="Observation"] textarea`, saveButton: `${components.vnSubmit}` }, diff --git a/e2e/paths/order-module/01_edit_basic_data.spec.js b/e2e/paths/order-module/01_edit_basic_data.spec.js index 0efcc4f8c6..633c9d3380 100644 --- a/e2e/paths/order-module/01_edit_basic_data.spec.js +++ b/e2e/paths/order-module/01_edit_basic_data.spec.js @@ -64,6 +64,7 @@ describe('Order edit basic data path', () => { const result = await nightmare .autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark') .autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark') + .autocompleteSearch(selectors.orderBasicData.agencyAutocomplete, 'Silla247') .clearInput(selectors.orderBasicData.observationInput) .write(selectors.orderBasicData.observationInput, 'Observation modified') .waitToClick(selectors.orderBasicData.saveButton) @@ -80,6 +81,13 @@ describe('Order edit basic data path', () => { expect(result).toEqual('104: Tony Stark'); }); + it('should now confirm the agency have been edited', async() => { + const result = await nightmare + .waitToGetProperty(`${selectors.orderBasicData.agencyAutocomplete} input`, 'value'); + + expect(result).toEqual('7: Silla247'); + }); + it('should now confirm the observations have been edited', async() => { const result = await nightmare .waitToGetProperty(selectors.orderBasicData.observationInput, 'value'); diff --git a/front/core/components/check/style.scss b/front/core/components/check/style.scss index 0804a57500..5ddd56fa35 100644 --- a/front/core/components/check/style.scss +++ b/front/core/components/check/style.scss @@ -18,4 +18,8 @@ vn-check { md-checkbox { margin-bottom: 0 } + + md-checkbox .md-label { + margin-bottom: .5em; + } } diff --git a/front/core/components/fetched-tags/index.html b/front/core/components/fetched-tags/index.html index 546e5d67d3..a1816d6f03 100644 --- a/front/core/components/fetched-tags/index.html +++ b/front/core/components/fetched-tags/index.html @@ -1,5 +1,8 @@ - {{::$ctrl.title}} + + {{::$ctrl.title}} +
{{::$ctrl.iconContent}}', + template: '{{::$ctrl.iconContent}}', controller: Icon, bindings: { icon: '@' diff --git a/front/core/components/icon/style.scss b/front/core/components/icon/style.scss index bed29630da..07a1584e35 100644 --- a/front/core/components/icon/style.scss +++ b/front/core/components/icon/style.scss @@ -2,6 +2,7 @@ vn-icon { display: inline-block; font-size: 18pt; text-align: center; + outline: 0; & > i, & > i.material-icons { diff --git a/front/core/components/treeview/index.js b/front/core/components/treeview/index.js index a71a3a342b..0737bf8cbd 100644 --- a/front/core/components/treeview/index.js +++ b/front/core/components/treeview/index.js @@ -23,28 +23,6 @@ export default class Treeview extends Component { }); } - /* hasCheckedChilds(node) { - if (!node.childs) return false; - - const childs = node.childs; - for (let i = 0; i < childs.length; i++) { - if (childs[i].selected || this.hasCheckedChilds(childs[i])) - return true; - } - - return false; - } - - hasCheckedParents(node) { - if (!node.parent) return false; - - const parent = node.parent; - if (parent.selected || this.hasCheckedParents(parent)) - return true; - - return false; - } */ - onSelection(item, value) { this.emit('selection', {item, value}); } @@ -67,12 +45,15 @@ export default class Treeview extends Component { } item.childs = newData.sort((a, b) => { - let priority = (b.isIncluded - a.isIncluded) - 1; + if (b.isIncluded !== a.isIncluded) { + if (a.isIncluded == null) + return 1; + if (b.isIncluded == null) + return -1; + return b.isIncluded - a.isIncluded; + } - if (b.name > a.name) - priority++; - - return priority; + return a.name.localeCompare(b.name); }); }); } diff --git a/modules/agency/back/methods/zone-geo/getLeaves.js b/modules/agency/back/methods/zone-geo/getLeaves.js index 6312864655..64bb68318d 100644 --- a/modules/agency/back/methods/zone-geo/getLeaves.js +++ b/modules/agency/back/methods/zone-geo/getLeaves.js @@ -116,16 +116,7 @@ module.exports = Self => { const parentNodes = nodes.filter(element => { return element.depth === minorDepth; }); - - const sortedLeaves = parentNodes.sort((a, b) => { - let priority = (b.isIncluded - a.isIncluded) - 1; - - if (b.name > a.name) - priority++; - - return priority; - }); - const leaves = Object.assign([], sortedLeaves); + const leaves = Object.assign([], sortNodes(parentNodes)); nestLeaves(leaves); @@ -143,9 +134,23 @@ module.exports = Self => { && element.depth === parent.depth + 1; }); - return elements; + return sortNodes(elements); } return leaves; }; + + function sortNodes(nodes) { + return nodes.sort((a, b) => { + if (b.isIncluded !== a.isIncluded) { + if (a.isIncluded == null) + return 1; + if (b.isIncluded == null) + return -1; + return b.isIncluded - a.isIncluded; + } + + return a.name.localeCompare(b.name); + }); + } }; diff --git a/modules/client/front/basic-data/locale/es.yml b/modules/client/front/basic-data/locale/es.yml index 34edb5986e..7d7722e431 100644 --- a/modules/client/front/basic-data/locale/es.yml +++ b/modules/client/front/basic-data/locale/es.yml @@ -4,7 +4,7 @@ Social name: Razón social Phone: Teléfono Mobile: Móvil Fax: Fax -Email: Correo electrónico +Email: E-mail Salesperson: Comercial Channel: Canal You can save multiple emails: >- diff --git a/modules/client/front/create/locale/es.yml b/modules/client/front/create/locale/es.yml index 5c33aace13..6922ba917b 100644 --- a/modules/client/front/create/locale/es.yml +++ b/modules/client/front/create/locale/es.yml @@ -2,7 +2,7 @@ Name: Nombre Tax number: NIF/CIF Business name: Razón social Web user: Usuario Web -Email: Correo electrónico +Email: E-mail Create and edit: Crear y editar You can save multiple emails: >- Puede guardar varios correos electrónicos encadenándolos mediante comas diff --git a/modules/client/front/index/locale/es.yml b/modules/client/front/index/locale/es.yml index 71bd4963a9..35c21976cb 100644 --- a/modules/client/front/index/locale/es.yml +++ b/modules/client/front/index/locale/es.yml @@ -1,5 +1,5 @@ Client id: Id cliente Phone: Teléfono Town/City: Ciudad -Email: Correo electrónico +Email: E-mail View client: Ver cliente \ No newline at end of file diff --git a/modules/client/front/search-panel/locale/es.yml b/modules/client/front/search-panel/locale/es.yml index 590d0e6d8c..93d2faf538 100644 --- a/modules/client/front/search-panel/locale/es.yml +++ b/modules/client/front/search-panel/locale/es.yml @@ -4,5 +4,5 @@ Name: Nombre Social name: Razon social Town/City: Ciudad Postcode: Código postal -Email: Correo electrónico +Email: E-mail Phone: Teléfono \ No newline at end of file diff --git a/modules/item/back/methods/item/getVisibleAvailable.js b/modules/item/back/methods/item/getVisibleAvailable.js index fecdb736ba..dd60a069e9 100644 --- a/modules/item/back/methods/item/getVisibleAvailable.js +++ b/modules/item/back/methods/item/getVisibleAvailable.js @@ -23,11 +23,11 @@ module.exports = Self => { } }); - Self.getVisibleAvailable = async(itemFk, warehouseFk) => { + Self.getVisibleAvailable = async(id, warehouseFk) => { let query = ` CALL vn.getItemVisibleAvailable(?,curdate(),?,?)`; - let options = [itemFk, warehouseFk, false]; + let options = [id, warehouseFk, false]; [res] = await Self.rawSql(query, options); return { diff --git a/modules/item/front/descriptor/index.js b/modules/item/front/descriptor/index.js index 922ca48146..da94aacb62 100644 --- a/modules/item/front/descriptor/index.js +++ b/modules/item/front/descriptor/index.js @@ -34,20 +34,21 @@ class Controller { set item(value) { this._item = value; - this.updateStock(); + if (value && value.itemType && value.itemType.warehouseFk) + this.updateStock(value.itemType.warehouseFk); } get item() { return this._item; } - updateStock() { + updateStock(warehouseFk) { this.available = null; this.visible = null; if (this._item && this._item.id) { let options = { params: { - warehouseFk: this._warehouseFk + warehouseFk: warehouseFk } }; this.$http.get(`/item/api/Items/${this._item.id}/getVisibleAvailable`, options).then(response => { @@ -81,7 +82,7 @@ class Controller { warehouseFk: this.warehouseFk }).then(res => { this.vnApp.showSuccess(this.$translate.instant('Data saved!')); - this.updateStock(); + this.updateStock(this.item.itemType.warehouseFk); }); } } diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 997f2fded9..8a8b920ebc 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -72,7 +72,6 @@ {{::item.userNickname}} - {{::item.density}} {{::item.density}} {{::item.taxClass}} diff --git a/modules/item/front/index/index.js b/modules/item/front/index/index.js index 01b568d111..7a5adc6008 100644 --- a/modules/item/front/index/index.js +++ b/modules/item/front/index/index.js @@ -1,5 +1,4 @@ import ngModule from '../module'; -import './product'; import './style.scss'; class Controller { diff --git a/modules/item/front/index/product.html b/modules/item/front/index/product.html deleted file mode 100644 index a390e2e09a..0000000000 --- a/modules/item/front/index/product.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - -
{{::$ctrl.item.id}} - {{::$ctrl.item.name}}
- - - - - -
- - - - - - -
-
diff --git a/modules/item/front/index/product.js b/modules/item/front/index/product.js deleted file mode 100644 index 0dcaf0824b..0000000000 --- a/modules/item/front/index/product.js +++ /dev/null @@ -1,49 +0,0 @@ -import ngModule from '../module'; - -class ItemProduct { - onClick(event) { - if (event.defaultPrevented) - event.stopImmediatePropagation(); - } - - set item(value) { - if (value) { - let tags = []; - for (let i = 5; i < 9; i++) { - if (value['tag' + i]) { - let tagValue = value['value' + i]; - let tagKey = value['tag' + i]; - tags.push({tag: {name: tagKey}, value: tagValue}); - } - } - value.tags = tags; - } - - this._item = value; - } - - get item() { - return this._item; - } - - clone(event) { - event.preventDefault(); - this.index.cloneItem(this.item); - } - - preview(event) { - event.preventDefault(); - this.index.showItemPreview(this.item); - } -} - -ngModule.component('vnItemProduct', { - template: require('./product.html'), - bindings: { - item: '<' - }, - controller: ItemProduct, - require: { - index: '^vnItemIndex' - } -}); diff --git a/modules/item/front/index/style.scss b/modules/item/front/index/style.scss index 1cbc881241..74f1c1f9c9 100644 --- a/modules/item/front/index/style.scss +++ b/modules/item/front/index/style.scss @@ -1,31 +1,5 @@ @import "variables"; -vn-item-product { - display: block; - - .id { - background-color: $color-main; - color: $color-font-dark; - margin-bottom: 0em; - } - .image { - height: 7em; - width: 7em; - - & > img { - max-height: 100%; - max-width: 100%; - border-radius: .2em; - } - } - vn-label-value:first-of-type section{ - margin-top: 0.6em; - } - vn-fetched-tags vn-horizontal{ - margin-top: 0.9em; - } -} - vn-table { img { border-radius: 50%; diff --git a/modules/order/front/line/index.html b/modules/order/front/line/index.html index d8b27efe33..54e7438456 100644 --- a/modules/order/front/line/index.html +++ b/modules/order/front/line/index.html @@ -36,15 +36,21 @@ - {{row.itemFk | zeroFill:6}} + {{::row.itemFk | zeroFill:6}} - - {{row.warehouse.name}} - {{row.shipped | date: 'dd/MM/yyyy'}} - {{row.quantity}} + + + + + {{::row.warehouse.name}} + {{::row.shipped | date: 'dd/MM/yyyy'}} + {{::row.quantity}} - {{row.price | currency: 'EUR':2}} + {{::row.price | currency: 'EUR':2}} - {{row.itemFk | zeroFill:6}} + {{::row.itemFk | zeroFill:6}} - + + + + {{::row.quantity}} {{::row.price | currency: 'EUR':2}} {{::row.quantity * row.price | currency: 'EUR':2}} diff --git a/modules/order/front/volume/index.html b/modules/order/front/volume/index.html index acc6fd8920..359e9e37be 100644 --- a/modules/order/front/volume/index.html +++ b/modules/order/front/volume/index.html @@ -38,7 +38,13 @@ {{::row.itemFk}}
- + + + + {{::row.quantity}} {{::row.volume | number:3}} diff --git a/modules/ticket/front/component/index.html b/modules/ticket/front/component/index.html index 165d3addb4..9274a4c18e 100644 --- a/modules/ticket/front/component/index.html +++ b/modules/ticket/front/component/index.html @@ -48,7 +48,11 @@ - + + {{::sale.quantity}} diff --git a/modules/ticket/front/data/step-two/index.html b/modules/ticket/front/data/step-two/index.html index b4d07a548e..e343ad9e9e 100644 --- a/modules/ticket/front/data/step-two/index.html +++ b/modules/ticket/front/data/step-two/index.html @@ -15,7 +15,13 @@ {{("000000"+sale.itemFk).slice(-6)}} - + + + + {{::sale.quantity}} {{::sale.price | currency: 'EUR': 2}} {{::sale.component.newPrice | currency: 'EUR': 2}} diff --git a/modules/ticket/front/sale-checked/index.html b/modules/ticket/front/sale-checked/index.html index 89256c95e5..3c8a925c20 100644 --- a/modules/ticket/front/sale-checked/index.html +++ b/modules/ticket/front/sale-checked/index.html @@ -30,10 +30,16 @@ - {{sale.itemFk | zeroFill:6}} + {{::sale.itemFk | zeroFill:6}} - + + + + {{::sale.quantity}} diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html index da33b4be19..f166b7882a 100644 --- a/modules/ticket/front/sale-tracking/index.html +++ b/modules/ticket/front/sale-tracking/index.html @@ -37,7 +37,13 @@ {{sale.itemFk | zeroFill:6}} - + + + + {{::sale.quantity}} {{::sale.originalQuantity}} diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 62dc102941..24517d2a61 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -108,7 +108,11 @@ - + + {{sale.quantity}} diff --git a/modules/ticket/front/volume/index.html b/modules/ticket/front/volume/index.html index 4121ec4abc..34de1e4706 100644 --- a/modules/ticket/front/volume/index.html +++ b/modules/ticket/front/volume/index.html @@ -38,7 +38,7 @@ {{sale.itemFk | zeroFill:6}} - + {{::sale.quantity}} {{::sale.volume.m3 | number:3}} diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js index ea1457fc88..9b4f6f93fd 100644 --- a/modules/worker/front/card/index.js +++ b/modules/worker/front/card/index.js @@ -19,10 +19,8 @@ class Controller { { relation: 'user', scope: {fields: ['name', 'email']} - }, { - relation: 'client', - scope: {fields: ['fi']} - }, { + }, + { relation: 'sip', scope: {fields: ['extension']} }, { diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html index 696f2a22f4..5b6bdaa6bf 100644 --- a/modules/worker/front/descriptor/index.html +++ b/modules/worker/front/descriptor/index.html @@ -23,9 +23,6 @@ - - diff --git a/modules/worker/front/routes.json b/modules/worker/front/routes.json index e13413d0fe..cb2823484e 100644 --- a/modules/worker/front/routes.json +++ b/modules/worker/front/routes.json @@ -17,8 +17,7 @@ "url": "/index?q", "state": "worker.index", "component": "vn-worker-index", - "description": "Workers", - "acl": ["developer"] + "description": "Workers" }, { "url" : "/summary", "state": "worker.card.summary", @@ -40,7 +39,8 @@ "description": "Basic data", "params": { "worker": "$ctrl.worker" - } + }, + "acl": ["developer"] } ] } \ No newline at end of file diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index 429db6d983..bc58e7bf12 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -6,9 +6,6 @@ - - diff --git a/print/lib/reportEngine.js b/print/lib/reportEngine.js index e4cfce6df0..dccb18b4a4 100644 --- a/print/lib/reportEngine.js +++ b/print/lib/reportEngine.js @@ -107,7 +107,7 @@ module.exports = { format: 'A4', border: '1.5cm', footer: { - height: '60px', + height: '55px', } }; diff --git a/print/report/email-header/locale.js b/print/report/email-header/locale.js index a3d2003a53..7200e6048c 100644 --- a/print/report/email-header/locale.js +++ b/print/report/email-header/locale.js @@ -1,5 +1,5 @@ module.exports = { messages: { - es: {clientName: 'Nombre cliente'}, + es: {}, }, }; diff --git a/print/report/letter-debtor-nd/index.html b/print/report/letter-debtor-nd/index.html index e1daa91a64..01247ced41 100644 --- a/print/report/letter-debtor-nd/index.html +++ b/print/report/letter-debtor-nd/index.html @@ -15,7 +15,7 @@ -

{{ $t('sections.introduction.title') }},

+

{{ $t('sections.introduction.title') }},

{{ $t('sections.introduction.description') }}

{{ $t('sections.introduction.terms') }}

diff --git a/print/report/letter-debtor-st/index.html b/print/report/letter-debtor-st/index.html index f9c9150729..4f5ea17ac5 100644 --- a/print/report/letter-debtor-st/index.html +++ b/print/report/letter-debtor-st/index.html @@ -15,7 +15,7 @@ -

{{ $t('sections.introduction.title') }},

+

{{ $t('sections.introduction.title') }},

{{ $t('sections.introduction.description') }}

{{ $t('checkExtract') }}

diff --git a/print/report/payment-update/index.html b/print/report/payment-update/index.html index bd4b9a0db2..fdc8936627 100644 --- a/print/report/payment-update/index.html +++ b/print/report/payment-update/index.html @@ -15,7 +15,7 @@ -

{{ $t('sections.introduction.title') }},

+

{{ $t('sections.introduction.title') }},

diff --git a/print/report/printer-setup/assets/files/port.png b/print/report/printer-setup/assets/files/port.png new file mode 100644 index 0000000000..237d1057b2 Binary files /dev/null and b/print/report/printer-setup/assets/files/port.png differ diff --git a/print/report/printer-setup/index.js b/print/report/printer-setup/index.js index eedb83f804..5a2c5758b6 100755 --- a/print/report/printer-setup/index.js +++ b/print/report/printer-setup/index.js @@ -24,7 +24,10 @@ module.exports = { }, data() { return { - files: ['/assets/files/model.ezp'], + files: [ + '/assets/files/model.ezp', + '/assets/files/port.png' + ], }; }, methods: { diff --git a/print/report/printer-setup/locale.js b/print/report/printer-setup/locale.js index bd6360e8fd..44d0ba7c9d 100644 --- a/print/report/printer-setup/locale.js +++ b/print/report/printer-setup/locale.js @@ -30,6 +30,9 @@ module.exports = { 'Elige la primera opcion "Setup printer"', 'Haz clic en la primera pestalla "Label Setup"', 'Modifica la propidad "Paper Height"', + `Comprueba el puerto de la impresora, botón de le la derecha + "SETUP PRINTER" y en la parte derecha, igual como la imagen + que adjuntamos, seleccionar la que ponga "USB00x: GODEX"`, 'Haz clic en el boton "Ok"', 'Haz clic sobre el icono de la impresora', 'Haz clic en "Print"', diff --git a/print/report/rpt-delivery-note/index.html b/print/report/rpt-delivery-note/index.html index 5332858c37..65b1866ae2 100644 --- a/print/report/rpt-delivery-note/index.html +++ b/print/report/rpt-delivery-note/index.html @@ -5,7 +5,7 @@ -

+
@@ -185,7 +185,6 @@
-