Commit 4cee7ed9234aec711ed288935c0bc3d383b0cbfe

Authored by Eric Fernandez
1 parent 29128b7e8e
Exists in master

demo

1 const templateCache = require('gulp-angular-templatecache'); 1 const templateCache = require('gulp-angular-templatecache');
2 const clean = require('gulp-clean'); 2 const clean = require('gulp-clean');
3 const concat = require('gulp-concat'); 3 const concat = require('gulp-concat');
4 const htmlmin = require('gulp-htmlmin'); 4 const htmlmin = require('gulp-htmlmin');
5 const rename = require('gulp-rename'); 5 const rename = require('gulp-rename');
6 const uglify = require('gulp-uglify'); 6 const uglify = require('gulp-uglify');
7 const gulp = require('gulp'); 7 const gulp = require('gulp');
8 const pump = require('pump'); 8 const pump = require('pump');
9 const jshint = require('gulp-jshint'); 9 const jshint = require('gulp-jshint');
10 const replace = require('gulp-replace'); 10 const replace = require('gulp-replace');
11 const connect = require('gulp-connect'); 11 const connect = require('gulp-connect');
12 12
13 var paths = { 13 var paths = {
14 srcJS: 'src/js/*.js', 14 srcJS: 'src/js/*.js',
15 srcViews: 'src/views/*.html', 15 srcViews: 'src/views/*.html',
16 tmp: 'tmp', 16 tmp: 'tmp',
17 dist: 'dist/' 17 dist: 'dist/'
18 }; 18 };
19 19
20 gulp.task('templates', ['clean'], function() { 20 gulp.task('templates', ['clean'], function() {
21 return pump( 21 return pump(
22 [ 22 [
23 gulp.src(paths.srcViews), 23 gulp.src(paths.srcViews),
24 htmlmin(), 24 htmlmin(),
25 templateCache('views.js', { 25 templateCache('views.js', {
26 module: 'focaCrearNotaPedido', 26 module: 'focaCrearNotaPedido',
27 root: '' 27 root: ''
28 }), 28 }),
29 gulp.dest(paths.tmp) 29 gulp.dest(paths.tmp)
30 ] 30 ]
31 ); 31 );
32 }); 32 });
33 33
34 gulp.task('uglify', ['templates'], function() { 34 gulp.task('uglify', ['templates'], function() {
35 return pump( 35 return pump(
36 [ 36 [
37 gulp.src([ 37 gulp.src([
38 paths.srcJS, 38 paths.srcJS,
39 'tmp/views.js' 39 'tmp/views.js'
40 ]), 40 ]),
41 concat('foca-crear-nota-pedido.js'), 41 concat('foca-crear-nota-pedido.js'),
42 replace('src/views/', ''), 42 replace('src/views/', ''),
43 gulp.dest(paths.tmp), 43 gulp.dest(paths.tmp),
44 rename('foca-crear-nota-pedido.min.js'), 44 rename('foca-crear-nota-pedido.min.js'),
45 uglify(), 45 uglify(),
46 replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ 46 replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+
47 '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+ 47 '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+
48 '"focaModalFlete"', ''), 48 '"focaModalFlete","focaModal"', ''),
49 gulp.dest(paths.dist) 49 gulp.dest(paths.dist)
50 ] 50 ]
51 ); 51 );
52 }); 52 });
53 53
54 gulp.task('clean', function(){ 54 gulp.task('clean', function(){
55 return gulp.src(['tmp', 'dist'], {read: false}) 55 return gulp.src(['tmp', 'dist'], {read: false})
56 .pipe(clean()); 56 .pipe(clean());
57 }); 57 });
58 58
59 gulp.task('pre-commit', function() { 59 gulp.task('pre-commit', function() {
60 return pump( 60 return pump(
61 [ 61 [
62 gulp.src(paths.srcJS), 62 gulp.src(paths.srcJS),
63 jshint('.jshintrc'), 63 jshint('.jshintrc'),
64 jshint.reporter('default'), 64 jshint.reporter('default'),
65 jshint.reporter('fail') 65 jshint.reporter('fail')
66 ] 66 ]
67 ); 67 );
68 68
69 gulp.start('uglify'); 69 gulp.start('uglify');
70 }); 70 });
71 71
72 gulp.task('webserver', function() { 72 gulp.task('webserver', function() {
73 pump [ 73 pump [
74 connect.server({port: 3000}) 74 connect.server({port: 3000})
75 ] 75 ]
76 }); 76 });
77 77
78 gulp.task('clean-post-install', function() { 78 gulp.task('clean-post-install', function() {
79 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', 79 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
80 'index.html'], {read: false}) 80 'index.html'], {read: false})
81 .pipe(clean()); 81 .pipe(clean());
82 }); 82 });
83 83
84 gulp.task('default', ['webserver']); 84 gulp.task('default', ['webserver']);
85 85
1 <html ng-app="focaCrearNotaPedido"> 1 <html ng-app="focaCrearNotaPedido">
2 <head> 2 <head>
3 <meta charset="UTF-8"/> 3 <meta charset="UTF-8"/>
4 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 4 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
5 5
6 <!--CSS--> 6 <!--CSS-->
7 <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> 7 <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
8 <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/> 8 <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
9 9
10 <!--VENDOR JS--> 10 <!--VENDOR JS-->
11 <script src="node_modules/jquery/dist/jquery.min.js"></script> 11 <script src="node_modules/jquery/dist/jquery.min.js"></script>
12 <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> 12 <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
13 <script src="node_modules/angular/angular.min.js"></script> 13 <script src="node_modules/angular/angular.min.js"></script>
14 <script src="node_modules/angular-route/angular-route.min.js"></script> 14 <script src="node_modules/angular-route/angular-route.min.js"></script>
15 <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> 15 <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script>
16 16
17 <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script> 17 <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script>
18 <script src="node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script> 18 <script src="node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script>
19 <script src="node_modules/foca-modal-busqueda-productos/dist/foca-busqueda-productos.min.js"></script> 19 <script src="node_modules/foca-modal-busqueda-productos/dist/foca-busqueda-productos.min.js"></script>
20 <script src="node_modules/foca-modal-petroleras/dist/foca-modal-petroleras.min.js"></script> 20 <script src="node_modules/foca-modal-petroleras/dist/foca-modal-petroleras.min.js"></script>
21 <script src="node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js"></script> 21 <script src="node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js"></script>
22 <script src="node_modules/foca-modal-precio-condiciones/dist/foca-modal-precio-condiciones.min.js"></script> 22 <script src="node_modules/foca-modal-precio-condiciones/dist/foca-modal-precio-condiciones.min.js"></script>
23 <script src="node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script> 23 <script src="node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script>
24 <script src="node_modules/foca-modal/dist/foca-modal.min.js"></script>
25
24 <script src="src/js/app.js"></script> 26 <script src="src/js/app.js"></script>
25 <script src="src/js/controller.js"></script> 27 <script src="src/js/controller.js"></script>
26 <script src="src/js/service.js"></script> 28 <script src="src/js/service.js"></script>
27 <script src="src/js/route.js"></script> 29 <script src="src/js/route.js"></script>
28 30
29 <script src="src/etc/develop.js"></script> 31 <script src="src/etc/develop.js"></script>
30 </head> 32 </head>
31 <body> 33 <body>
32 <div ng-view class="container-fluid"></div> 34 <div ng-view class="container-fluid"></div>
33 </body> 35 </body>
34 </html> 36 </html>
35 37
1 { 1 {
2 "name": "foca-crear-nota-pedido", 2 "name": "foca-crear-nota-pedido",
3 "version": "0.0.1", 3 "version": "0.0.1",
4 "description": "Listado y ABM nota de pedidos", 4 "description": "Listado y ABM nota de pedidos",
5 "main": "index.js", 5 "main": "index.js",
6 "scripts": { 6 "scripts": {
7 "test": "echo \"Error: no test specified\" && exit 1", 7 "test": "echo \"Error: no test specified\" && exit 1",
8 "compile": "gulp uglify", 8 "compile": "gulp uglify",
9 "gulp-pre-commit": "gulp pre-commit", 9 "gulp-pre-commit": "gulp pre-commit",
10 "postinstall": "npm run compile && gulp clean-post-install", 10 "postinstall": "npm run compile && gulp clean-post-install",
11 "install-dev": "npm install -D jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git git+https://debo.suite.repo/modulos-npm/foca-modal-flete" 11 "install-dev": "npm install -D jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git git+https://debo.suite.repo/modulos-npm/foca-modal-flete git+https://debo.suite.repo/modulos-npm/foca-modal.git"
12 }, 12 },
13 "pre-commit": [ 13 "pre-commit": [
14 "gulp-pre-commit" 14 "gulp-pre-commit"
15 ], 15 ],
16 "repository": { 16 "repository": {
17 "type": "git", 17 "type": "git",
18 "url": "https://debo.suite.repo/modulos-npm/foca-crear-nota-pedido.git" 18 "url": "https://debo.suite.repo/modulos-npm/foca-crear-nota-pedido.git"
19 }, 19 },
20 "author": "Foca Software", 20 "author": "Foca Software",
21 "license": "ISC", 21 "license": "ISC",
22 "peerDependencies": { 22 "peerDependencies": {
23 "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git", 23 "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git",
24 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", 24 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git",
25 "foca-modal-busqueda-productos": "git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos", 25 "foca-modal-busqueda-productos": "git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos",
26 "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", 26 "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git",
27 "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git" 27 "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git"
28 }, 28 },
29 "devDependencies": { 29 "devDependencies": {
30 "angular": "^1.7.5", 30 "angular": "^1.7.5",
31 "angular-route": "^1.7.5", 31 "angular-route": "^1.7.5",
32 "bootstrap": "^4.1.3", 32 "bootstrap": "^4.1.3",
33 "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git", 33 "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git",
34 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", 34 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git",
35 "foca-modal": "git+https://debo.suite.repo/modulos-npm/foca-modal.git",
35 "foca-modal-busqueda-productos": "git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos", 36 "foca-modal-busqueda-productos": "git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos",
36 "foca-modal-flete": "git+https://debo.suite.repo/modulos-npm/foca-modal-flete", 37 "foca-modal-flete": "git+https://debo.suite.repo/modulos-npm/foca-modal-flete",
37 "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", 38 "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git",
38 "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", 39 "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git",
39 "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", 40 "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git",
40 "font-awesome": "^4.7.0", 41 "font-awesome": "^4.7.0",
41 "gulp": "^3.9.1", 42 "gulp": "^3.9.1",
42 "gulp-angular-templatecache": "2.2.2", 43 "gulp-angular-templatecache": "2.2.2",
43 "gulp-clean": "^0.4.0", 44 "gulp-clean": "^0.4.0",
44 "gulp-concat": "^2.6.1", 45 "gulp-concat": "^2.6.1",
45 "gulp-connect": "^5.6.1", 46 "gulp-connect": "^5.6.1",
46 "gulp-htmlmin": "^5.0.1", 47 "gulp-htmlmin": "^5.0.1",
47 "gulp-jshint": "^2.1.0", 48 "gulp-jshint": "^2.1.0",
48 "gulp-rename": "^1.4.0", 49 "gulp-rename": "^1.4.0",
49 "gulp-replace": "^1.0.0", 50 "gulp-replace": "^1.0.0",
50 "gulp-sequence": "^1.0.0", 51 "gulp-sequence": "^1.0.0",
51 "gulp-uglify": "^3.0.1", 52 "gulp-uglify": "^3.0.1",
52 "gulp-uglify-es": "^1.0.4", 53 "gulp-uglify-es": "^1.0.4",
53 "jasmine-core": "^3.2.1", 54 "jasmine-core": "^3.2.1",
54 "jquery": "^3.3.1", 55 "jquery": "^3.3.1",
55 "jshint": "^2.9.6", 56 "jshint": "^2.9.6",
56 "pre-commit": "^1.2.2", 57 "pre-commit": "^1.2.2",
57 "pump": "^3.0.0", 58 "pump": "^3.0.0",
58 "ui-bootstrap4": "^3.0.5" 59 "ui-bootstrap4": "^3.0.5"
59 } 60 }
60 } 61 }
61 62
1 angular.module('focaCrearNotaPedido', [ 1 angular.module('focaCrearNotaPedido', [
2 'ngRoute', 2 'ngRoute',
3 'ui.bootstrap', 3 'ui.bootstrap',
4 'focaModalVendedores', 4 'focaModalVendedores',
5 'focaBusquedaProductos', 5 'focaBusquedaProductos',
6 'focaModalPetroleras', 6 'focaModalPetroleras',
7 'focaBusquedaCliente', 7 'focaBusquedaCliente',
8 'focaModalPrecioCondicion', 8 'focaModalPrecioCondicion',
9 'focaModalFlete', 9 'focaModalFlete',
10 'focaDirectivas' 10 'focaDirectivas',
11 'focaModal'
11 ]); 12 ]);
12 13
src/js/controller.js
1 angular.module('focaCrearNotaPedido') 1 angular.module('focaCrearNotaPedido')
2 .controller('notaPedidoCtrl', 2 .controller('notaPedidoCtrl',
3 ['$scope', '$uibModal', '$location', 'crearNotaPedidoService', 3 ['$scope', '$uibModal', '$location', 'crearNotaPedidoService', 'focaModalService',
4 function($scope, $uibModal, $location, crearNotaPedidoService) { 4 function($scope, $uibModal, $location, crearNotaPedidoService, focaModalService) {
5 $scope.show = false; 5 $scope.show = false;
6 $scope.edit = false; 6 $scope.edit = false;
7 $scope.dateOptions = { 7 $scope.dateOptions = {
8 maxDate: new Date(), 8 maxDate: new Date(),
9 minDate: new Date(2010, 0, 1) 9 minDate: new Date(2010, 0, 1)
10 }; 10 };
11
12 $scope.notaPedido = { 11 $scope.notaPedido = {
13 vendedor: {}, 12 vendedor: {},
14 cliente: {} 13 cliente: {}
15 }; 14 };
16 $scope.articulosTabla = []; 15 $scope.articulosTabla = [];
17 var idLista; 16 var idLista;
18 var notaPedidoTemp = crearNotaPedidoService.getNotaPedido(); 17 var notaPedidoTemp = crearNotaPedidoService.getNotaPedido();
19 $scope.domiciliosCliente = crearNotaPedidoService.getDomicilios(1); 18 $scope.domiciliosCliente = crearNotaPedidoService.getDomicilios(1);
20 crearNotaPedidoService.getPrecioCondicion().then( 19 crearNotaPedidoService.getPrecioCondicion().then(
21 function(res) { 20 function(res) {
22 $scope.precioCondiciones = res.data; 21 $scope.precioCondiciones = res.data;
23 } 22 }
24 ); 23 );
25 if (notaPedidoTemp !== undefined) { 24 if (notaPedidoTemp !== undefined) {
26 notaPedidoTemp.fechaCarga = new Date(notaPedidoTemp.fechaCarga); 25 notaPedidoTemp.fechaCarga = new Date(notaPedidoTemp.fechaCarga);
27 $scope.notaPedido = notaPedidoTemp; 26 $scope.notaPedido = notaPedidoTemp;
28 $scope.notaPedido.flete = ($scope.notaPedido.flete).toString(); 27 $scope.notaPedido.flete = ($scope.notaPedido.flete).toString();
29 $scope.notaPedido.bomba = ($scope.notaPedido.bomba).toString(); 28 $scope.notaPedido.bomba = ($scope.notaPedido.bomba).toString();
30 idLista = $scope.notaPedido.precioCondicion; 29 idLista = $scope.notaPedido.precioCondicion;
31 crearNotaPedidoService 30 crearNotaPedidoService
32 .getArticulosByIdNotaPedido($scope.notaPedido.id).then( 31 .getArticulosByIdNotaPedido($scope.notaPedido.id).then(
33 function(res) { 32 function(res) {
34 $scope.articulosTabla = res.data; 33 $scope.articulosTabla = res.data;
35 } 34 }
36 ); 35 );
37 crearNotaPedidoService.getDomiciliosByIdNotaPedido($scope.notaPedido.id).then( 36 crearNotaPedidoService.getDomiciliosByIdNotaPedido($scope.notaPedido.id).then(
38 function(res) { 37 function(res) {
39 $scope.notaPedido.domicilio = res.data; 38 $scope.notaPedido.domicilio = res.data;
40 } 39 }
41 ); 40 );
42 } else { 41 } else {
43 $scope.notaPedido.fechaCarga = new Date(); 42 $scope.notaPedido.fechaCarga = new Date();
44 $scope.notaPedido.domicilio = [{ id: 0 }]; 43 $scope.notaPedido.domicilio = [{ id: 0 }];
45 $scope.notaPedido.bomba = '1'; 44 $scope.notaPedido.bomba = '1';
46 $scope.notaPedido.flete = '0'; 45 $scope.notaPedido.flete = '0';
47 idLista = undefined; 46 idLista = undefined;
48 } 47 }
49 $scope.addNewDom = function() { 48 $scope.addNewDom = function() {
50 $scope.notaPedido.domicilio.push({ 'id': 0 }); 49 $scope.notaPedido.domicilio.push({ 'id': 0 });
51 }; 50 };
52 $scope.removeNewChoice = function(choice) { 51 $scope.removeNewChoice = function(choice) {
53 if ($scope.notaPedido.domicilio.length > 1) { 52 if ($scope.notaPedido.domicilio.length > 1) {
54 $scope.notaPedido.domicilio.splice($scope.notaPedido.domicilio.findIndex( 53 $scope.notaPedido.domicilio.splice($scope.notaPedido.domicilio.findIndex(
55 function(c) { 54 function(c) {
56 return c.$$hashKey === choice.$$hashKey; 55 return c.$$hashKey === choice.$$hashKey;
57 } 56 }
58 ), 1); 57 ), 1);
59 } 58 }
60 }; 59 };
61 $scope.crearNotaPedido = function() { 60 $scope.crearNotaPedido = function() {
62 var notaPedido = { 61 var notaPedido = {
63 id: 0, 62 id: 0,
64 precioCondicion: $scope.notaPedido.precioCondicion, 63 precioCondicion: $scope.notaPedido.precioCondicion,
65 fechaCarga: $scope.notaPedido.fechaCarga, 64 fechaCarga: $scope.notaPedido.fechaCarga,
66 vendedor: $scope.notaPedido.vendedor, 65 vendedor: $scope.notaPedido.vendedor,
67 cliente: $scope.notaPedido.cliente, 66 cliente: $scope.notaPedido.cliente,
68 producto: $scope.notaPedido.producto, 67 producto: $scope.notaPedido.producto,
69 bomba: $scope.notaPedido.bomba, 68 bomba: $scope.notaPedido.bomba,
70 petrolera: $scope.notaPedido.petrolera, 69 petrolera: $scope.notaPedido.petrolera,
71 domicilio: $scope.notaPedido.domicilio, 70 domicilio: $scope.notaPedido.domicilio,
72 kilometros: $scope.notaPedido.kilometros, 71 kilometros: $scope.notaPedido.kilometros,
73 jurisdiccionIIBB: $scope.notaPedido.jurisdiccionIIBB, 72 jurisdiccionIIBB: $scope.notaPedido.jurisdiccionIIBB,
74 costoFinanciacion: $scope.notaPedido.costoFinanciacion, 73 costoFinanciacion: $scope.notaPedido.costoFinanciacion,
75 flete: $scope.notaPedido.flete, 74 flete: $scope.notaPedido.flete,
76 costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete, 75 costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete,
77 total: $scope.articulosTabla[0].subTotal 76 total: $scope.articulosTabla[0].subTotal
78 }; 77 };
79 crearNotaPedidoService.crearNotaPedido(notaPedido).then( 78 crearNotaPedidoService.crearNotaPedido(notaPedido).then(
80 function() { 79 function() {
81 alert('Nota pedido creada'); 80 focaModalService('Nota pedido creada');
82 $location.path('/venta-nota-pedido'); 81 $location.path('/venta-nota-pedido');
83 } 82 }
84 ); 83 );
85 var articulosNotaPedido = $scope.articulosTabla; 84 var articulosNotaPedido = $scope.articulosTabla;
86 for(var i = 0; i< articulosNotaPedido.length;i++) { 85 for(var i = 0; i< articulosNotaPedido.length;i++) {
87 crearNotaPedidoService 86 crearNotaPedidoService
88 .crearArticulosParaNotaPedido(articulosNotaPedido[i]).then( 87 .crearArticulosParaNotaPedido(articulosNotaPedido[i]).then(
89 function() { 88 function() {
90 return; 89 return;
91 } 90 }
92 ); 91 );
93 } 92 }
94 }; 93 };
95 $scope.siguienteTab = function() { 94 $scope.siguienteTab = function() {
96 $scope.active = 1; 95 $scope.active = 1;
97 }; 96 };
98 $scope.seleccionarArticulo = function() { 97 $scope.seleccionarArticulo = function() {
99 if (idLista === undefined) { 98 if (idLista === undefined) {
100 alert('primero seleccione una lista de precio y condicion'); 99 focaModalService.alert(
100 'primero seleccione una lista de precio y condicion');
101 return; 101 return;
102 } 102 }
103 var modalInstance = $uibModal.open( 103 var modalInstance = $uibModal.open(
104 { 104 {
105 ariaLabelledBy: 'Busqueda de Productos', 105 ariaLabelledBy: 'Busqueda de Productos',
106 templateUrl: 'modal-busqueda-productos.html', 106 templateUrl: 'modal-busqueda-productos.html',
107 controller: 'modalBusquedaProductosCtrl', 107 controller: 'modalBusquedaProductosCtrl',
108 resolve: { idLista: function() { return idLista; } }, 108 resolve: { idLista: function() { return idLista; } },
109 size: 'lg' 109 size: 'lg'
110 } 110 }
111 ); 111 );
112 modalInstance.result.then( 112 modalInstance.result.then(
113 function(producto) { 113 function(producto) {
114 var newArt = 114 var newArt =
115 { 115 {
116 id: 0, 116 id: 0,
117 codigo: producto.codigo, 117 codigo: producto.codigo,
118 sector: producto.sector, 118 sector: producto.sector,
119 descripcion: producto.descripcion, 119 descripcion: producto.descripcion,
120 item: $scope.articulosTabla.length + 1, 120 item: $scope.articulosTabla.length + 1,
121 nombre: producto.descripcion, 121 nombre: producto.descripcion,
122 precio: producto.precio.toFixed(2), 122 precio: producto.precio.toFixed(2),
123 costoUnitario: producto.costo, 123 costoUnitario: producto.costo,
124 cantidad: 1 124 cantidad: 1
125 }; 125 };
126 $scope.articuloACargar = newArt; 126 $scope.articuloACargar = newArt;
127 }, function() { 127 }, function() {
128 // funcion ejecutada cuando se cancela el modal 128 // funcion ejecutada cuando se cancela el modal
129 } 129 }
130 ); 130 );
131 }; 131 };
132 $scope.seleccionarVendedor = function() { 132 $scope.seleccionarVendedor = function() {
133 var modalInstance = $uibModal.open( 133 var modalInstance = $uibModal.open(
134 { 134 {
135 ariaLabelledBy: 'Busqueda de Vendedores', 135 ariaLabelledBy: 'Busqueda de Vendedores',
136 templateUrl: 'modal-vendedores.html', 136 templateUrl: 'modal-vendedores.html',
137 controller: 'modalVendedoresCtrl', 137 controller: 'modalVendedoresCtrl',
138 size: 'lg' 138 size: 'lg'
139 } 139 }
140 ); 140 );
141 modalInstance.result.then( 141 modalInstance.result.then(
142 function(vendedor) { 142 function(vendedor) {
143 $scope.notaPedido.vendedor.nombre = vendedor.NomVen; 143 $scope.notaPedido.vendedor.nombre = vendedor.NomVen;
144 }, function() { 144 }, function() {
145 145
146 } 146 }
147 ); 147 );
148 }; 148 };
149 $scope.seleccionarPetrolera = function() { 149 $scope.seleccionarPetrolera = function() {
150 var modalInstance = $uibModal.open( 150 var modalInstance = $uibModal.open(
151 { 151 {
152 ariaLabelledBy: 'Busqueda de Petrolera', 152 ariaLabelledBy: 'Busqueda de Petrolera',
153 templateUrl: 'modal-petroleras.html', 153 templateUrl: 'modal-petroleras.html',
154 controller: 'modalPetrolerasCtrl', 154 controller: 'modalPetrolerasCtrl',
155 size: 'lg' 155 size: 'lg'
156 } 156 }
157 ); 157 );
158 modalInstance.result.then( 158 modalInstance.result.then(
159 function(petrolera) { 159 function(petrolera) {
160 $scope.notaPedido.petrolera = petrolera.NOM; 160 $scope.notaPedido.petrolera = petrolera.NOM;
161 }, function() { 161 }, function() {
162 162
163 } 163 }
164 ); 164 );
165 }; 165 };
166 $scope.seleccionarCliente = function() { 166 $scope.seleccionarCliente = function() {
167 var modalInstance = $uibModal.open( 167 var modalInstance = $uibModal.open(
168 { 168 {
169 ariaLabelledBy: 'Busqueda de Cliente', 169 ariaLabelledBy: 'Busqueda de Cliente',
170 templateUrl: 'foca-busqueda-cliente-modal.html', 170 templateUrl: 'foca-busqueda-cliente-modal.html',
171 controller: 'focaBusquedaClienteModalController', 171 controller: 'focaBusquedaClienteModalController',
172 size: 'lg' 172 size: 'lg'
173 } 173 }
174 ); 174 );
175 modalInstance.result.then( 175 modalInstance.result.then(
176 function(cliente) { 176 function(cliente) {
177 $scope.notaPedido.cliente.nombre = cliente.nom; 177 $scope.notaPedido.cliente.nombre = cliente.nom;
178 }, function() { 178 }, function() {
179 179
180 } 180 }
181 ); 181 );
182 }; 182 };
183 $scope.mostrarFichaCliente = function() { 183 $scope.mostrarFichaCliente = function() {
184 $uibModal.open( 184 $uibModal.open(
185 { 185 {
186 ariaLabelledBy: 'Datos del Cliente', 186 ariaLabelledBy: 'Datos del Cliente',
187 templateUrl: 'foca-crear-nota-pedido-ficha-cliente.html', 187 templateUrl: 'foca-crear-nota-pedido-ficha-cliente.html',
188 controller: 'focaCrearNotaPedidoFichaClienteController', 188 controller: 'focaCrearNotaPedidoFichaClienteController',
189 size: 'lg' 189 size: 'lg'
190 } 190 }
191 ); 191 );
192 }; 192 };
193 $scope.obtenerDomicilios = function(id) { 193 $scope.obtenerDomicilios = function(id) {
194 crearNotaPedidoService.getDomicilios(id).then( 194 crearNotaPedidoService.getDomicilios(id).then(
195 function(res) { 195 function(res) {
196 $scope.notaPedido.domicilio = res.data; 196 $scope.notaPedido.domicilio = res.data;
197 } 197 }
198 ); 198 );
199 }; 199 };
200 $scope.getTotal = function() { 200 $scope.getTotal = function() {
201 var total = 0; 201 var total = 0;
202 var array = $scope.articulosTabla; 202 var array = $scope.articulosTabla;
203 for (var i = 0; i < array.length; i++) { 203 for (var i = 0; i < array.length; i++) {
204 total += array[i].precio * array[i].cantidad; 204 total += array[i].precio * array[i].cantidad;
205 } 205 }
206 return total.toFixed(2); 206 return total.toFixed(2);
207 }; 207 };
208 $scope.getSubTotal = function() { 208 $scope.getSubTotal = function() {
209 if($scope.articuloACargar) { 209 if($scope.articuloACargar) {
210 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad; 210 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad;
211 } 211 }
212 }; 212 };
213 $scope.cargarArticulos = function() { 213 $scope.cargarArticulos = function() {
214 idLista = $scope.notaPedido.precioCondicion; 214 idLista = $scope.notaPedido.precioCondicion;
215 $scope.articulosTabla = []; 215 $scope.articulosTabla = [];
216 }; 216 };
217 $scope.abrirModalListaPrecio = function() { 217 $scope.abrirModalListaPrecio = function() {
218 var modalInstance = $uibModal.open( 218 var modalInstance = $uibModal.open(
219 { 219 {
220 ariaLabelledBy: 'Busqueda de Precio Condición', 220 ariaLabelledBy: 'Busqueda de Precio Condición',
221 templateUrl: 'modal-precio-condicion.html', 221 templateUrl: 'modal-precio-condicion.html',
222 controller: 'focaModalPrecioCondicionController', 222 controller: 'focaModalPrecioCondicionController',
223 size: 'lg' 223 size: 'lg'
224 } 224 }
225 ); 225 );
226 modalInstance.result.then( 226 modalInstance.result.then(
227 function(precioCondicion) { 227 function(precioCondicion) {
228 $scope.notaPedido.precioCondicion = precioCondicion.nombre; 228 $scope.notaPedido.precioCondicion = precioCondicion.nombre;
229 idLista = precioCondicion.idListaPrecio; 229 idLista = precioCondicion.idListaPrecio;
230 $scope.articulosTabla = []; 230 $scope.articulosTabla = [];
231 }, function() { 231 }, function() {
232 232
233 } 233 }
234 ); 234 );
235 }; 235 };
236 $scope.abrirModalFlete = function() { 236 $scope.abrirModalFlete = function() {
237 if($scope.notaPedido.flete === '1') { 237 if($scope.notaPedido.flete === '1') {
238 var modalInstance = $uibModal.open( 238 var modalInstance = $uibModal.open(
239 { 239 {
240 ariaLabelledBy: 'Busqueda de Flete', 240 ariaLabelledBy: 'Busqueda de Flete',
241 templateUrl: 'modal-flete.html', 241 templateUrl: 'modal-flete.html',
242 controller: 'focaModalFleteController', 242 controller: 'focaModalFleteController',
243 size: 'lg' 243 size: 'lg'
244 } 244 }
245 ); 245 );
246 modalInstance.result.then( 246 modalInstance.result.then(
247 function(flete) { 247 function(flete) {
248 $scope.choferes = '';
249 $scope.vehiculos = '';
248 $scope.notaPedido.fleteNombre = flete.nombre; 250 $scope.notaPedido.fleteNombre = flete.nombre;
249 $scope.notaPedido.costoUnitarioKmFlete = flete.costoKilometro; 251 $scope.notaPedido.costoUnitarioKmFlete = flete.costoKilometro;
252 $scope.choferes = flete.chofer;
253 $scope.vehiculos = flete.vehiculo;
250 }, function() { 254 }, function() {
251 255
252 } 256 }
253 ); 257 );
254 } 258 }
255 }; 259 };
256 $scope.agregarATabla = function(key) { 260 $scope.agregarATabla = function(key) {
257 if(key === 13) { 261 if(key === 13) {
258 $scope.articulosTabla.unshift($scope.articuloACargar); 262 $scope.articulosTabla.unshift($scope.articuloACargar);
259 $scope.articuloACargar = undefined; 263 $scope.articuloACargar = undefined;
260 } 264 }
261 }; 265 };
262 $scope.quitarArticulo = function(key) { 266 $scope.quitarArticulo = function(key) {
263 $scope.articulosTabla.splice(key, 1); 267 $scope.articulosTabla.splice(key, 1);
264 }; 268 };
265 $scope.editarArticulo = function(key) { 269 $scope.editarArticulo = function(key) {
266 if(key === 13) { 270 if(key === 13) {
267 $scope.edit = false; 271 $scope.edit = false;
268 } 272 }
269 }; 273 };
270 $scope.cambioEdit = function() { 274 $scope.cambioEdit = function() {
271 $scope.edit = !$scope.edit ? true : false; 275 $scope.edit = !$scope.edit ? true : false;
272 }; 276 };
277 $scope.limpiarFlete = function() {
278 $scope.notaPedido.fleteNombre = '';
279 $scope.notaPedido.chofer = '';
280 $scope.notaPedido.vehiculo = '';
281 $scope.notaPedido.kilometros = '';
282 $scope.notaPedido.costoUnitarioKmFlete = '';
283 };
284 $scope.crearPedidoDemo = function() {
285 focaModalService.alert('Pedido Creado');
286 $scope.notaPedido.precioCondicion = '';
287 $scope.articulosTabla = [];
288 $scope.notaPedido.fleteNombre = '';
289 $scope.notaPedido.chofer = '';
290 $scope.notaPedido.vehiculo = '';
291 $scope.notaPedido.kilometros = '';
292 $scope.notaPedido.costoUnitarioKmFlete = '';
293 $scope.notaPedido.vendedor.nombre = '';
294 $scope.notaPedido.cliente.nombre = '';
295 $scope.domicilio.dom = '';
296 $scope.notaPedido.flete = 0;
297 };
273 } 298 }
274 ] 299 ]
275 ) 300 )
276 .controller('notaPedidoListaCtrl', [ 301 .controller('notaPedidoListaCtrl', [
277 '$scope', 302 '$scope',
278 'crearNotaPedidoService', 303 'crearNotaPedidoService',
279 '$location', 304 '$location',
280 function($scope, crearNotaPedidoService, $location) { 305 function($scope, crearNotaPedidoService, $location) {
281 crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { 306 crearNotaPedidoService.obtenerNotaPedido().then(function(datos) {
282 $scope.notaPedidos = datos.data; 307 $scope.notaPedidos = datos.data;
283 }); 308 });
284 $scope.editar = function(notaPedido) { 309 $scope.editar = function(notaPedido) {
285 crearNotaPedidoService.setNotaPedido(notaPedido); 310 crearNotaPedidoService.setNotaPedido(notaPedido);
286 $location.path('/venta-nota-pedido/abm/'); 311 $location.path('/venta-nota-pedido/abm/');
287 }; 312 };
288 $scope.crearPedido = function() { 313 $scope.crearPedido = function() {
289 crearNotaPedidoService.clearNotaPedido(); 314 crearNotaPedidoService.clearNotaPedido();
290 $location.path('/venta-nota-pedido/abm/'); 315 $location.path('/venta-nota-pedido/abm/');
291 }; 316 };
292 } 317 }
293 ]) 318 ])
294 .controller('focaCrearNotaPedidoFichaClienteController', [ 319 .controller('focaCrearNotaPedidoFichaClienteController', [
295 '$scope', 320 '$scope',
296 'crearNotaPedidoService', 321 'crearNotaPedidoService',
297 '$location', 322 '$location',
298 function($scope, crearNotaPedidoService, $location) { 323 function($scope, crearNotaPedidoService, $location) {
299 crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { 324 crearNotaPedidoService.obtenerNotaPedido().then(function(datos) {
300 $scope.notaPedidos = datos.data; 325 $scope.notaPedidos = datos.data;
301 }); 326 });
302 $scope.editar = function(notaPedido) { 327 $scope.editar = function(notaPedido) {
303 crearNotaPedidoService.setNotaPedido(notaPedido); 328 crearNotaPedidoService.setNotaPedido(notaPedido);
304 $location.path('/venta-nota-pedido/abm/'); 329 $location.path('/venta-nota-pedido/abm/');
305 }; 330 };
306 $scope.crearPedido = function() { 331 $scope.crearPedido = function() {
307 crearNotaPedidoService.clearNotaPedido(); 332 crearNotaPedidoService.clearNotaPedido();
308 $location.path('/venta-nota-pedido/abm/'); 333 $location.path('/venta-nota-pedido/abm/');
309 }; 334 };
310 } 335 }
311 ]); 336 ]);
src/views/nota-pedido.html
1 <div class="row"> 1 <div class="row">
2 <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> 2 <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2">
3 <div class="row bg-secondary p-3"> 3 <div class="row bg-secondary p-3">
4 <div class="form-group col-12 col-sm-6 col-md-4"> 4 <div class="form-group col-12 col-sm-6 col-md-4">
5 <div class="input-group"> 5 <div class="input-group">
6 <input 6 <input
7 type="text" 7 type="text"
8 class="form-control" 8 class="form-control"
9 uib-datepicker-popup="dd/MM/yyyy" 9 uib-datepicker-popup="dd/MM/yyyy"
10 ng-model="notaPedido.fechaCarga" 10 ng-model="notaPedido.fechaCarga"
11 is-open="popup1.opened" 11 is-open="popup1.opened"
12 datepicker-options="dateOptions" 12 datepicker-options="dateOptions"
13 close-text="Cerrar" 13 close-text="Cerrar"
14 current-text="Hoy" 14 current-text="Hoy"
15 clear-text="Borrar" 15 clear-text="Borrar"
16 alt-input-formats="altInputFormats" 16 alt-input-formats="altInputFormats"
17 /> 17 />
18 <span class="input-group-append"> 18 <span class="input-group-append">
19 <button type="button" class="btn btn-default" ng-click="popup1.opened = true"> 19 <button type="button" class="btn btn-default" ng-click="popup1.opened = true">
20 <i class="fa fa-calendar"></i> 20 <i class="fa fa-calendar"></i>
21 </button> 21 </button>
22 </span> 22 </span>
23 </div> 23 </div>
24 </div> 24 </div>
25 <div class="form-group col-12 col-sm-6 col-md-4"> 25 <div class="form-group col-12 col-sm-6 col-md-4">
26 <div class="input-group"> 26 <div class="input-group">
27 <input 27 <input
28 class="form-control" 28 class="form-control"
29 type="text" 29 type="text"
30 ng-model="notaPedido.vendedor.nombre" 30 ng-model="notaPedido.vendedor.nombre"
31 placeholder="Seleccione Vendedor" 31 placeholder="Seleccione Vendedor"
32 readonly="true" 32 readonly="true"
33 > 33 >
34 <span class="input-group-append"> 34 <span class="input-group-append">
35 <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()"> 35 <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()">
36 <i class="fa fa-search"></i> 36 <i class="fa fa-search"></i>
37 </button> 37 </button>
38 </span> 38 </span>
39 </div> 39 </div>
40 </div> 40 </div>
41 <div class="form-group col-12 col-sm-6 col-md-4"> 41 <div class="form-group col-12 col-sm-6 col-md-4">
42 <div class="input-group"> 42 <div class="input-group">
43 <input 43 <input
44 class="form-control selectable" 44 class="form-control selectable"
45 type="text" 45 type="text"
46 ng-model="notaPedido.cliente.nombre" 46 ng-model="notaPedido.cliente.nombre"
47 placeholder="Seleccione Cliente" 47 placeholder="Seleccione Cliente"
48 readonly="true" 48 readonly="true"
49 ng-click="mostrarFichaCliente()" 49 ng-click="seleccionarCliente()"
50 > 50 >
51 <span class="input-group-append"> 51 <span class="input-group-append">
52 <button type="button" class="btn btn-default" ng-click="seleccionarCliente()"> 52 <button type="button" class="btn btn-default" ng-click="seleccionarCliente()">
53 <i class="fa fa-search"></i> 53 <i class="fa fa-search"></i>
54 </button> 54 </button>
55 </span> 55 </span>
56 </div> 56 </div>
57 </div> 57 </div>
58 <div class="form-group col-12 col-sm-6 col-md-4"> 58 <div class="form-group col-12 col-sm-6 col-md-4">
59 <input 59 <input
60 class="form-control selectable" 60 class="form-control selectable"
61 type="text" 61 type="text"
62 readonly="true" 62 ng-model="domicilio.dom"
63 ng-bind="vendedor.nombre"
64 ng-click="abrirModalDomicilio()" 63 ng-click="abrirModalDomicilio()"
65 placeholder="Seleccione Domicilio" 64 placeholder="Seleccione Domicilio"
65 uib-typeahead="
66 domi.dom
67 for domi
68 in domiciliosCliente
69 "
70 typeahead-min-length="0"
66 > 71 >
67 </div> 72 </div>
68 <div class="form-group col-12 col-sm-6 col-md-4"> 73 <div class="form-group col-12 col-sm-6 col-md-4">
69 <input 74 <input
70 class="form-control selectable" 75 class="form-control selectable"
71 type="text" 76 type="text"
72 readonly="true" 77 readonly="true"
73 ng-model="notaPedido.precioCondicion" 78 ng-model="notaPedido.precioCondicion"
74 ng-click="abrirModalListaPrecio()" 79 ng-click="abrirModalListaPrecio()"
75 placeholder="Seleccione Lista de precio" 80 placeholder="Seleccione Lista de precio"
76 > 81 >
77 </div> 82 </div>
78 <div class="form-group col-12 col-sm-6 col-md-4"> 83 <div class="form-group col-12 col-sm-6 col-md-4">
79 <label>Flete</label> 84 <label>Flete</label>
80 <div class="form-check custom-radio custom-control-inline"> 85 <div class="form-check custom-radio custom-control-inline">
81 <input 86 <input
87 ng-change="limpiarFlete()"
82 class="form-check-input" 88 class="form-check-input"
83 type="radio" 89 type="radio"
84 name="radioFlete" 90 name="radioFlete"
85 value="1" 91 value="1"
86 ng-model="notaPedido.flete"> 92 ng-model="notaPedido.flete">
87 <label class="form-check-label">Si</label> 93 <label class="form-check-label">Si</label>
88 </div> 94 </div>
89 <div class="form-check custom-radio custom-control-inline"> 95 <div class="form-check custom-radio custom-control-inline">
90 <input 96 <input
91 class="form-check-input" 97 class="form-check-input"
92 type="radio" 98 type="radio"
93 name="radioFlete" 99 name="radioFlete"
94 value="0" 100 value="0"
95 ng-model="notaPedido.flete"> 101 ng-model="notaPedido.flete">
96 <label class="form-check-label">No</label> 102 <label class="form-check-label">No</label>
97 </div> 103 </div>
98 </div> 104 </div>
99 <div class="form-group col-12 col-sm-6 col-md-4"> 105 <div class="form-group col-12 col-sm-6 col-md-4">
100 <input 106 <input
101 class="form-control selectable" 107 class="form-control selectable"
102 type="text" 108 type="text"
103 readonly="true" 109 readonly="true"
110 ng-show="notaPedido.flete == 1"
104 ng-model="notaPedido.fleteNombre" 111 ng-model="notaPedido.fleteNombre"
105 ng-click="abrirModalFlete()" 112 ng-click="abrirModalFlete()"
106 placeholder="Seleccione Flete" 113 placeholder="Seleccione Flete"
107 > 114 >
108 </div> 115 </div>
109 <div class="form-group col-12 col-sm-6 col-md-4"> 116 <div class="form-group col-12 col-sm-6 col-md-4">
117 <input
118 class="form-control selectable"
119 type="text"
120 ng-show="notaPedido.flete == 1"
121 ng-model="notaPedido.chofer"
122 placeholder="Seleccione Chofer"
123 uib-typeahead="chofer.nombre for chofer in choferes"
124 typeahead-min-length="0"
125 >
126 </div>
127 <div class="form-group col-12 col-sm-6 col-md-4">
128 <input
129 class="form-control selectable"
130 type="text"
131 ng-show="notaPedido.flete == 1"
132 ng-model="notaPedido.vehiculo"
133 placeholder="Seleccione Vehículo"
134 uib-typeahead="vehiculo.tractor for vehiculo in vehiculos"
135 typeahead-min-length="0"
136 >
137 </div>
138 <div class="form-group col-12 col-sm-6 col-md-4">
110 <input 139 <input
111 class="form-control selectable" 140 class="form-control selectable"
112 type="number" 141 type="number"
113 step="0.01" 142 step="0.01"
114 ng-disabled="notaPedido.flete == 0" 143 ng-show="notaPedido.flete == 1"
115 ng-model="notaPedido.costoUnitarioKmFlete" 144 ng-model="notaPedido.costoUnitarioKmFlete"
116 placeholder="Costo por kilómetro" 145 placeholder="Costo por kilómetro"
117 > 146 >
118 </div> 147 </div>
119 <div class="form-group col-12 col-sm-6 col-md-4"> 148 <div class="form-group col-12 col-sm-6 col-md-4">
120 <input 149 <input
121 class="form-control selectable" 150 class="form-control selectable"
122 type="number" 151 type="number"
123 step="0.1" 152 step="0.1"
124 ng-disabled="notaPedido.flete == 0" 153 ng-show="notaPedido.flete == 1"
125 ng-model="notaPedido.kilometros" 154 ng-model="notaPedido.kilometros"
126 placeholder="Kilómetros recorridos" 155 placeholder="Kilómetros recorridos"
127 > 156 >
128 </div> 157 </div>
129 </div> 158 </div>
130 </div> 159 </div>
160 <div class="col-auto my-2">
161 <button ng-click="crearPedidoDemo()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button>
162 </div>
131 </div> 163 </div>
132 <div class="row"> 164 <div class="row">
133 <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> 165 <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2">
134 <div class="row"> 166 <div class="row">
135 </div> 167 </div>
136 <div class="row"> 168 <div class="row">
137 <table class="table table-striped table-sm"> 169 <table class="table table-striped table-sm">
138 <thead> 170 <thead>
139 <tr> 171 <tr>
140 <th>Sector</th> 172 <th>Sector</th>
141 <th>Código</th> 173 <th>Código</th>
142 <th>Descripción</th> 174 <th>Descripción</th>
143 <th>Precio Unitario</th> 175 <th>Precio Unitario</th>
144 <th>Cantidad</th> 176 <th>Cantidad</th>
145 <th>SubTotal</th> 177 <th>SubTotal</th>
146 <th> 178 <th>
147 <button class="btn btn-outline-secondary selectable" style="float: right;" ng-click="show = !show; masMenos()" > 179 <button class="btn btn-outline-secondary selectable" style="float: right;" ng-click="show = !show; masMenos()" >
148 <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i> 180 <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i>
149 <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i> 181 <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i>
150 </button> 182 </button>
151 </th> 183 </th>
152 </tr> 184 </tr>
153 </thead> 185 </thead>
154 <tbody> 186 <tbody>
155 <tr ng-show="!articuloACargar"> 187 <tr ng-show="!articuloACargar">
156 <td colspan="2"><input placeholder="Seleccione Articulo" class="form-control" readonly ng-click="seleccionarArticulo()"></td> 188 <td colspan="2"><input placeholder="Seleccione Articulo" class="form-control" readonly ng-click="seleccionarArticulo()"></td>
157 <td></td> 189 <td></td>
158 <td></td> 190 <td></td>
159 <td></td> 191 <td></td>
160 <td></td> 192 <td></td>
161 <td></td> 193 <td></td>
162 </tr> 194 </tr>
163 <tr ng-show="articuloACargar"> 195 <tr ng-show="articuloACargar">
164 <td><input 196 <td><input
165 class="form-control" 197 class="form-control"
166 ng-model="articuloACargar.sector" 198 ng-model="articuloACargar.sector"
167 readonly></td> 199 readonly></td>
168 <td><input 200 <td><input
169 class="form-control" 201 class="form-control"
170 ng-model="articuloACargar.codigo" 202 ng-model="articuloACargar.codigo"
171 readonly></td> 203 readonly></td>
172 <td><input 204 <td><input
173 class="form-control" 205 class="form-control"
174 ng-model="articuloACargar.descripcion" 206 ng-model="articuloACargar.descripcion"
175 readonly></td> 207 readonly></td>
176 <td><input 208 <td><input
177 class="form-control" 209 class="form-control"
178 ng-value="articuloACargar.precio | currency:'$'" 210 ng-value="articuloACargar.precio | currency:'$'"
179 readonly></td> 211 readonly></td>
180 <td><input 212 <td><input
181 class="form-control" 213 class="form-control"
182 type="number" 214 type="number"
183 min="1" 215 min="1"
184 value="1" 216 value="1"
185 ng-model="articuloACargar.cantidad" 217 ng-model="articuloACargar.cantidad"
186 foca-focus="articuloACargar.cantidad == 1" 218 foca-focus="articuloACargar.cantidad == 1"
187 ng-keypress="agregarATabla($event.keyCode)"></td> 219 ng-keypress="agregarATabla($event.keyCode)"></td>
188 <td><input 220 <td><input
189 class="form-control" 221 class="form-control"
190 ng-value="getSubTotal() | currency:'$'" 222 ng-value="getSubTotal() | currency:'$'"
191 readonly></td> 223 readonly></td>
192 <td class="text-center"><button 224 <td class="text-center"><button
193 class="btn btn-outline-secondary btn-sm" 225 class="btn btn-outline-secondary btn-sm"
194 ng-click="agregarATabla(13)"> 226 ng-click="agregarATabla(13)">
195 <i class="fa fa-save"></i> 227 <i class="fa fa-save"></i>
196 </button></td> 228 </button></td>
197 </tr> 229 </tr>
198 <tr ng-repeat="(key, articulo) in articulosTabla" ng-show="show || key == 0"> 230 <tr ng-repeat="(key, articulo) in articulosTabla" ng-show="show || key == 0">
199 <td ng-bind="articulo.sector"></td> 231 <td ng-bind="articulo.sector"></td>
200 <td ng-bind="articulo.codigo"></td> 232 <td ng-bind="articulo.codigo"></td>
201 <td ng-bind="articulo.descripcion"></td> 233 <td ng-bind="articulo.descripcion"></td>
202 <td ng-bind="articulo.precio | currency:'$'"></td> 234 <td ng-bind="articulo.precio | currency:'$'"></td>
203 <td><input 235 <td><input
204 ng-show="edit" 236 ng-show="edit"
205 ng-model="articulo.cantidad" 237 ng-model="articulo.cantidad"
206 class="form-control" 238 class="form-control"
207 type="number" 239 type="number"
208 min="1" 240 min="1"
209 value="1" 241 value="1"
210 foca-focus="edit" 242 foca-focus="edit"
211 ng-keypress="editarArticulo($event.keyCode)"> 243 ng-keypress="editarArticulo($event.keyCode)">
212 <i class="selectable" ng-click="cambioEdit()" ng-hide="edit" ng-bind="articulo.cantidad"></i> 244 <i class="selectable" ng-click="cambioEdit()" ng-hide="edit" ng-bind="articulo.cantidad"></i>
213 </td> 245 </td>
214 <td ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"></td> 246 <td ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"></td>
215 <td class="text-center"> 247 <td class="text-center">
216 <button class="btn btn-outline-secondary btn-sm" ng-click="quitarArticulo(key)"> 248 <button class="btn btn-outline-secondary btn-sm" ng-click="quitarArticulo(key)">
217 <i class="fa fa-trash"></i> 249 <i class="fa fa-trash"></i>
218 </button> 250 </button>
219 </td> 251 </td>
220 </tr> 252 </tr>
221 </tbody> 253 </tbody>
222 <tfoot> 254 <tfoot>
223 <tr class="table-secondary"> 255 <tr class="table-secondary">
224 <td colspan="5"><b>Cantidad Items:</b> <a ng-bind="articulosTabla.length"></a> </td> 256 <td colspan="5"><b>Cantidad Items:</b> <a ng-bind="articulosTabla.length"></a> </td>
225 <td colspan="3">{{getTotal() | currency:'$'}}</td> 257 <td colspan="3">{{getTotal() | currency:'$'}}</td>
226 </tr> 258 </tr>
227 </tfoot> 259 </tfoot>
228 </table> 260 </table>
229 </div> 261 </div>
230 </div> 262 </div>
231 </div> 263 </div>
232 264
233 <!-- 265 <!--
234 <form name="formCrearNota"> 266 <form name="formCrearNota">
235 <uib-tabset active="active"> 267 <uib-tabset active="active">
236 <uib-tab index="0" heading="General"> 268 <uib-tab index="0" heading="General">
237 <input type="hidden" name="id" ng-model="notaPedido.id" /> 269 <input type="hidden" name="id" ng-model="notaPedido.id" />
238 <div> 270 <div>
239 <div class="col-auto my-2"> 271 <div class="col-auto my-2">
240 <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> 272 <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button>
241 </div> 273 </div>
242 </div> 274 </div>
243 <br> 275 <br>
244 <br> 276 <br>
245 <div class="row"> 277 <div class="row">
246 <div class="col-md-2"> 278 <div class="col-md-2">
247 <div class="col-auto"> 279 <div class="col-auto">
248 <label>Fecha de carga</label> 280 <label>Fecha de carga</label>
249 </div> 281 </div>
250 </div> 282 </div>
251 <div class="col-md-3"> 283 <div class="col-md-3">
252 <div class="col-auto"> 284 <div class="col-auto">
253 <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> 285 <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true">
254 </div> 286 </div>
255 </div> 287 </div>
256 <div class="col-md-2"> 288 <div class="col-md-2">
257 <div class="col-auto"> 289 <div class="col-auto">
258 <label>Kilómetros</label> 290 <label>Kilómetros</label>
259 </div> 291 </div>
260 </div> 292 </div>
261 <div class="col-md-3"> 293 <div class="col-md-3">
262 <div class="col-auto"> 294 <div class="col-auto">
263 <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" 295 <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente"
264 ng-model="notaPedido.kilometros" ng-required="true"> 296 ng-model="notaPedido.kilometros" ng-required="true">
265 </div> 297 </div>
266 </div> 298 </div>
267 </div> 299 </div>
268 <div class="row my-3"> 300 <div class="row my-3">
269 <div class="col-md-2"> 301 <div class="col-md-2">
270 <div class="col-auto"> 302 <div class="col-auto">
271 <label>Jurisdicción de IIBB</label> 303 <label>Jurisdicción de IIBB</label>
272 </div> 304 </div>
273 </div> 305 </div>
274 <div class="col-md-3"> 306 <div class="col-md-3">
275 <div class="col-auto"> 307 <div class="col-auto">
276 <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" 308 <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega"
277 ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> 309 ng-model="notaPedido.jurisdiccionIIBB" ng-required="true">
278 </div> 310 </div>
279 </div> 311 </div>
280 <div class="col-md-2"> 312 <div class="col-md-2">
281 <div class="col-auto"> 313 <div class="col-auto">
282 <label>Costo de financiación</label> 314 <label>Costo de financiación</label>
283 </div> 315 </div>
284 </div> 316 </div>
285 <div class="col-md-3"> 317 <div class="col-md-3">
286 <div class="col-auto"> 318 <div class="col-auto">
287 <div class="input-group mb-2"> 319 <div class="input-group mb-2">
288 <div class="input-group-prepend"> 320 <div class="input-group-prepend">
289 <div class="input-group-text">$</div> 321 <div class="input-group-text">$</div>
290 </div> 322 </div>
291 <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" 323 <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación"
292 ng-model="notaPedido.costoFinanciacion"> 324 ng-model="notaPedido.costoFinanciacion">
293 </div> 325 </div>
294 </div> 326 </div>
295 </div> 327 </div>
296 </div> 328 </div>
297 <div class="row"> 329 <div class="row">
298 <div class="col-md-2"> 330 <div class="col-md-2">
299 <div class="col-auto"> 331 <div class="col-auto">
300 <label>Bomba</label> 332 <label>Bomba</label>
301 </div> 333 </div>
302 </div> 334 </div>
303 <div class="col-md-1"> 335 <div class="col-md-1">
304 <div class="col-auto"> 336 <div class="col-auto">
305 <div class="form-check custom-radio custom-control-inline"> 337 <div class="form-check custom-radio custom-control-inline">
306 <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> 338 <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba">
307 <label class="form-check-label"> 339 <label class="form-check-label">
308 Si 340 Si
309 </label> 341 </label>
310 </div> 342 </div>
311 <div class="form-check custom-radio custom-control-inline"> 343 <div class="form-check custom-radio custom-control-inline">
312 <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> 344 <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba">
313 <label class="form-check-label"> 345 <label class="form-check-label">
314 No 346 No
315 </label> 347 </label>
316 </div> 348 </div>
317 </div> 349 </div>
318 </div> 350 </div>
319 <div class="col-md-1"> 351 <div class="col-md-1">
320 <div class="col-auto"> 352 <div class="col-auto">
321 <label>Flete</label> 353 <label>Flete</label>
322 </div> 354 </div>
323 </div> 355 </div>
324 <div class="col-md-1"> 356 <div class="col-md-1">
325 <div class="col-auto"> 357 <div class="col-auto">
326 <div class="form-check custom-radio custom-control-inline"> 358 <div class="form-check custom-radio custom-control-inline">
327 <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> 359 <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete">
328 <label class="form-check-label"> 360 <label class="form-check-label">
329 Si 361 Si
330 </label> 362 </label>
331 </div> 363 </div>
332 <div class="form-check custom-radio custom-control-inline"> 364 <div class="form-check custom-radio custom-control-inline">
333 <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> 365 <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete">
334 <label class="form-check-label"> 366 <label class="form-check-label">
335 FOB 367 FOB
336 </label> 368 </label>
337 </div> 369 </div>
338 </div> 370 </div>
339 </div> 371 </div>
340 <div class="col-md-2"> 372 <div class="col-md-2">
341 <div class="col-auto"> 373 <div class="col-auto">
342 <label>Costo unitario kilometro flete</label> 374 <label>Costo unitario kilometro flete</label>
343 </div> 375 </div>
344 </div> 376 </div>
345 <div class="col-md-3"> 377 <div class="col-md-3">
346 <div class="col-auto"> 378 <div class="col-auto">
347 <div class="input-group mb-2"> 379 <div class="input-group mb-2">
348 <div class="input-group-prepend"> 380 <div class="input-group-prepend">
349 <div class="input-group-text">$</div> 381 <div class="input-group-text">$</div>
350 </div> 382 </div>
351 <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" 383 <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete"
352 ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> 384 ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true">
353 </div> 385 </div>
354 </div> 386 </div>
355 </div> 387 </div>
356 </div> 388 </div>
357 <div class="row my-3"> 389 <div class="row my-3">
358 <div class="col-md-2"> 390 <div class="col-md-2">
359 <div class="col-auto"> 391 <div class="col-auto">
360 <label>Vendedor</label> 392 <label>Vendedor</label>
361 </div> 393 </div>
362 </div> 394 </div>
363 <div class="col-md-3"> 395 <div class="col-md-3">
364 <div class="col-auto"> 396 <div class="col-auto">
365 <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" 397 <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor"
366 ng-click="seleccionarVendedor()" readonly> 398 ng-click="seleccionarVendedor()" readonly>
367 </div> 399 </div>
368 </div> 400 </div>
369 <div class="col-md-2"> 401 <div class="col-md-2">
370 <div class="col-auto"> 402 <div class="col-auto">
371 <label>Petrolera</label> 403 <label>Petrolera</label>
372 </div> 404 </div>
373 </div> 405 </div>
374 <div class="col-md-3"> 406 <div class="col-md-3">
375 <div class="col-auto"> 407 <div class="col-auto">
376 <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" 408 <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera"
377 ng-click="seleccionarPetrolera()" readonly> 409 ng-click="seleccionarPetrolera()" readonly>
378 </div> 410 </div>
379 </div> 411 </div>
380 </div> 412 </div>
381 </div> 413 </div>
382 <div class="row"> 414 <div class="row">
383 <div class="col-md-2"> 415 <div class="col-md-2">
384 <div class="col-auto"> 416 <div class="col-auto">
385 <label>Cliente</label> 417 <label>Cliente</label>
386 </div> 418 </div>
387 </div> 419 </div>
388 <div class="col-md-3"> 420 <div class="col-md-3">
389 <div class="col-auto"> 421 <div class="col-auto">
390 <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" 422 <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente"
391 ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> 423 ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly>
392 </div> 424 </div>
393 </div> 425 </div>
394 <div class="col-md-2"> 426 <div class="col-md-2">
395 <div class="col-auto"> 427 <div class="col-auto">
396 <label>Domicilio</label> 428 <label>Domicilio</label>
397 </div> 429 </div>
398 </div> 430 </div>
399 <div class="col-md-4"> 431 <div class="col-md-4">
400 <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> 432 <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio">
401 <div class="col-auto"> 433 <div class="col-auto">
402 <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" 434 <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead="
403 domi.dom 435 domi.dom
404 for domi 436 for domi
405 in domiciliosCliente 437 in domiciliosCliente
406 " 438 "
407 typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" 439 typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)"
408 class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> 440 class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true">
409 <i ng-show="cargandoClientes" class="fas fa-sync"></i> 441 <i ng-show="cargandoClientes" class="fas fa-sync"></i>
410 <div ng-show="sinResultados"> 442 <div ng-show="sinResultados">
411 No se encontraron resultados. 443 No se encontraron resultados.
412 </div> 444 </div>
413 </div> 445 </div>
414 <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> 446 <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a>
415 <a class="btn" ng-click="addNewDom()">+</a> 447 <a class="btn" ng-click="addNewDom()">+</a>
416 </div> 448 </div>
417 </div> 449 </div>
418 </div> 450 </div>
419 </uib-tab> 451 </uib-tab>
420 <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> 452 <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid">
421 <div> 453 <div>
422 <div class="col-auto my-2"> 454 <div class="col-auto my-2">
423 <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> 455 <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button>
424 </div> 456 </div>
425 </div> 457 </div>
426 <br> 458 <br>
427 <br> 459 <br>
428 <div class="row"> 460 <div class="row">
429 <div class="col-md-2"> 461 <div class="col-md-2">
430 <div class="col-auto"> 462 <div class="col-auto">
431 <label>Precios y condiciones</label> 463 <label>Precios y condiciones</label>
432 </div> 464 </div>
433 </div> 465 </div>
434 <div class="col-md-4"> 466 <div class="col-md-4">
435 <div class="col-auto"> 467 <div class="col-auto">
436 <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> 468 <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones">
437 </select> 469 </select>
438 </div> 470 </div>
439 </div> 471 </div>
440 <div class="col-md-2"> 472 <div class="col-md-2">
441 <div class="col-auto"> 473 <div class="col-auto">
442 <label>Producto</label> 474 <label>Producto</label>
443 </div> 475 </div>
444 </div> 476 </div>
445 <div class="col-md-4"> 477 <div class="col-md-4">
446 <div class="col-auto"> 478 <div class="col-auto">
447 <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" 479 <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto"
448 ng-click="seleccionarArticulo()" readonly> 480 ng-click="seleccionarArticulo()" readonly>
449 </div> 481 </div>
450 </div> 482 </div>
451 </div> 483 </div>
452 <div class="col-md-12"> 484 <div class="col-md-12">
453 <table class="table my-3 table-hover table-nonfluid"> 485 <table class="table my-3 table-hover table-nonfluid">
454 <thead> 486 <thead>
455 <tr> 487 <tr>
456 <th>Código</th> 488 <th>Código</th>
457 <th>Nombre</th> 489 <th>Nombre</th>
458 <th>Precio unitario</th> 490 <th>Precio unitario</th>
459 <th>Costo unitario bruto</th> 491 <th>Costo unitario bruto</th>
460 <th>Cantidad</th> 492 <th>Cantidad</th>
461 <th>Subtotal</th> 493 <th>Subtotal</th>
462 </tr> 494 </tr>
463 </thead> 495 </thead>
464 <tbody> 496 <tbody>
465 <tr ng-repeat="articulo in articulosTabla"> 497 <tr ng-repeat="articulo in articulosTabla">
466 <td ng-bind="articulo.codigo"></td> 498 <td ng-bind="articulo.codigo"></td>
467 <td ng-bind="articulo.nombre"></td> 499 <td ng-bind="articulo.nombre"></td>
468 <td ng-bind="articulo.precio"></td> 500 <td ng-bind="articulo.precio"></td>
469 <td ng-bind="articulo.costoUnitario"></td> 501 <td ng-bind="articulo.costoUnitario"></td>
470 <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> 502 <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td>
471 <td ng-bind="getSubTotal(articulo.item)"></td> 503 <td ng-bind="getSubTotal(articulo.item)"></td>
472 </tr> 504 </tr>
473 </tbody> 505 </tbody>
474 </table> 506 </table>
475 </div> 507 </div>
476 </uib-tab> 508 </uib-tab>
477 </uib-tabset> 509 </uib-tabset>