From e9ecb6896474811013d820b719a981800dd80121 Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Thu, 18 Oct 2018 18:11:40 -0300 Subject: [PATCH] cambio ingreso articulo --- src/js/controller.js | 15 ++++++-- src/views/nota-pedido.html | 85 +++++++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index e6b6d54..2d96f18 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -114,14 +114,16 @@ angular.module('focaCrearNotaPedido') var newArt = { id: 0, - codigo: producto.FiltroSectorCodigo, + codigo: producto.codigo, + sector: producto.sector, + descripcion: producto.descripcion, item: $scope.articulosTabla.length + 1, nombre: producto.descripcion, - precio: producto.precio, + precio: producto.precio.toFixed(2), costoUnitario: producto.costo, cantidad: 1 }; - $scope.articulosTabla.unshift(newArt); + $scope.articuloACargar = newArt; }, function() { // funcion ejecutada cuando se cancela el modal } @@ -223,6 +225,7 @@ angular.module('focaCrearNotaPedido') modalInstance.result.then( function(precioCondicion) { $scope.notaPedido.precioCondicion = precioCondicion.nombre; + idLista = precioCondicion.idListaPrecio; }, function() { } @@ -248,6 +251,12 @@ angular.module('focaCrearNotaPedido') ); } }; + $scope.agregarATabla = function(key) { + if(key === 13) { + $scope.articulosTabla.unshift($scope.articuloACargar); + $scope.articuloACargar = undefined; + } + }; } ] ) diff --git a/src/views/nota-pedido.html b/src/views/nota-pedido.html index 53e40dc..8ad5b59 100644 --- a/src/views/nota-pedido.html +++ b/src/views/nota-pedido.html @@ -139,13 +139,12 @@ Sector Código - Descripción - Cantidad + Descripción Precio Unitario + Cantidad SubTotal - - @@ -153,51 +152,51 @@ - + - - - 1 - 1 - Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... - {{10000 | number: 2}} - {{1000000000 | currency:'$'}} - {{1000000000 | currency:'$'}} - - - - + + + + + + + - - 1 - 2 - Lorem Ipsum - 1 - {{1000000000 | currency:'U$D'}} - {{10 | currency:'$'}} - - - - - - - 1 - 2 - Lorem Ipsum - 1 - {{10 | currency:'$'}} - {{10 | currency:'$'}} - + + + + + + +