From 8c07288378ddc88cba974c6ead61069e32709bb0 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Fri, 23 Mar 2018 12:21:26 +0100 Subject: [PATCH 1/5] seccion mana creada --- client/ticket/routes.json | 14 ++- client/ticket/src/volume/ticket-volume.js | 115 ---------------------- 2 files changed, 13 insertions(+), 116 deletions(-) diff --git a/client/ticket/routes.json b/client/ticket/routes.json index 7115a0a39..c602f8768 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -71,7 +71,7 @@ } }, { - "url": "/Expedition", + "url": "/expedition", "state": "ticket.card.expedition", "component": "vn-ticket-expedition", "params": { @@ -82,6 +82,18 @@ "icon": "icon-volum" } }, + { + "url": "/mana", + "state": "ticket.card.mana", + "component": "vn-ticket-mana", + "params": { + "ticket": "$ctrl.ticket" + }, + "menu": { + "description": "Mana", + "icon": "icon-sms" + } + }, { "url" : "/package", "state": "ticket.card.package", diff --git a/client/ticket/src/volume/ticket-volume.js b/client/ticket/src/volume/ticket-volume.js index 4f89e282b..2c41ef28e 100644 --- a/client/ticket/src/volume/ticket-volume.js +++ b/client/ticket/src/volume/ticket-volume.js @@ -19,121 +19,6 @@ class Controller { this.ticketVolumes = response.data; }); } - - // _setIconAdd() { - // if (this.ticketVolumes.length) { - // this.ticketVolumes.map(element => { - // element.showAddIcon = false; - // return true; - // }); - // this.ticketVolumes[this.ticketVolumes.length - 1].showAddIcon = true; - // } - // } - - // _setDirtyForm() { - // if (this.$scope.form) { - // this.$scope.form.$setDirty(); - // } - // } - - // _unsetDirtyForm() { - // if (this.$scope.form) { - // this.$scope.form.$setPristine(); - // } - // } - - // addVolume() { - // this.ticketVolumes.push({description: null, ticketFk: this.params.id, showAddIcon: true}); - // this._setIconAdd(); - // } - - // removeVolume(index) { - // let item = this.ticketVolumes[index]; - // if (item) { - // this.ticketVolumes.splice(index, 1); - // this._setIconAdd(); - // if (item.id) { - // this.removedVolumes.push(item.id); - // this._setDirtyForm(); - // } - // } - // } - - // _equalVolumes(oldVolume, newVolume) { - // return oldVolume.id === newVolume.id && oldVolume.VolumeTypeFk === newVolume.VolumeTypeFk && oldVolume.description === newVolume.description; - // } - - // setOldVolumes(response) { - // this._setIconAdd(); - // response.data.forEach(Volume => { - // this.oldVolumes[Volume.id] = Object.assign({}, Volume); - // }); - // } - - // getVolumes() { - // let filter = { - // where: {ticketFk: this.params.id}, - // include: ['VolumeType'] - // }; - - // this.$http.get(`/ticket/api/TicketVolumes?filter=${JSON.stringify(filter)}`).then(response => { - // this.ticketVolumes = response.data; - // this.setOldVolumes(response); - // }); - // } - - // submit() { - // let typesDefined = []; - // let repeatedType = false; - // let canSubmit; - // let VolumesObj = { - // delete: this.removedVolumes, - // create: [], - // update: [] - // }; - - // this.ticketVolumes.forEach(Volume => { - // let isNewVolume = !Volume.id; - - // delete Volume.showAddIcon; - - // if (typesDefined.indexOf(Volume.VolumeTypeFk) !== -1) { - // repeatedType = true; - // return; - // } - // typesDefined.push(Volume.VolumeTypeFk); - - // if (isNewVolume && Volume.description && Volume.VolumeTypeFk) { - // VolumesObj.create.push(Volume); - // } - - // if (!isNewVolume && !this._equalVolumes(this.oldVolumes[Volume.id], Volume)) { - // VolumesObj.update.push(Volume); - // } - // }); - - // if (this.$scope.form.$invalid) { - // return this.vnApp.showMessage(this.$translate.instant('Some fields are invalid')); - // } - - // if (repeatedType) { - // return this.vnApp.showMessage(this.$translate.instant('The Volume type must be unique')); - // } - - // canSubmit = VolumesObj.update.length > 0 || VolumesObj.create.length > 0 || VolumesObj.delete.length > 0; - - // if (canSubmit) { - // return this.$http.post(`/ticket/api/TicketVolumes/crudTicketVolumes`, VolumesObj).then(() => { - // this.getVolumes(); - // this._unsetDirtyForm(); - // }); - // } - // this.vnApp.showMessage(this.$translate.instant('No changes to save')); - // } - - $onInit() { - // this.getVolumes(); - } } Controller.$inject = ['$stateParams', '$scope', '$http', '$translate', 'vnApp']; From dcce890beab1a88fe8f9c0a0dc1909935666e194 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Fri, 23 Mar 2018 15:08:14 +0100 Subject: [PATCH 2/5] fix e2e --- e2e/helpers/selectors.js | 10 ++++------ .../02_edit_item_basic_data.spec.js | 4 ++-- .../08_item_create_and_clone.spec.js | 7 ------- .../01_create_ticket_observations.spec.js | 4 ++-- .../02_delete_ticket_expeditions.spec.js | 4 ++-- services/db/02-dumpedFixtures.sql | 18 ++++++++++++++---- services/db/04-fixtures.sql | 15 +++++---------- services/db/export-data.cmd | 2 +- 8 files changed, 30 insertions(+), 34 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 15bde1e72..217309f4c 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -167,8 +167,6 @@ export default { intrastatSelectOptionOne: `${components.vnAutocomplete}[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(2)`, originSelect: `${components.vnAutocomplete}[field="$ctrl.item.originFk"] input`, originSelectOptionOne: `${components.vnAutocomplete}[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`, - expenceSelect: `${components.vnAutocomplete}[field="$ctrl.item.expenceFk"] input`, - expenceSelectOptionOne: `${components.vnAutocomplete}[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(2)`, createButton: `${components.vnSubmit}` }, @@ -242,15 +240,15 @@ export default { firstWarehouseSelect: `${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, firstWarehouseDisabled: `vn-horizontal:nth-child(2) > vn-textfield[label="Warehouse"] > div > input`, firstWarehouseSelectSecondOption: `${components.vnAutocomplete}[field="itemNiche.warehouseFk"] vn-drop-down ul > li:nth-child(2)`, - firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="code"] > div > input`, + firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Code"] > div > input`, secondWarehouseSelect: `vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, secondWarehouseDisabled: `vn-horizontal:nth-child(3) > vn-textfield[label="Warehouse"] > div > input`, - secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="code"] > div > input`, + secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Code"] > div > input`, secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-one > ${components.vnIcon}[icon="remove_circle_outline"]`, thirdWarehouseSelect: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, thirdWarehouseDisabled: `vn-horizontal:nth-child(4) > vn-textfield[label="Warehouse"] > div > input`, thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`, - thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="code"] > div > input`, + thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] > div > input`, submitNichesButton: `${components.vnSubmit}` }, itemBotanical: { @@ -279,7 +277,7 @@ export default { searchButton: `${components.vnSearchBar} > vn-icon-button > button` }, ticketNotes: { - notesButton: `${components.vnMenuItem}[ui-sref="ticket.card.observations"]`, + notesButton: `${components.vnMenuItem}[ui-sref="ticket.card.observation"]`, firstNoteRemoveButton: `${components.vnIcon}[icon="remove_circle_outline"]`, addNoteButton: `${components.vnIcon}[icon="add_circle"]`, firstNoteSelect: `${components.vnAutocomplete}[field="ticketObservation.observationTypeFk"] input`, diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index 36b7fb81e..0947bc167 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/helpers'; -describe('edit item basic data path', () => { +fdescribe('edit item basic data path', () => { const nightmare = createNightmare(); beforeAll(() => { @@ -112,7 +112,7 @@ describe('edit item basic data path', () => { return nightmare .getInputValue(selectors.itemBasicData.expenceSelect) .then(result => { - expect(result).toEqual('loan'); + expect(result).toEqual('Adquisición mercancia Extracomunitaria'); }); }); }); diff --git a/e2e/paths/item-module/08_item_create_and_clone.spec.js b/e2e/paths/item-module/08_item_create_and_clone.spec.js index a4a54263a..788d07ecf 100644 --- a/e2e/paths/item-module/08_item_create_and_clone.spec.js +++ b/e2e/paths/item-module/08_item_create_and_clone.spec.js @@ -51,8 +51,6 @@ describe('Item', () => { .waitToClick(selectors.itemCreateView.intrastatSelectOptionOne) .waitToClick(selectors.itemCreateView.originSelect) .waitToClick(selectors.itemCreateView.originSelectOptionOne) - .waitToClick(selectors.itemCreateView.expenceSelect) - .waitToClick(selectors.itemCreateView.expenceSelectOptionOne) .click(selectors.itemCreateView.createButton) .waitForSnackbar() .then(result => { @@ -81,11 +79,6 @@ describe('Item', () => { }) .then(result => { expect(result).toBe('Spain'); - return nightmare - .getInputValue(selectors.itemBasicData.expenceSelect); - }) - .then(result => { - expect(result).toBe('loan'); }); }); }); diff --git a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js index 9cb787642..237f3e9a5 100644 --- a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js +++ b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js @@ -36,10 +36,10 @@ describe('create ticket notes path', () => { .waitForTextInElement(selectors.ticketsIndex.searchResult, '1') .waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketNotes.notesButton) - .waitForURL('observations') + .waitForURL('observation') .url() .then(url => { - expect(url).toContain('observations'); + expect(url).toContain('observation'); }); }); diff --git a/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js b/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js index 554aa6c07..21e8be652 100644 --- a/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js +++ b/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js @@ -36,10 +36,10 @@ describe('delete ticket expeditions path', () => { .waitForTextInElement(selectors.ticketsIndex.searchResult, '1') .waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketExpedition.expeditionButton) - .waitForURL('Expedition') + .waitForURL('expedition') .url() .then(url => { - expect(url).toContain('Expedition'); + expect(url).toContain('expedition'); }); }); diff --git a/services/db/02-dumpedFixtures.sql b/services/db/02-dumpedFixtures.sql index c50ab6baf..d1dcfec03 100644 --- a/services/db/02-dumpedFixtures.sql +++ b/services/db/02-dumpedFixtures.sql @@ -55,7 +55,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2018-03-21 14:01:01 +-- Dump completed on 2018-03-23 13:10:41 USE `salix`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- @@ -93,7 +93,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2018-03-21 14:01:02 +-- Dump completed on 2018-03-23 13:10:41 USE `vn`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- @@ -151,7 +151,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2018-03-21 14:01:02 +-- Dump completed on 2018-03-23 13:10:42 USE `vn2008`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- @@ -179,6 +179,16 @@ LOCK TABLES `accion_dits` WRITE; INSERT INTO `accion_dits` VALUES (0,'Abono del ticket'),(104,'Abre a pesar del aviso'),(81,'Abre Entrada'),(116,'Abre Margenes'),(31,'Abre ticket'),(149,'Abre traslado'),(148,'Abre travel'),(12,'Acepta envio'),(64,'Acepta envio a pesar del aviso'),(23,'Aglutinació'),(92,'Añade credito'),(112,'Añade linea'),(132,'Añade manualmente Preparacion'),(33,'Añade promoción'),(144,'Añade ticket'),(129,'Bioniza Linea'),(130,'Bioniza Lineas Ok'),(128,'Bioniza Ticket'),(133,'Borra expedition'),(63,'Borrar promoción'),(80,'Cambia'),(106,'Cambia Activo'),(119,'Cambia Agencia'),(60,'Cambia almacen'),(56,'Cambia Article'),(53,'Cambia cantidad'),(78,'Cambia Categoria'),(34,'Cambia Cliente'),(74,'Cambia Color'),(110,'Cambia Comercial'),(137,'Cambia Conductor'),(82,'Cambia Consignatario'),(105,'Cambia Contabilizada'),(142,'Cambia Coste'),(114,'Cambia Costefijo'),(108,'Cambia crédito'),(97,'Cambia CyC'),(126,'Cambia de agencia sin eliminar la ruta'),(89,'Cambia delivered'),(98,'Cambia Descuento'),(163,'Cambia el turno'),(3,'Cambia Empresa'),(147,'Cambia etiquetas'),(107,'Cambia Factura mail'),(6,'Cambia Fecha'),(37,'Cambia forma de pago'),(122,'Cambia gestdoc_id'),(135,'Cambia grouping y lo falca'),(1,'Cambia hora'),(143,'Cambia hora fin'),(118,'Cambia Id_Agencia'),(140,'Cambia km_end'),(139,'Cambia km_start'),(90,'Cambia landing'),(79,'Cambia Medida'),(77,'Cambia Nicho'),(120,'Cambia No Vincular'),(14,'Cambia obs de:'),(141,'Cambia Ok'),(73,'Cambia Origen'),(150,'Cambia packing'),(117,'Cambia Precio'),(85,'Cambia Received'),(131,'Cambia Recibido Core VNH'),(72,'Cambia Recibido Sepa'),(161,'Cambia salario'),(86,'Cambia Shipment'),(11,'Cambia solucion'),(76,'Cambia Tallos'),(109,'Cambia Tarifa '),(13,'Cambia Tipo'),(121,'Cambia Todos a No Vincular'),(138,'Cambia Vehiculo'),(94,'Cambia Vencimiento'),(88,'Cambia Warehouse de entrada'),(87,'Cambia Warehouse de salida'),(115,'Cambiazo'),(61,'Cambio de fecha'),(93,'Cobro Web'),(32,'Crea Cliente'),(145,'Crea clon'),(83,'Crea Entrada'),(19,'Crea Promoción'),(136,'Crea Ruta'),(84,'Crea Ticket'),(51,'Crea Utilidades->Abono desde el Ticket'),(52,'CREDITO SUPERADO'),(30,'DESBLOQUEA A PESAR DEL AVISO'),(8,'Desbloquea en preparación'),(5,'Desbloquea servido'),(9,'Desmarca seguro'),(54,'Elimina'),(127,'Elimina desde traslado'),(156,'Elimina horario'),(125,'Elimina la ruta por cambio de agencia'),(160,'Elimina precio'),(165,'Elimina ticket turno'),(153,'Elimina zona'),(22,'Eliminación ticket'),(57,'Envia por AZKAR 13 a pesar del aviso'),(68,'Envio a'),(28,'FACTURA MULTIPLE'),(29,'FACTURA RAPIDA'),(111,'Factura Serie'),(58,'FALCA PREU'),(113,'Fusion'),(36,'Genera un abono santos al ticket'),(66,'Genera una reserva santos al ticket'),(69,'Hace click en Pedido'),(20,'Hace click en Ver'),(18,'Imprime CTRL_F5'),(134,'Imprime Ctrl_F5 con credito superado'),(26,'Imprimir Albarán'),(96,'Inserta cantidad en negativo'),(155,'Inserta horario'),(158,'Inserta precio'),(164,'Inserta ticket turno'),(95,'Inserta travel'),(151,'Inserta zona'),(124,'Intenta recalcular tarifas'),(59,'LLIBERA PREU'),(4,'Marca como Servido'),(7,'Marca en preparación'),(10,'Marca seguro de verano'),(157,'Modifica horario'),(159,'Modifica precio'),(154,'Modifica zona'),(99,'No desbloquea los precios'),(103,'No especificado'),(71,'No respeta disponible'),(101,'No respeta grouping'),(100,'No respeta packing'),(123,'Recalcula tarifas'),(2,'Recalculació'),(16,'Reimprime F5'),(67,'Reimprime F5 a pesar del aviso'),(65,'Reserva santos del ticket'),(146,'Revisa Ticket desde Web'),(70,'Revisado PDA'),(50,'S\'ha utilitzat la funció Imprimir_Etiquetas del TPV'),(27,'Se envia a revision'),(91,'Se imprime split'),(15,'SMS'),(102,'Split a MERCAFLOR'),(21,'Ticket Split(Automático)'),(25,'TOUR desde ticket'),(24,'TOUR hacia ticket'),(162,'Validado'),(17,'Visualiza CTRL_F5'); /*!40000 ALTER TABLE `accion_dits` ENABLE KEYS */; UNLOCK TABLES; + +-- +-- Dumping data for table `Gastos` +-- + +LOCK TABLES `Gastos` WRITE; +/*!40000 ALTER TABLE `Gastos` DISABLE KEYS */; +INSERT INTO `Gastos` VALUES ('2000000000',1,'Inmovilizado pendiente',1,0,0),('2000000000',3,'Compra de bienes de inmovilizado',1,0,0),('2600000000',1,'Fianzas',0,0,0),('4600000000',1,'Anticipos de remuneraciones',1,0,0),('4600000001',1,'Anticpos de remuneración',1,0,0),('4751000000',1,'Retenciones',0,1,0),('5200000006',1,'Deudas a c/p CRA',1,0,0),('5200000008',0,'Prestamo CP Transolver IVECO 269',1,0,0),('5200000008',1,'Prestamo Transolver 201600269',1,0,0),('5200000009',0,'Prestamo CP Transolver IVECO 270',1,0,0),('5200000009',1,'Prestamo Transolver 201600270',1,0,0),('5200000010',0,'Prestamo CP Transolver IVECO 271',1,0,0),('5200000010',1,'Prestamo Transolver 201600271',1,0,0),('5200000011',1,'Prestamo Transolver 339',0,0,0),('5200000012',1,'Prestamo Transolver 340',1,0,0),('5200000013',1,'Prestamo Transolver 341',1,0,0),('5200000014',1,'Prestamo a c/p BBVA 600.000€',1,0,0),('5200000022',1,'Linea comercio exterior',1,0,0),('5240000001',1,'Leasing BBVA',1,0,0),('5240002032',1,'Leasing Iveco',1,0,0),('5240002066',1,'Leasing c/p Man',1,0,0),('5240002104',1,'Leasing c/p La caixa 3 vehículos',1,0,0),('5325000003',6,'Prestamo a partes vinculadas',0,0,0),('5660000001',1,'Suplidos',0,0,0),('5660000001',20,'Suplidos',1,0,0),('5660000002',0,'Suplidos',0,0,0),('5660000002',1,'Suplidos Transitarios nacionales',1,0,0),('5660000003',1,'Deposito c/p Ebury',1,0,0),('5660000003',4,'Deposito Ebury',0,0,0),('5660000004',4,'Deposito Global Reach',0,0,0),('6001000000',1,'Compras a terceros nacional',1,0,0),('6001000000',18,'Compras a terceros nacional',1,0,0),('6001000000',19,'Compras a terceros nacional',1,0,0),('6001000001',1,'Adquisiones en Europa',0,0,0),('6001000001',3,'Adquisición en Europa',1,0,0),('6002000000',1,'Transportes de compras',1,0,0),('6002000001',1,'Tranportes de compra Europa',1,0,0),('6002000001',4,'Transportes de compras Europa',1,0,0),('6002000567',0,'Transporte de compras VNH',1,0,0),('6003000000',1,'Adquisición mercancia Extracomunitaria',1,0,0),('6003000000',5,'Adquisición mercancia Extracomunitaria',1,0,0),('6003000000',6,'Adquisición mercancia Extracomunitaria',1,0,0),('6003000567',0,'Compra de mercancia extracomunitaria VNH',1,0,0),('6004000000',1,'Transporte compras Sudamérica',1,0,0),('6004000000',4,'Transporte compras Sudamérica',1,0,0),('6004000000',6,'Transporte compras Sudamérica',1,0,0),('6010000000',1,'Materias primas',1,0,0),('6020000000',1,'Otros aprovisionamientos',1,0,0),('6020000001',1,'Embalajes',1,0,0),('6020000002',1,'Otros aprov. Taller artíficial',1,0,0),('6090000000',6,'Rappels por compras',1,0,0),('6100000000',0,'Variacion existencias',1,0,0),('6210000000',1,'Arrendamientos',1,0,0),('6210000001',1,'Arrendamiento vehículo',1,0,0),('6210000001',4,'Gastos de arrendamiento vehículos',1,0,0),('6210000002',1,'Arrendamiento nave',1,0,0),('6210000003',1,'Arrendamiento espacio virtual-informatic',1,0,0),('6210000004',1,'Arrendamiento elementos para el proceso de informa',1,0,0),('6210000005',1,'Arrendamiento CC y banddejas',1,0,0),('6210000567',0,'Alquiler VNH',1,0,0),('6220000000',1,'Reparaciones y conservacion',1,0,0),('6220000001',1,'Reparación-Informatica',1,0,0),('6220000001',4,'Reparacion y mantenimiento informatica',1,0,0),('6220000003',1,'Reparación-Vehiculos',1,0,0),('6220000004',1,'Reparación-Instalaciones',1,0,0),('6220000005',1,'Reparación y mantenimineto CCs',1,0,0),('6220000006',1,'Repracion y conser maquinaria',1,0,0),('6230000000',1,'Servicios de profesionales independientes',1,0,0),('6230000001',1,'Servicios por gestión de ventas',1,0,0),('6230000001',4,'Servicios por gestión de ventas',1,0,0),('6240000000',1,'Transportes',1,0,0),('6240000000',4,'Transportes de ventas',1,0,0),('6240000567',0,'Transporte ventas VNH',1,0,0),('6250000000',1,'Primas de seguros',1,0,0),('6250000000',4,'Prima de Seguros',1,0,0),('6250000001',1,'Primas de seguros-Personales',1,0,0),('6250000002',1,'Primas de seguros-Colectivos',1,0,0),('6250000003',1,'Primas de seguros-Vehiculos',1,0,0),('6250000004',1,'Primas de seguros-Inmuebles',1,0,0),('6250000567',0,'Seguros VNH',1,0,0),('6260000000',1,'Gastos bancarios',1,0,0),('6260000001',1,'Gastos bancarios datafono',1,0,0),('6260000002',1,'Gastos bancarios transferencia nacional',1,0,0),('6260000003',1,'Gastos bancarios transferencia Europa',1,0,0),('6260000004',1,'Gastos bancarios transferencia divisas',1,0,0),('6260000567',0,'Gastos bancarios VNH',1,0,0),('6270000000',1,'Publicidad y RRPP',1,0,0),('6270000000',3,'Publicidad, propaganda y RR PP',1,0,0),('6270000000',6,'Publicidad',1,0,0),('6270000000',14,'Publicidad, propaganda RRPP',1,0,0),('6270000001',1,'Patrocinio',0,0,0),('6280000000',1,'Suministros',1,0,0),('6280000001',1,'Telefonos',1,0,0),('6280000002',1,'Gasoil',1,0,0),('6280000003',1,'Suministros-Electricidad',1,0,0),('6280000004',1,'Internet',1,0,0),('6280000567',0,'Suministros VNH',1,0,0),('6280001567',0,'Suministros telefono VNH',1,0,0),('6280003567',0,'Suministro luz VNH',1,0,0),('6290000000',1,'Otros servicios',1,0,0),('6290000001',1,'Material de oficina',1,0,0),('6290000002',1,'Gastos en formacion',1,0,0),('6290000003',1,'Asesoria juridica',1,0,0),('6290000004',4,'Otros servicios UE',1,0,0),('6290000005',1,'Gastos varios-Correos',1,0,0),('6290000006',6,'Otros servicios extranjero',1,0,0),('6290000007',1,'Gastos pequeño material',1,0,0),('6290000007',3,'Compras pequeño material',1,0,0),('6290000007',6,'Pequeño material',1,0,0),('6290000008',1,'Gastos varios-uniformes personal',1,0,0),('6290000008',3,'Compra uniformes',1,0,0),('6290000009',1,'Gastos-CC Container',1,0,0),('6290000010',1,'Gastos formación clientes',1,0,0),('6290000012',1,'Gastos gestión contra-reembolsos',1,0,0),('6290000013',1,'Arrendamiento Vilassar',1,0,0),('6290000014',1,'Gasto laboral espresas ETT',1,0,0),('6290000015',1,'Gasto compra terminales moviles y similares',1,0,0),('6290000015',3,'Gasto compra terminales moviles y similares',1,0,0),('6290000015',6,'Gasto compra terminales moviles y similares',1,0,0),('6290000016',1,'Gasto gestión cobro ventas',1,0,0),('6290000553',1,'Gastos viaje administrador',1,0,0),('6290000553',4,'Gastos viaje administrador-gerente',1,0,0),('6290000553',6,'Gastos viaje administrador',1,0,0),('6290001000',1,'Gastos de viaje',1,0,0),('6290001000',4,'Gastos viajes otros departamentos',1,0,0),('6290001000',6,'Gastos viaje personal otros departamentos',1,0,0),('6290001001',1,'Gastos R.R.P.P. Gerente',1,0,0),('6290001002',1,'Gastos R.R.P.P. Comerciales',1,0,0),('6290001567',0,'Gastos material oficina',1,0,0),('6300000000',1,'Impuesto de sociedades',1,0,0),('6310000000',1,'Otros tributos',1,0,0),('6380000000',1,'Ajustes positivos s/b Bº',1,0,0),('6400000000',0,'Sueldos y salarios',1,0,0),('6400000000',1,'Salarios',0,0,0),('6400000001',0,'Productividad',1,0,0),('6400000567',0,'Salarios VNH',1,0,0),('6410000001',1,'Indemnizaciones',1,0,0),('6420000000',0,'Seguridad Social a cargo de la empresa',1,0,0),('6420000000',1,'Seguridad Social',0,0,0),('6490000000',1,'Otros gastos sociales',1,0,0),('6500000000',1,'Impagados definitivos',1,0,0),('6620000000',0,'Intereses Bancarios',1,0,0),('6620000001',1,'Intereses Leasing BBVA Dic 2017',1,0,0),('6620000006',1,'Intereses deuda prestamo CRA',1,0,0),('6620000007',1,'Intereses La Caixa linea comercio exterior',1,0,0),('6620000007',16,'Intereses La Caixa Linea Comercio Exterior',0,0,0),('6620000008',1,'Intereses Prestamos Transolver 2016',1,0,0),('6620000011',1,'Intereses BBVA linea comercio exterior',1,0,0),('6620000014',1,'Intereses Prestamo BBVA',1,0,0),('6620000015',16,'Interés Póliza Deutsche Bank',0,0,0),('6620002032',1,'Intereses Leaing Iveco',1,0,0),('6620002066',1,'Leasing Intereses Man',1,0,0),('6620002104',1,'Intereses Leasing La caixa 3 vehículos',1,0,0),('6681000000',1,'Diferencia negativa tipo de cambio',1,0,0),('6681000000',4,'Diferencia negativa tipo de cambio',0,0,0),('6681000000',6,'Diferencia negativa tipo de cambio',1,0,0),('6681000567',0,'Diferencias de cambio VNH',1,0,0),('6690000000',1,'Otros gastos financieros',1,0,0),('6690000000',6,'Gastos financieros',1,0,0),('6720000000',16,'Perdidas procedentes de inversiones',0,0,0),('6780000000',1,'Gastos extraordinarios',1,0,0),('6780000001',1,'Gastos no deducibles',1,0,0),('6780000001',16,'Gasto no deducible',0,0,0),('6800000000',1,'Amortización inmovilizado intangible',1,0,0),('6800000001',0,'Amortizacion inmovilizado material',1,0,0),('6810000000',0,'Amortizaciones inmovilizado',1,0,0),('6810000000',1,'Amortizacion inmovilizado material',1,0,0),('7000000000',0,'Ventas',1,0,0),('7000000001',1,'Venta entre empresas',1,0,0),('7000010000',0,'Terceros Flor',1,0,0),('7000020000',0,'Terceros Planta',1,0,0),('7000030000',0,'Terceros Complementos',1,0,0),('7000040000',0,'Terceros Artificial',1,0,0),('7000050000',0,'Terceros Verdes',1,0,0),('7000060000',0,'Terceros Otros',1,0,0),('7000070000',0,'Terceros Confección',1,0,0),('7000080000',1,'Terceros Logística',1,0,0),('7001000000',1,'Mercaderia',1,0,1),('7001010000',0,'Grupo Flor',1,0,0),('7001020000',0,'Grupo Planta',1,0,0),('7001030000',0,'Grupo Complementos',1,0,0),('7001040000',0,'Grupo Artificial',1,0,0),('7001050000',0,'Grupo Verdes',1,0,0),('7001060000',0,'Grupo Otros',1,0,0),('7001070000',0,'Grupo Confección',1,0,0),('7001080000',1,'Grupo Logística',1,0,0),('7002010000',0,'Asociados Flor',1,0,0),('7002020000',0,'Asociados Planta',1,0,0),('7002030000',0,'Asociados Complementos',1,0,0),('7002040000',0,'Asociados Artificial',1,0,0),('7002050000',0,'Asociados Verdes',1,0,0),('7002060000',0,'Asociados Otros',1,0,0),('7002070000',0,'Asociados Confección',1,0,0),('7002080000',1,'Asociados Logística',1,0,0),('7040000000',1,'Embalajes',1,0,1),('7050000000',1,'Prestacion de servicios',1,0,1),('7400000000',1,'Subvenciones, donaciones a la explotacion',1,0,0),('7550000000',0,'Ingresos por serivicios al personal',1,0,0),('7680000000',0,'Diferencias positivas de cambio',1,0,0),('7680000000',1,'Diferenica positiva tipo de cambio',1,0,0),('7690000000',1,'Otros ingresos financieros',1,0,0),('7780000000',1,'Ingresos excepcionales',1,0,0),('7780000000',16,'Ingreso extraordinario',0,0,0),('7780000001',1,'Indemnizaciones transporte',1,0,0),('7780000001',4,'Indemnizaciones agencias transporte',1,0,0),('7780000001',5,'Indemnizaciones agencias transporte',1,0,0),('7780000001',6,'Indemnizaciones transporte',1,0,0),('7940000000',16,'Reversión impagos',0,0,0); +/*!40000 ALTER TABLE `Gastos` ENABLE KEYS */; +UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -189,4 +199,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2018-03-21 14:01:02 +-- Dump completed on 2018-03-23 13:10:42 diff --git a/services/db/04-fixtures.sql b/services/db/04-fixtures.sql index de256b73f..768f0715d 100644 --- a/services/db/04-fixtures.sql +++ b/services/db/04-fixtures.sql @@ -384,18 +384,13 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`) (05080000, 'Coral y materiales similares' , 2, 2), (06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1); -INSERT INTO `vn`.`expence`(`id`, `taxTypeFk`, `name`, `isWithheld`) - VALUES - (1, 1, 'bail', 0), - (2, 1, 'loan', 1); - INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,`originFk`,`description`,`producerFk`,`intrastatFk`,`isOnOffer`,`expenceFk`,`isBargain`,`comment`,`relevancy`,`image`,`taxClassFk`) VALUES - (1, 'Gem of Time', 2, 70, 'AMA', 'EXT', 1, 1, 'One of the infinity gems', 1, 06021010, 0, 1, 0, NULL, 0, 66540, 1), - (2, 'Gem of Mind', 2, 70, 'AZL', 'EXT', 1, 2, 'One of the infinity gems', 1, 06021010, 0, 1, 0, NULL, 0, 65540, 1), - (3, 'Iron Patriot', 1, 60, 'AMR', 'EXT', 1, 3, 'Rhodeys armor', 1, 05080000, 0, 1, 0, NULL, 0, 61692, 1), - (4, 'Mark I', 1, 60, 'AMR', 'EXT', 1, 1, 'Iron Mans first armor', 1, 05080000, 1, 2, 0, NULL, 0, 66090, 2), - (5, 'Mjolnir', 3, 30, 'AZR', 'EXT', 1, 2, 'Thors hammer!', 2, 06021010, 1, 2, 0, NULL, 0, 67350, 2); + (1, 'Gem of Time', 2, 70, 'AMA', 'EXT', 1, 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1), + (2, 'Gem of Mind', 2, 70, 'AZL', 'EXT', 1, 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1), + (3, 'Iron Patriot', 1, 60, 'AMR', 'EXT', 1, 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1), + (4, 'Mark I', 1, 60, 'AMR', 'EXT', 1, 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2), + (5, 'Mjolnir', 3, 30, 'AZR', 'EXT', 1, 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2); INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`) VALUES diff --git a/services/db/export-data.cmd b/services/db/export-data.cmd index 509439b2a..16b63139e 100755 --- a/services/db/export-data.cmd +++ b/services/db/export-data.cmd @@ -6,7 +6,7 @@ mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> 02-dumpedFix echo USE `vn`; >> 02-dumpedFixtures.sql mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak >> 02-dumpedFixtures.sql echo USE `vn2008`; >> 02-dumpedFixtures.sql -mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits >> 02-dumpedFixtures.sql +mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos >> 02-dumpedFixtures.sql From d29dcf2e11dd7dd8064652a5eed198ac383e7ccd Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Fri, 23 Mar 2018 16:50:11 +0100 Subject: [PATCH 3/5] #195 listar lineas de ticket componente fetched-tags --- .../src/components/icon-menu/icon-menu.html | 8 +-- .../ticket/src/fetched-tags/fetched-tags.html | 8 +++ .../ticket/src/fetched-tags/fetched-tags.js | 12 ++++ client/ticket/src/sale/sale.html | 59 ++++++++----------- client/ticket/src/ticket.js | 1 + .../02_edit_item_basic_data.spec.js | 2 +- 6 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 client/ticket/src/fetched-tags/fetched-tags.html create mode 100644 client/ticket/src/fetched-tags/fetched-tags.js diff --git a/client/core/src/components/icon-menu/icon-menu.html b/client/core/src/components/icon-menu/icon-menu.html index c2d5ffeff..b3df12dd1 100644 --- a/client/core/src/components/icon-menu/icon-menu.html +++ b/client/core/src/components/icon-menu/icon-menu.html @@ -9,8 +9,8 @@ show="$ctrl.showDropDown" selected="$ctrl.selected" filter="true" - parent="$ctrl.element" - > + parent="$ctrl.element"> +
+ parent="$ctrl.element"> +
\ No newline at end of file diff --git a/client/ticket/src/fetched-tags/fetched-tags.html b/client/ticket/src/fetched-tags/fetched-tags.html new file mode 100644 index 000000000..334f89c09 --- /dev/null +++ b/client/ticket/src/fetched-tags/fetched-tags.html @@ -0,0 +1,8 @@ + + {{::$ctrl.sale.concept}} + + + {{::fetchedTag.tag.name}} {{::fetchedTag.value}} + + + \ No newline at end of file diff --git a/client/ticket/src/fetched-tags/fetched-tags.js b/client/ticket/src/fetched-tags/fetched-tags.js new file mode 100644 index 000000000..81031d764 --- /dev/null +++ b/client/ticket/src/fetched-tags/fetched-tags.js @@ -0,0 +1,12 @@ +import ngModule from '../module'; + +class Controller {} +Controller.$inject = []; + +ngModule.component('vnFetchedTags', { + template: require('./fetched-tags.html'), + controller: Controller, + bindings: { + sale: '<' + } +}); diff --git a/client/ticket/src/sale/sale.html b/client/ticket/src/sale/sale.html index 5fcee01e4..5b9374686 100644 --- a/client/ticket/src/sale/sale.html +++ b/client/ticket/src/sale/sale.html @@ -1,39 +1,30 @@ - - Sale - - - - - - - - - - - - - - - - - - - - - -
ItemDescriptionQuantityPriceDiscountAmount
{{::sale.itemFk}} - - {{::sale.concept}} - - - {{::fetchedTag.tag.name}} {{::fetchedTag.value}} - - - - {{::sale.quantity}}{{::sale.price | currency:'€':2}}{{::sale.discount}} %{{::sale.quantity * sale.price | currency:'€':2}}
-
+ + Sale + + + + + + + + + + + + + + + + + + + + + +
ItemDescriptionQuantityPriceDiscountAmount
{{::sale.itemFk}}{{::sale.quantity}}{{::sale.price | currency:'€':2}}{{::sale.discount}} %{{::sale.quantity * sale.price | currency:'€':2}}
+
diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index 78593d6f6..132502666 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -11,3 +11,4 @@ import './volume/ticket-volume'; import './package/package'; import './sale/sale'; import './tracking/tracking'; +import './fetched-tags/fetched-tags'; diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index 0947bc167..6deee3bff 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/helpers'; -fdescribe('edit item basic data path', () => { +describe('edit item basic data path', () => { const nightmare = createNightmare(); beforeAll(() => { From 1cb94329223ac63c47d83e2c3973941ead19b512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Mon, 26 Mar 2018 11:43:17 +0200 Subject: [PATCH 4/5] Credit insurance validations fix --- services/client/common/models/credit-insurance.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/client/common/models/credit-insurance.js b/services/client/common/models/credit-insurance.js index 95902ab9c..155d4de44 100644 --- a/services/client/common/models/credit-insurance.js +++ b/services/client/common/models/credit-insurance.js @@ -1,22 +1,22 @@ module.exports = function(Self) { require('../methods/creditInsurance/filter.js')(Self); + Self.validateCredit = function(credit) { + return credit >= 0; + }; + Self.validateBinded('credit', Self.validateCredit, { message: 'The credit must be an integer greater than or equal to zero', allowNull: false, // FIXME: Ignored by loopback when it's false allowBlank: false }); - Self.validateCredit = function(credit) { - return (credit >= 0 && credit % 1 == 0); + Self.validateGrade = function(grade) { + return typeof grade === 'undefined' || grade >= 0; }; Self.validateBinded('grade', Self.validateGrade, { message: 'The grade must be an integer greater than or equal to zero', allowNull: true }); - - Self.validateGrade = function(grade) { - return (typeof grade === 'undefined' || (grade >= 0 && grade % 1 == 0)); - }; }; From e38999acfa05f2e88477912caaa81a627fe90538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Mon, 26 Mar 2018 12:24:34 +0200 Subject: [PATCH 5/5] Hide clear icon on disabled components autocomplete and textfield --- client/core/src/components/autocomplete/autocomplete.html | 1 + client/core/src/components/autocomplete/autocomplete.js | 4 ++-- client/core/src/components/textfield/textfield.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/core/src/components/autocomplete/autocomplete.html b/client/core/src/components/autocomplete/autocomplete.html index 4d04f884f..7e6580d78 100755 --- a/client/core/src/components/autocomplete/autocomplete.html +++ b/client/core/src/components/autocomplete/autocomplete.html @@ -8,6 +8,7 @@
clear