Commit 47e6ce85d430614f50b2a241ef2750fb57b534f1
Exists in
master
Merge remote-tracking branch 'upstream/master'
Showing
4 changed files
Show diff stats
src/js/businessService.js
| ... | ... | @@ -22,6 +22,11 @@ angular.module('focaCrearNotaPedido') |
| 22 | 22 | idVendedor: idVendedor |
| 23 | 23 | }; |
| 24 | 24 | crearNotaPedidoService.crearEstadoParaNotaPedido(estado); |
| 25 | + }, | |
| 26 | + calcularArticulos: function(articulos, cotizacion) { | |
| 27 | + for(var i = 0; i < articulos.length; i++) { | |
| 28 | + articulos[i].precio = articulos[i].precio / cotizacion; | |
| 29 | + } | |
| 25 | 30 | } |
| 26 | 31 | }; |
| 27 | 32 | }]); |
src/js/controller.js
| 1 | 1 | angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 2 | 2 | [ |
| 3 | 3 | '$scope', '$uibModal', '$location', '$filter', 'crearNotaPedidoService', |
| 4 | - 'focaModalService', 'focaSeguimientoService', 'notaPedidoBusinessService', | |
| 5 | - '$rootScope', | |
| 4 | + 'focaModalService', 'notaPedidoBusinessService', '$rootScope', 'focaSeguimientoService', | |
| 6 | 5 | function( |
| 7 | 6 | $scope, $uibModal, $location, $filter, crearNotaPedidoService, focaModalService, |
| 8 | - focaSeguimientoService, notaPedidoBusinessService, $rootScope | |
| 7 | + notaPedidoBusinessService, $rootScope, focaSeguimientoService | |
| 9 | 8 | ) { |
| 10 | 9 | $scope.botonera = [ |
| 11 | - {texto: 'Vendedor', accion: function() {$scope.seleccionarVendedor();}}, | |
| 12 | - {texto: 'Cliente', accion: function() {$scope.seleccionarCliente();}}, | |
| 13 | - {texto: 'Proveedor', accion: function() {$scope.seleccionarProveedor();}}, | |
| 14 | - {texto: 'Moneda', accion: function() {$scope.abrirModalMoneda();}}, | |
| 15 | - { | |
| 16 | - texto: 'Precios y condiciones', | |
| 17 | - accion: function() {$scope.abrirModalListaPrecio();}}, | |
| 18 | - {texto: 'Flete', accion: function() {$scope.abrirModalFlete();}}, | |
| 10 | + {texto: 'Vendedor', accion: function() { | |
| 11 | + validarNotaRemitada($scope.seleccionarVendedor);}}, | |
| 12 | + {texto: 'Cliente', accion: function() { | |
| 13 | + validarNotaRemitada($scope.seleccionarCliente);}}, | |
| 14 | + {texto: 'Proveedor', accion: function() { | |
| 15 | + validarNotaRemitada($scope.seleccionarProveedor);}}, | |
| 16 | + {texto: 'Moneda', accion: function() { | |
| 17 | + validarNotaRemitada($scope.abrirModalMoneda);}}, | |
| 18 | + {texto: 'Precios y condiciones', accion: function() { | |
| 19 | + validarNotaRemitada($scope.abrirModalListaPrecio);}}, | |
| 20 | + {texto: 'Flete', accion: function() { | |
| 21 | + validarNotaRemitada($scope.abrirModalFlete);}}, | |
| 19 | 22 | {texto: '', accion: function() {}}, |
| 20 | 23 | {texto: '', accion: function() {}} |
| 21 | 24 | ]; |
| 25 | + | |
| 22 | 26 | $scope.datepickerAbierto = false; |
| 23 | 27 | |
| 24 | 28 | $scope.show = false; |
| ... | ... | @@ -29,6 +33,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 29 | 33 | }; |
| 30 | 34 | |
| 31 | 35 | $scope.notaPedido = { |
| 36 | + id: 0, | |
| 32 | 37 | vendedor: {}, |
| 33 | 38 | cliente: {}, |
| 34 | 39 | proveedor: {}, |
| ... | ... | @@ -39,13 +44,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 39 | 44 | var monedaPorDefecto; |
| 40 | 45 | //Trabajo con la cotización más reciente, por eso uso siempre la primera '[0]' |
| 41 | 46 | crearNotaPedidoService.getCotizacionByIdMoneda(1).then(function(res) { |
| 42 | - monedaPorDefecto = { | |
| 43 | - id: res.data[0].ID, | |
| 44 | - detalle: res.data[0].DETALLE, | |
| 45 | - simbolo: res.data[0].SIMBOLO, | |
| 46 | - cotizaciones: res.data[0].cotizaciones | |
| 47 | - }; | |
| 48 | - addCabecera('Moneda:', monedaPorDefecto.detalle); | |
| 47 | + monedaPorDefecto = res.data[0]; | |
| 48 | + addCabecera('Moneda:', monedaPorDefecto.DETALLE); | |
| 49 | 49 | addCabecera('Fecha cotizacion:', |
| 50 | 50 | new Date(monedaPorDefecto.cotizaciones[0].FECHA).toLocaleDateString()); |
| 51 | 51 | addCabecera('Cotizacion:', monedaPorDefecto.cotizaciones[0].VENDEDOR); |
| ... | ... | @@ -121,16 +121,16 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 121 | 121 | // }; |
| 122 | 122 | |
| 123 | 123 | $scope.crearNotaPedido = function() { |
| 124 | - if(!$scope.notaPedido.vendedor.codigo) { | |
| 124 | + if(!$scope.notaPedido.vendedor.CodVen) { | |
| 125 | 125 | focaModalService.alert('Ingrese Vendedor'); |
| 126 | 126 | return; |
| 127 | - } else if(!$scope.notaPedido.cliente.cod) { | |
| 127 | + } else if(!$scope.notaPedido.cliente.COD) { | |
| 128 | 128 | focaModalService.alert('Ingrese Cliente'); |
| 129 | 129 | return; |
| 130 | - } else if(!$scope.notaPedido.proveedor.codigo) { | |
| 130 | + } else if(!$scope.notaPedido.proveedor.COD) { | |
| 131 | 131 | focaModalService.alert('Ingrese Proveedor'); |
| 132 | 132 | return; |
| 133 | - } else if(!$scope.notaPedido.moneda.id) { | |
| 133 | + } else if(!$scope.notaPedido.moneda.ID) { | |
| 134 | 134 | focaModalService.alert('Ingrese Moneda'); |
| 135 | 135 | return; |
| 136 | 136 | } else if(!$scope.notaPedido.cotizacion.ID) { |
| ... | ... | @@ -144,7 +144,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 144 | 144 | { |
| 145 | 145 | focaModalService.alert('Ingrese Flete'); |
| 146 | 146 | return; |
| 147 | - } else if(!$scope.notaPedido.domicilio.id) { | |
| 147 | + } else if(!$scope.notaPedido.domicilioStamp) {//TODO validar domicilio correcto | |
| 148 | 148 | focaModalService.alert('Ingrese Domicilio'); |
| 149 | 149 | return; |
| 150 | 150 | } else if($scope.articulosTabla.length === 0) { |
| ... | ... | @@ -153,15 +153,15 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 153 | 153 | } |
| 154 | 154 | var date = new Date(); |
| 155 | 155 | var notaPedido = { |
| 156 | - id: 0, | |
| 156 | + id: $scope.notaPedido.id, | |
| 157 | 157 | fechaCarga: new Date(date.getTime() - (date.getTimezoneOffset() * 60000)) |
| 158 | 158 | .toISOString().slice(0, 19).replace('T', ' '), |
| 159 | - idVendedor: $scope.notaPedido.vendedor.codigo, | |
| 160 | - idCliente: $scope.notaPedido.cliente.cod, | |
| 161 | - nombreCliente: $scope.notaPedido.cliente.nom, | |
| 162 | - cuitCliente: $scope.notaPedido.cliente.cuit, | |
| 163 | - idProveedor: $scope.notaPedido.proveedor.codigo, | |
| 164 | - idDomicilio: $scope.notaPedido.domicilio.id, | |
| 159 | + idVendedor: $scope.notaPedido.vendedor.CodVen, | |
| 160 | + idCliente: $scope.notaPedido.cliente.COD, | |
| 161 | + nombreCliente: $scope.notaPedido.cliente.NOM, | |
| 162 | + cuitCliente: $scope.notaPedido.cliente.CUIT, | |
| 163 | + idProveedor: $scope.notaPedido.proveedor.COD, | |
| 164 | + //idDomicilio: $scope.notaPedido.domicilio.id,TODO GUARDAR DOMICILIO ID | |
| 165 | 165 | idCotizacion: $scope.notaPedido.cotizacion.ID, |
| 166 | 166 | idPrecioCondicion: $scope.notaPedido.idPrecioCondicion, |
| 167 | 167 | cotizacion: $scope.notaPedido.cotizacion.VENDEDOR, |
| ... | ... | @@ -175,9 +175,20 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 175 | 175 | }; |
| 176 | 176 | crearNotaPedidoService.crearNotaPedido(notaPedido).then( |
| 177 | 177 | function(data) { |
| 178 | + // Al guardar los datos de la nota de pedido logueamos la | |
| 179 | + // actividad para su seguimiento. | |
| 180 | + focaSeguimientoService.guardarPosicion( | |
| 181 | + $scope.notaPedido.vendedor.CodVen, | |
| 182 | + 'Nota de pedido', | |
| 183 | + 'Nº: ' + $filter('comprobante')([ | |
| 184 | + $scope.puntoVenta, | |
| 185 | + $scope.comprobante | |
| 186 | + ]) + '<br/>' + | |
| 187 | + 'Vendedor: ' + $scope.notaPedido.vendedor.NomVen + '<br/>' + | |
| 188 | + 'Total: ' + $filter('currency')($scope.getTotal()) | |
| 189 | + ); | |
| 178 | 190 | notaPedidoBusinessService.addArticulos($scope.articulosTabla, |
| 179 | 191 | data.data.id, $scope.notaPedido.cotizacion.VENDEDOR); |
| 180 | - focaSeguimientoService.guardarPosicion('crear nota pedido', ''); | |
| 181 | 192 | var plazos = $scope.plazosPagos; |
| 182 | 193 | |
| 183 | 194 | for(var j = 0; j < plazos.length; j++) { |
| ... | ... | @@ -188,7 +199,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 188 | 199 | crearNotaPedidoService.crearPlazosParaNotaPedido(json); |
| 189 | 200 | } |
| 190 | 201 | notaPedidoBusinessService.addEstado(data.data.id, |
| 191 | - $scope.notaPedido.vendedor.codigo); | |
| 202 | + $scope.notaPedido.vendedor.CodVen); | |
| 192 | 203 | |
| 193 | 204 | focaModalService.alert('Nota pedido creada'); |
| 194 | 205 | $scope.cabecera = []; |
| ... | ... | @@ -198,6 +209,17 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 198 | 209 | $filter('date')($scope.notaPedido.cotizacion.FECHA, 'dd/MM/yyyy') |
| 199 | 210 | ); |
| 200 | 211 | addCabecera('Cotizacion:', $scope.notaPedido.cotizacion.VENDEDOR); |
| 212 | + crearNotaPedidoService.getNumeroNotaPedido().then( | |
| 213 | + function(res) { | |
| 214 | + $scope.puntoVenta = rellenar(res.data.sucursal, 4); | |
| 215 | + $scope.comprobante = rellenar(res.data.numeroNotaPedido, 8); | |
| 216 | + }, | |
| 217 | + function(err) { | |
| 218 | + focaModalService.alert( | |
| 219 | + 'La terminal no esta configurada correctamente'); | |
| 220 | + console.info(err); | |
| 221 | + } | |
| 222 | + ); | |
| 201 | 223 | $scope.notaPedido.vendedor = {}; |
| 202 | 224 | $scope.notaPedido.cliente = {}; |
| 203 | 225 | $scope.notaPedido.proveedor = {}; |
| ... | ... | @@ -214,6 +236,113 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 214 | 236 | } |
| 215 | 237 | ); |
| 216 | 238 | }; |
| 239 | + | |
| 240 | + $scope.seleccionarNotaPedido = function() { | |
| 241 | + var modalInstance = $uibModal.open( | |
| 242 | + { | |
| 243 | + ariaLabelledBy: 'Busqueda de Nota de Pedido', | |
| 244 | + templateUrl: 'foca-modal-nota-pedido.html', | |
| 245 | + controller: 'focaModalNotaPedidoController', | |
| 246 | + size: 'lg', | |
| 247 | + resolve: {usadoPor: function(){return 'notaPedido';}} | |
| 248 | + } | |
| 249 | + ); | |
| 250 | + modalInstance.result.then( | |
| 251 | + function(notaPedido) { | |
| 252 | + //añado cabeceras | |
| 253 | + $scope.notaPedido.id = notaPedido.id; | |
| 254 | + removeCabecera('Moneda:'); | |
| 255 | + removeCabecera('Fecha cotizacion:'); | |
| 256 | + removeCabecera('Cotizacion:'); | |
| 257 | + var cabeceras = [ | |
| 258 | + { | |
| 259 | + label: 'Moneda:', | |
| 260 | + valor: notaPedido.cotizacion[0].moneda[0].DETALLE | |
| 261 | + }, | |
| 262 | + { | |
| 263 | + label: 'Fecha cotizacion:', | |
| 264 | + valor: $filter('date')(notaPedido.cotizacion[0].FECHA, | |
| 265 | + 'dd/MM/yyyy') | |
| 266 | + }, | |
| 267 | + { | |
| 268 | + label: 'Cotizacion:', | |
| 269 | + valor: notaPedido.cotizacion[0].VENDEDOR | |
| 270 | + }, | |
| 271 | + { | |
| 272 | + label: 'Cliente:', | |
| 273 | + valor: notaPedido.cliente[0].NOM | |
| 274 | + }, | |
| 275 | + { | |
| 276 | + label: 'Domicilio:', | |
| 277 | + valor: notaPedido.domicilioStamp | |
| 278 | + }, | |
| 279 | + { | |
| 280 | + label: 'Vendedor:', | |
| 281 | + valor: notaPedido.vendedor[0].NomVen | |
| 282 | + }, | |
| 283 | + { | |
| 284 | + label: 'Proveedor:', | |
| 285 | + valor: notaPedido.proveedor[0].NOM | |
| 286 | + }, | |
| 287 | + { | |
| 288 | + label: 'Flete:', | |
| 289 | + valor: notaPedido.flete === 1 ? 'Si' : 'No' | |
| 290 | + }, | |
| 291 | + { | |
| 292 | + label: 'FOB:', | |
| 293 | + valor: notaPedido.fob === 1 ? 'Si' : 'No' | |
| 294 | + }, | |
| 295 | + { | |
| 296 | + label: 'Precio condicion:', | |
| 297 | + valor: valorPrecioCondicion() | |
| 298 | + } | |
| 299 | + ]; | |
| 300 | + //TODO MOSTRAR PLAZOS | |
| 301 | + function valorPrecioCondicion() { | |
| 302 | + if(notaPedido.idPrecioCondicion > 0) { | |
| 303 | + return notaPedido.precioCondicion[0].nombre; | |
| 304 | + } else { | |
| 305 | + return 'Ingreso Manual'; | |
| 306 | + } | |
| 307 | + } | |
| 308 | + | |
| 309 | + if(notaPedido.flete === 1) { | |
| 310 | + var cabeceraBomba = { | |
| 311 | + label: 'Bomba', | |
| 312 | + valor: notaPedido.bomba === 1 ? 'Si' : 'No' | |
| 313 | + }; | |
| 314 | + if(notaPedido.kilometros) { | |
| 315 | + var cabeceraKilometros = { | |
| 316 | + label: 'Kilometros', | |
| 317 | + valor: notaPedido.kilometros | |
| 318 | + }; | |
| 319 | + cabeceras.push(cabeceraKilometros); | |
| 320 | + } | |
| 321 | + cabeceras.push(cabeceraBomba); | |
| 322 | + } | |
| 323 | + $scope.articulosTabla = notaPedido.articulosNotaPedido; | |
| 324 | + notaPedidoBusinessService.calcularArticulos($scope.articulosTabla, | |
| 325 | + notaPedido.cotizacion[0].VENDEDOR); | |
| 326 | + if(notaPedido.precioCondicion.length > 0) { | |
| 327 | + $scope.idLista = notaPedido.precioCondicion[0].idListaPrecio; | |
| 328 | + } else { | |
| 329 | + $scope.idLista = -1; | |
| 330 | + } | |
| 331 | + $scope.comprobante = rellenar(notaPedido.numeroNotaPedido, 8); | |
| 332 | + $scope.notaPedido = notaPedido; | |
| 333 | + $scope.notaPedido.vendedor = notaPedido.vendedor[0]; | |
| 334 | + $scope.notaPedido.cliente = notaPedido.cliente[0]; | |
| 335 | + $scope.notaPedido.proveedor = notaPedido.proveedor[0]; | |
| 336 | + $scope.notaPedido.moneda = notaPedido.cotizacion[0].moneda[0]; | |
| 337 | + $scope.notaPedido.cotizacion = notaPedido.cotizacion[0]; | |
| 338 | + $scope.plazosPagos = notaPedido.plazoPago; | |
| 339 | + addArrayCabecera(cabeceras); | |
| 340 | + | |
| 341 | + }, function() { | |
| 342 | + // funcion ejecutada cuando se cancela el modal | |
| 343 | + } | |
| 344 | + ); | |
| 345 | + }; | |
| 217 | 346 | |
| 218 | 347 | $scope.seleccionarArticulo = function() { |
| 219 | 348 | if ($scope.idLista === undefined) { |
| ... | ... | @@ -230,7 +359,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 230 | 359 | parametroProducto: { |
| 231 | 360 | idLista: $scope.idLista, |
| 232 | 361 | cotizacion: $scope.notaPedido.cotizacion.VENDEDOR, |
| 233 | - simbolo: $scope.notaPedido.moneda.simbolo | |
| 362 | + simbolo: $scope.notaPedido.moneda.SIMBOLO | |
| 234 | 363 | } |
| 235 | 364 | }, |
| 236 | 365 | size: 'lg' |
| ... | ... | @@ -250,7 +379,16 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 250 | 379 | precio: parseFloat(producto.precio.toFixed(4)), |
| 251 | 380 | costoUnitario: producto.costo, |
| 252 | 381 | editCantidad: false, |
| 253 | - editPrecio: false | |
| 382 | + editPrecio: false, | |
| 383 | + rubro: producto.CodRub, | |
| 384 | + exentoUnitario: producto.precio, | |
| 385 | + ivaUnitario: producto.IMPIVA, | |
| 386 | + impuestoInternoUnitario: producto.ImpInt, | |
| 387 | + impuestoInterno1Unitario: producto.ImpInt2, | |
| 388 | + impuestoInterno2Unitario: producto.ImpInt3, | |
| 389 | + precioLista: producto.precio, | |
| 390 | + combustible: 1, | |
| 391 | + facturado: 0 | |
| 254 | 392 | }; |
| 255 | 393 | $scope.articuloACargar = newArt; |
| 256 | 394 | $scope.cargando = false; |
| ... | ... | @@ -272,7 +410,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 272 | 410 | modalInstance.result.then( |
| 273 | 411 | function(vendedor) { |
| 274 | 412 | addCabecera('Vendedor:', vendedor.NomVen); |
| 275 | - $scope.notaPedido.vendedor.codigo = vendedor.CodVen; | |
| 413 | + $scope.notaPedido.vendedor = vendedor; | |
| 276 | 414 | }, function() { |
| 277 | 415 | |
| 278 | 416 | } |
| ... | ... | @@ -295,7 +433,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 295 | 433 | ); |
| 296 | 434 | modalInstance.result.then( |
| 297 | 435 | function(proveedor) { |
| 298 | - $scope.notaPedido.proveedor.codigo = proveedor.COD; | |
| 436 | + $scope.notaPedido.proveedor = proveedor; | |
| 299 | 437 | addCabecera('Proveedor:', proveedor.NOM); |
| 300 | 438 | }, function() { |
| 301 | 439 | |
| ... | ... | @@ -334,8 +472,12 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 334 | 472 | ); |
| 335 | 473 | modalInstanceDomicilio.result.then( |
| 336 | 474 | function(domicilio) { |
| 337 | - $scope.notaPedido.domicilio.id = domicilio.id; | |
| 338 | - $scope.notaPedido.cliente = cliente; | |
| 475 | + $scope.notaPedido.domicilio = domicilio; | |
| 476 | + $scope.notaPedido.cliente = { | |
| 477 | + COD: cliente.cod, | |
| 478 | + CUIT: cliente.cuit, | |
| 479 | + NOM: cliente.nom | |
| 480 | + }; | |
| 339 | 481 | addCabecera('Cliente:', cliente.nom); |
| 340 | 482 | var domicilioStamp = |
| 341 | 483 | domicilio.Calle + ' ' + domicilio.Numero + ', ' + |
| ... | ... | @@ -498,11 +640,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 498 | 640 | cotizacion.VENDEDOR; |
| 499 | 641 | } |
| 500 | 642 | $scope.articulosTabla = articulosTablaTemp; |
| 501 | - $scope.notaPedido.moneda = { | |
| 502 | - id: moneda.ID, | |
| 503 | - detalle: moneda.DETALLE, | |
| 504 | - simbolo: moneda.SIMBOLO | |
| 505 | - }; | |
| 643 | + $scope.notaPedido.moneda = moneda; | |
| 506 | 644 | $scope.notaPedido.cotizacion = cotizacion; |
| 507 | 645 | addCabecera('Moneda:', moneda.DETALLE); |
| 508 | 646 | addCabecera( |
| ... | ... | @@ -605,6 +743,12 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 605 | 743 | articulo.cantidad = parseFloat(articulo.cantidad); |
| 606 | 744 | articulo.precio = parseFloat(articulo.precio); |
| 607 | 745 | }; |
| 746 | + | |
| 747 | + function addArrayCabecera(array) { | |
| 748 | + for(var i = 0; i < array.length; i++) { | |
| 749 | + addCabecera(array[i].label, array[i].valor); | |
| 750 | + } | |
| 751 | + } | |
| 608 | 752 | |
| 609 | 753 | function addCabecera(label, valor) { |
| 610 | 754 | var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); |
| ... | ... | @@ -630,6 +774,15 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 630 | 774 | |
| 631 | 775 | return relleno; |
| 632 | 776 | } |
| 777 | + | |
| 778 | + function validarNotaRemitada(funcion) { | |
| 779 | + if($scope.notaPedido.idRemito) { | |
| 780 | + focaModalService.alert('No se puede editar una nota de pedido remitada'); | |
| 781 | + } | |
| 782 | + else { | |
| 783 | + funcion(); | |
| 784 | + } | |
| 785 | + } | |
| 633 | 786 | } |
| 634 | 787 | ] |
| 635 | 788 | ) |
src/views/foca-crear-nota-pedido-ficha-cliente.html
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | <nav> |
| 47 | 47 | <ul class="pagination justify-content-end"> |
| 48 | 48 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 49 | - <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)"> | |
| 49 | + <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | |
| 50 | 50 | <span aria-hidden="true">«</span> |
| 51 | 51 | <span class="sr-only">Anterior</span> |
| 52 | 52 | </a> |
| ... | ... | @@ -58,13 +58,13 @@ |
| 58 | 58 | > |
| 59 | 59 | <a |
| 60 | 60 | class="page-link" |
| 61 | - href="#" | |
| 61 | + href="javascript:void();" | |
| 62 | 62 | ng-click="selectPage(pagina)" |
| 63 | 63 | ng-bind="pagina" |
| 64 | 64 | ></a> |
| 65 | 65 | </li> |
| 66 | 66 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
| 67 | - <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)"> | |
| 67 | + <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | |
| 68 | 68 | <span aria-hidden="true">»</span> |
| 69 | 69 | <span class="sr-only">Siguiente</span> |
| 70 | 70 | </a> |
src/views/nota-pedido.html
| ... | ... | @@ -10,6 +10,13 @@ |
| 10 | 10 | </div> |
| 11 | 11 | <div class="col-5 col-sm-4 numero-pedido" |
| 12 | 12 | >Nº {{puntoVenta}}-{{comprobante}} |
| 13 | + <button | |
| 14 | + class="btn btn-xs btn-outline-dark" | |
| 15 | + type="button" | |
| 16 | + ng-click="seleccionarNotaPedido()" | |
| 17 | + > | |
| 18 | + <i class="fa fa-search"></i> | |
| 19 | + </button> | |
| 13 | 20 | </div> |
| 14 | 21 | <div class="col-7 col-sm-4 text-right"> |
| 15 | 22 | Fecha: |
| ... | ... | @@ -165,12 +172,14 @@ |
| 165 | 172 | class="selectable" |
| 166 | 173 | ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" |
| 167 | 174 | ng-hide="articulo.editPrecio" |
| 168 | - ng-bind="articulo.precio | currency: notaPedido.moneda.simbolo : 4"> | |
| 175 | + ng-bind="articulo.precio | | |
| 176 | + currency: notaPedido.moneda.SIMBOLO : 4"> | |
| 169 | 177 | </i> |
| 170 | 178 | </td> |
| 171 | 179 | <td |
| 172 | 180 | class="col text-right" |
| 173 | - ng-bind="(articulo.precio * articulo.cantidad) | currency: notaPedido.moneda.simbolo"> | |
| 181 | + ng-bind="(articulo.precio * articulo.cantidad) | | |
| 182 | + currency: notaPedido.moneda.SIMBOLO"> | |
| 174 | 183 | </td> |
| 175 | 184 | <td class="text-center"> |
| 176 | 185 | <button |
| ... | ... | @@ -225,7 +234,8 @@ |
| 225 | 234 | <td class="col text-right"> |
| 226 | 235 | <input |
| 227 | 236 | class="form-control" |
| 228 | - ng-value="articuloACargar.precio | currency: notaPedido.moneda.simbolo : 4" | |
| 237 | + ng-value="articuloACargar.precio | | |
| 238 | + currency: notaPedido.moneda.SIMBOLO : 4" | |
| 229 | 239 | ng-show="idLista != -1" |
| 230 | 240 | readonly |
| 231 | 241 | > |
| ... | ... | @@ -244,7 +254,7 @@ |
| 244 | 254 | <td class="col text-right"> |
| 245 | 255 | <input |
| 246 | 256 | class="form-control" |
| 247 | - ng-value="getSubTotal() | currency: notaPedido.moneda.simbolo" | |
| 257 | + ng-value="getSubTotal() | currency: notaPedido.moneda.SIMBOLO" | |
| 248 | 258 | readonly |
| 249 | 259 | ></td> |
| 250 | 260 | <td class="text-center align-middle"> |
| ... | ... | @@ -275,7 +285,7 @@ |
| 275 | 285 | <h3>Total:</h3> |
| 276 | 286 | </td> |
| 277 | 287 | <td class="table-celda-total text-right no-border-top" colspan="1"> |
| 278 | - <h3>{{getTotal() | currency: notaPedido.moneda.simbolo}}</h3> | |
| 288 | + <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 279 | 289 | </td> |
| 280 | 290 | <td class="text-right no-border-top"> |
| 281 | 291 | <button |
| ... | ... | @@ -337,11 +347,15 @@ |
| 337 | 347 | <span ng-bind="'x' + articulo.cantidad"></span> |
| 338 | 348 | </div> |
| 339 | 349 | <div class="col-3 px-1 text-right"> |
| 340 | - <span ng-bind="articulo.precio | currency: notaPedido.moneda.simbolo : 4"></span> | |
| 350 | + <span | |
| 351 | + ng-bind="articulo.precio | | |
| 352 | + currency: notaPedido.moneda.SIMBOLO : 4" | |
| 353 | + ></span> | |
| 341 | 354 | </div> |
| 342 | 355 | <div class="col px-1 text-right"> |
| 343 | 356 | <span |
| 344 | - ng-bind="(articulo.precio * articulo.cantidad) | currency: notaPedido.moneda.simbolo" | |
| 357 | + ng-bind="(articulo.precio * articulo.cantidad) | | |
| 358 | + currency: notaPedido.moneda.SIMBOLO" | |
| 345 | 359 | > |
| 346 | 360 | </span> |
| 347 | 361 | </div> |
| ... | ... | @@ -389,11 +403,13 @@ |
| 389 | 403 | > |
| 390 | 404 | </div> |
| 391 | 405 | <div class="col-3 px-1 text-right"> |
| 392 | - <span ng-bind="articuloACargar.precio | currency: notaPedido.moneda.simbolo : 4"></span> | |
| 406 | + <span ng-bind="articuloACargar.precio | | |
| 407 | + currency: notaPedido.moneda.SIMBOLO : 4"></span> | |
| 393 | 408 | </div> |
| 394 | 409 | <div class="col px-1 text-right"> |
| 395 | 410 | <span |
| 396 | - ng-bind="getSubTotal() | currency: notaPedido.moneda.simbolo" | |
| 411 | + ng-bind="getSubTotal() | | |
| 412 | + currency: notaPedido.moneda.SIMBOLO" | |
| 397 | 413 | > |
| 398 | 414 | </span> |
| 399 | 415 | </div> |
| ... | ... | @@ -451,7 +467,7 @@ |
| 451 | 467 | <h3>Total:</h3> |
| 452 | 468 | </td> |
| 453 | 469 | <td class="table-celda-total text-right no-border-top"> |
| 454 | - <h3>{{getTotal() | currency: notaPedido.moneda.simbolo}}</h3> | |
| 470 | + <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 455 | 471 | </td> |
| 456 | 472 | </tr> |
| 457 | 473 | </tfoot> |
| ... | ... | @@ -465,7 +481,9 @@ |
| 465 | 481 | ng-click="crearNotaPedido()" |
| 466 | 482 | type="submit" |
| 467 | 483 | title="Crear nota pedido" |
| 468 | - class="btn btn-default btn-block mb-2"> | |
| 484 | + class="btn btn-default btn-block mb-2" | |
| 485 | + ng-disabled="notaPedido.idRemito" | |
| 486 | + > | |
| 469 | 487 | Guardar |
| 470 | 488 | </button> |
| 471 | 489 | <button |