Commit 2916fd9ae9d157cc512f272db6643e22e1f9d21e
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request modulos-npm/foca-crear-nota-pedido!9
Showing
6 changed files
Show diff stats
gulpfile.js
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 | gulp.dest(paths.dist) | 49 | gulp.dest(paths.dist) |
49 | ] | 50 | ] |
50 | ); | 51 | ); |
51 | }); | 52 | }); |
52 | 53 | ||
53 | gulp.task('clean', function(){ | 54 | gulp.task('clean', function(){ |
54 | return gulp.src(['tmp', 'dist'], {read: false}) | 55 | return gulp.src(['tmp', 'dist'], {read: false}) |
55 | .pipe(clean()); | 56 | .pipe(clean()); |
56 | }); | 57 | }); |
57 | 58 | ||
58 | gulp.task('pre-commit', function() { | 59 | gulp.task('pre-commit', function() { |
59 | return pump( | 60 | return pump( |
60 | [ | 61 | [ |
61 | gulp.src(paths.srcJS), | 62 | gulp.src(paths.srcJS), |
62 | jshint('.jshintrc'), | 63 | jshint('.jshintrc'), |
63 | jshint.reporter('default'), | 64 | jshint.reporter('default'), |
64 | jshint.reporter('fail') | 65 | jshint.reporter('fail') |
65 | ] | 66 | ] |
66 | ); | 67 | ); |
67 | 68 | ||
68 | gulp.start('uglify'); | 69 | gulp.start('uglify'); |
69 | }); | 70 | }); |
70 | 71 | ||
71 | gulp.task('webserver', function() { | 72 | gulp.task('webserver', function() { |
72 | pump [ | 73 | pump [ |
73 | connect.server({port: 3000}) | 74 | connect.server({port: 3000}) |
74 | ] | 75 | ] |
75 | }); | 76 | }); |
76 | 77 | ||
77 | gulp.task('clean-post-install', function() { | 78 | gulp.task('clean-post-install', function() { |
78 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | 79 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', |
79 | 'index.html'], {read: false}) | 80 | 'index.html'], {read: false}) |
80 | .pipe(clean()); | 81 | .pipe(clean()); |
81 | }); | 82 | }); |
82 | 83 | ||
83 | gulp.task('default', ['webserver']); | 84 | gulp.task('default', ['webserver']); |
84 | 85 |
index.html
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 | 23 | <script src="node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script> | |
24 | <script src="src/js/app.js"></script> | 24 | <script src="src/js/app.js"></script> |
25 | <script src="src/js/controller.js"></script> | 25 | <script src="src/js/controller.js"></script> |
26 | <script src="src/js/service.js"></script> | 26 | <script src="src/js/service.js"></script> |
27 | <script src="src/js/route.js"></script> | 27 | <script src="src/js/route.js"></script> |
28 | 28 | ||
29 | <script src="src/etc/develop.js"></script> | 29 | <script src="src/etc/develop.js"></script> |
30 | </head> | 30 | </head> |
31 | <body> | 31 | <body> |
32 | <div ng-view class="container-fluid"></div> | 32 | <div ng-view class="container-fluid"></div> |
33 | </body> | 33 | </body> |
34 | </html> | 34 | </html> |
35 | 35 |
package.json
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" | 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" |
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-busqueda-productos": "git+https://debo.suite.repo/nguarnieri/foca-modal-busqueda-productos", | 35 | "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", | ||
36 | "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", | 37 | "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", |
37 | "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", | 38 | "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", |
38 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", | 39 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", |
39 | "font-awesome": "^4.7.0", | 40 | "font-awesome": "^4.7.0", |
40 | "gulp": "^3.9.1", | 41 | "gulp": "^3.9.1", |
41 | "gulp-angular-templatecache": "2.2.2", | 42 | "gulp-angular-templatecache": "2.2.2", |
42 | "gulp-clean": "^0.4.0", | 43 | "gulp-clean": "^0.4.0", |
43 | "gulp-concat": "^2.6.1", | 44 | "gulp-concat": "^2.6.1", |
44 | "gulp-connect": "^5.6.1", | 45 | "gulp-connect": "^5.6.1", |
45 | "gulp-htmlmin": "^5.0.1", | 46 | "gulp-htmlmin": "^5.0.1", |
46 | "gulp-jshint": "^2.1.0", | 47 | "gulp-jshint": "^2.1.0", |
47 | "gulp-rename": "^1.4.0", | 48 | "gulp-rename": "^1.4.0", |
48 | "gulp-replace": "^1.0.0", | 49 | "gulp-replace": "^1.0.0", |
49 | "gulp-sequence": "^1.0.0", | 50 | "gulp-sequence": "^1.0.0", |
50 | "gulp-uglify": "^3.0.1", | 51 | "gulp-uglify": "^3.0.1", |
51 | "gulp-uglify-es": "^1.0.4", | 52 | "gulp-uglify-es": "^1.0.4", |
52 | "jasmine-core": "^3.2.1", | 53 | "jasmine-core": "^3.2.1", |
53 | "jquery": "^3.3.1", | 54 | "jquery": "^3.3.1", |
54 | "jshint": "^2.9.6", | 55 | "jshint": "^2.9.6", |
55 | "pre-commit": "^1.2.2", | 56 | "pre-commit": "^1.2.2", |
56 | "pump": "^3.0.0", | 57 | "pump": "^3.0.0", |
57 | "ui-bootstrap4": "^3.0.5" | 58 | "ui-bootstrap4": "^3.0.5" |
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 |
src/js/app.js
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 | ]); | 10 | ]); |
10 | 11 |
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', |
4 | function($scope, $uibModal, $location, crearNotaPedidoService) { | 4 | function($scope, $uibModal, $location, crearNotaPedidoService) { |
5 | $scope.show = false; | 5 | $scope.show = false; |
6 | 6 | ||
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 | 11 | ||
12 | $scope.notaPedido = { | 12 | $scope.notaPedido = { |
13 | vendedor: {}, | 13 | vendedor: {}, |
14 | cliente: {} | 14 | cliente: {} |
15 | }; | 15 | }; |
16 | $scope.articulosTabla = []; | 16 | $scope.articulosTabla = []; |
17 | var idLista; | 17 | var idLista; |
18 | var notaPedidoTemp = crearNotaPedidoService.getNotaPedido(); | 18 | var notaPedidoTemp = crearNotaPedidoService.getNotaPedido(); |
19 | $scope.domiciliosCliente = crearNotaPedidoService.getDomicilios(1); | 19 | $scope.domiciliosCliente = crearNotaPedidoService.getDomicilios(1); |
20 | crearNotaPedidoService.getPrecioCondicion().then( | 20 | crearNotaPedidoService.getPrecioCondicion().then( |
21 | function(res) { | 21 | function(res) { |
22 | $scope.precioCondiciones = res.data; | 22 | $scope.precioCondiciones = res.data; |
23 | } | 23 | } |
24 | ); | 24 | ); |
25 | if (notaPedidoTemp !== undefined) { | 25 | if (notaPedidoTemp !== undefined) { |
26 | notaPedidoTemp.fechaCarga = new Date(notaPedidoTemp.fechaCarga); | 26 | notaPedidoTemp.fechaCarga = new Date(notaPedidoTemp.fechaCarga); |
27 | $scope.notaPedido = notaPedidoTemp; | 27 | $scope.notaPedido = notaPedidoTemp; |
28 | $scope.notaPedido.flete = ($scope.notaPedido.flete).toString(); | 28 | $scope.notaPedido.flete = ($scope.notaPedido.flete).toString(); |
29 | $scope.notaPedido.bomba = ($scope.notaPedido.bomba).toString(); | 29 | $scope.notaPedido.bomba = ($scope.notaPedido.bomba).toString(); |
30 | idLista = $scope.notaPedido.precioCondicion; | 30 | idLista = $scope.notaPedido.precioCondicion; |
31 | crearNotaPedidoService | 31 | crearNotaPedidoService |
32 | .getArticulosByIdNotaPedido($scope.notaPedido.id).then( | 32 | .getArticulosByIdNotaPedido($scope.notaPedido.id).then( |
33 | function(res) { | 33 | function(res) { |
34 | $scope.articulosTabla = res.data; | 34 | $scope.articulosTabla = res.data; |
35 | } | 35 | } |
36 | ); | 36 | ); |
37 | crearNotaPedidoService.getDomiciliosByIdNotaPedido($scope.notaPedido.id).then( | 37 | crearNotaPedidoService.getDomiciliosByIdNotaPedido($scope.notaPedido.id).then( |
38 | function(res) { | 38 | function(res) { |
39 | $scope.notaPedido.domicilio = res.data; | 39 | $scope.notaPedido.domicilio = res.data; |
40 | } | 40 | } |
41 | ); | 41 | ); |
42 | } else { | 42 | } else { |
43 | $scope.notaPedido.fechaCarga = new Date(); | 43 | $scope.notaPedido.fechaCarga = new Date(); |
44 | $scope.notaPedido.domicilio = [{ id: 0 }]; | 44 | $scope.notaPedido.domicilio = [{ id: 0 }]; |
45 | $scope.notaPedido.bomba = '1'; | 45 | $scope.notaPedido.bomba = '1'; |
46 | $scope.notaPedido.flete = '1'; | 46 | $scope.notaPedido.flete = '0'; |
47 | idLista = undefined; | 47 | idLista = undefined; |
48 | } | 48 | } |
49 | $scope.addNewDom = function() { | 49 | $scope.addNewDom = function() { |
50 | $scope.notaPedido.domicilio.push({ 'id': 0 }); | 50 | $scope.notaPedido.domicilio.push({ 'id': 0 }); |
51 | }; | 51 | }; |
52 | $scope.removeNewChoice = function(choice) { | 52 | $scope.removeNewChoice = function(choice) { |
53 | if ($scope.notaPedido.domicilio.length > 1) { | 53 | if ($scope.notaPedido.domicilio.length > 1) { |
54 | $scope.notaPedido.domicilio.splice($scope.notaPedido.domicilio.findIndex( | 54 | $scope.notaPedido.domicilio.splice($scope.notaPedido.domicilio.findIndex( |
55 | function(c) { | 55 | function(c) { |
56 | return c.$$hashKey === choice.$$hashKey; | 56 | return c.$$hashKey === choice.$$hashKey; |
57 | } | 57 | } |
58 | ), 1); | 58 | ), 1); |
59 | } | 59 | } |
60 | }; | 60 | }; |
61 | $scope.crearNotaPedido = function() { | 61 | $scope.crearNotaPedido = function() { |
62 | var notaPedido = { | 62 | var notaPedido = { |
63 | id: 0, | 63 | id: 0, |
64 | precioCondicion: $scope.notaPedido.precioCondicion, | 64 | precioCondicion: $scope.notaPedido.precioCondicion, |
65 | fechaCarga: $scope.notaPedido.fechaCarga, | 65 | fechaCarga: $scope.notaPedido.fechaCarga, |
66 | vendedor: $scope.notaPedido.vendedor, | 66 | vendedor: $scope.notaPedido.vendedor, |
67 | cliente: $scope.notaPedido.cliente, | 67 | cliente: $scope.notaPedido.cliente, |
68 | producto: $scope.notaPedido.producto, | 68 | producto: $scope.notaPedido.producto, |
69 | bomba: $scope.notaPedido.bomba, | 69 | bomba: $scope.notaPedido.bomba, |
70 | petrolera: $scope.notaPedido.petrolera, | 70 | petrolera: $scope.notaPedido.petrolera, |
71 | domicilio: $scope.notaPedido.domicilio, | 71 | domicilio: $scope.notaPedido.domicilio, |
72 | kilometros: $scope.notaPedido.kilometros, | 72 | kilometros: $scope.notaPedido.kilometros, |
73 | jurisdiccionIIBB: $scope.notaPedido.jurisdiccionIIBB, | 73 | jurisdiccionIIBB: $scope.notaPedido.jurisdiccionIIBB, |
74 | costoFinanciacion: $scope.notaPedido.costoFinanciacion, | 74 | costoFinanciacion: $scope.notaPedido.costoFinanciacion, |
75 | flete: $scope.notaPedido.flete, | 75 | flete: $scope.notaPedido.flete, |
76 | costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete, | 76 | costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete, |
77 | total: $scope.articulosTabla[0].subTotal | 77 | total: $scope.articulosTabla[0].subTotal |
78 | }; | 78 | }; |
79 | crearNotaPedidoService.crearNotaPedido(notaPedido).then( | 79 | crearNotaPedidoService.crearNotaPedido(notaPedido).then( |
80 | function() { | 80 | function() { |
81 | alert('Nota pedido creada'); | 81 | alert('Nota pedido creada'); |
82 | $location.path('/venta-nota-pedido'); | 82 | $location.path('/venta-nota-pedido'); |
83 | } | 83 | } |
84 | ); | 84 | ); |
85 | var articulosNotaPedido = $scope.articulosTabla; | 85 | var articulosNotaPedido = $scope.articulosTabla; |
86 | for(var i = 0; i< articulosNotaPedido.length;i++) { | 86 | for(var i = 0; i< articulosNotaPedido.length;i++) { |
87 | crearNotaPedidoService | 87 | crearNotaPedidoService |
88 | .crearArticulosParaNotaPedido(articulosNotaPedido[i]).then( | 88 | .crearArticulosParaNotaPedido(articulosNotaPedido[i]).then( |
89 | function() { | 89 | function() { |
90 | return; | 90 | return; |
91 | } | 91 | } |
92 | ); | 92 | ); |
93 | } | 93 | } |
94 | }; | 94 | }; |
95 | $scope.siguienteTab = function() { | 95 | $scope.siguienteTab = function() { |
96 | $scope.active = 1; | 96 | $scope.active = 1; |
97 | }; | 97 | }; |
98 | $scope.seleccionarArticulo = function() { | 98 | $scope.seleccionarArticulo = function() { |
99 | if (idLista === undefined) { | 99 | if (idLista === undefined) { |
100 | alert('primero seleccione una lista de precio y condicion'); | 100 | alert('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.FiltroSectorCodigo, | 117 | codigo: producto.FiltroSectorCodigo, |
118 | item: $scope.articulosTabla.length + 1, | 118 | item: $scope.articulosTabla.length + 1, |
119 | nombre: producto.descripcion, | 119 | nombre: producto.descripcion, |
120 | precio: producto.precio, | 120 | precio: producto.precio, |
121 | costoUnitario: producto.costo, | 121 | costoUnitario: producto.costo, |
122 | cantidad: 1 | 122 | cantidad: 1 |
123 | }; | 123 | }; |
124 | $scope.articulosTabla.unshift(newArt); | 124 | $scope.articulosTabla.unshift(newArt); |
125 | }, function() { | 125 | }, function() { |
126 | // funcion ejecutada cuando se cancela el modal | 126 | // funcion ejecutada cuando se cancela el modal |
127 | } | 127 | } |
128 | ); | 128 | ); |
129 | }; | 129 | }; |
130 | $scope.seleccionarVendedor = function() { | 130 | $scope.seleccionarVendedor = function() { |
131 | var modalInstance = $uibModal.open( | 131 | var modalInstance = $uibModal.open( |
132 | { | 132 | { |
133 | ariaLabelledBy: 'Busqueda de Vendedores', | 133 | ariaLabelledBy: 'Busqueda de Vendedores', |
134 | templateUrl: 'modal-vendedores.html', | 134 | templateUrl: 'modal-vendedores.html', |
135 | controller: 'modalVendedoresCtrl', | 135 | controller: 'modalVendedoresCtrl', |
136 | size: 'lg' | 136 | size: 'lg' |
137 | } | 137 | } |
138 | ); | 138 | ); |
139 | modalInstance.result.then( | 139 | modalInstance.result.then( |
140 | function(vendedor) { | 140 | function(vendedor) { |
141 | $scope.notaPedido.vendedor.nombre = vendedor.NomVen; | 141 | $scope.notaPedido.vendedor.nombre = vendedor.NomVen; |
142 | }, function() { | 142 | }, function() { |
143 | 143 | ||
144 | } | 144 | } |
145 | ); | 145 | ); |
146 | }; | 146 | }; |
147 | $scope.seleccionarPetrolera = function() { | 147 | $scope.seleccionarPetrolera = function() { |
148 | var modalInstance = $uibModal.open( | 148 | var modalInstance = $uibModal.open( |
149 | { | 149 | { |
150 | ariaLabelledBy: 'Busqueda de Petrolera', | 150 | ariaLabelledBy: 'Busqueda de Petrolera', |
151 | templateUrl: 'modal-petroleras.html', | 151 | templateUrl: 'modal-petroleras.html', |
152 | controller: 'modalPetrolerasCtrl', | 152 | controller: 'modalPetrolerasCtrl', |
153 | size: 'lg' | 153 | size: 'lg' |
154 | } | 154 | } |
155 | ); | 155 | ); |
156 | modalInstance.result.then( | 156 | modalInstance.result.then( |
157 | function(petrolera) { | 157 | function(petrolera) { |
158 | $scope.notaPedido.petrolera = petrolera.NOM; | 158 | $scope.notaPedido.petrolera = petrolera.NOM; |
159 | }, function() { | 159 | }, function() { |
160 | 160 | ||
161 | } | 161 | } |
162 | ); | 162 | ); |
163 | }; | 163 | }; |
164 | $scope.seleccionarCliente = function() { | 164 | $scope.seleccionarCliente = function() { |
165 | var modalInstance = $uibModal.open( | 165 | var modalInstance = $uibModal.open( |
166 | { | 166 | { |
167 | ariaLabelledBy: 'Busqueda de Cliente', | 167 | ariaLabelledBy: 'Busqueda de Cliente', |
168 | templateUrl: 'foca-busqueda-cliente-modal.html', | 168 | templateUrl: 'foca-busqueda-cliente-modal.html', |
169 | controller: 'focaBusquedaClienteModalController', | 169 | controller: 'focaBusquedaClienteModalController', |
170 | size: 'lg' | 170 | size: 'lg' |
171 | } | 171 | } |
172 | ); | 172 | ); |
173 | modalInstance.result.then( | 173 | modalInstance.result.then( |
174 | function(cliente) { | 174 | function(cliente) { |
175 | $scope.notaPedido.cliente.nombre = cliente.nom; | 175 | $scope.notaPedido.cliente.nombre = cliente.nom; |
176 | }, function() { | 176 | }, function() { |
177 | 177 | ||
178 | } | 178 | } |
179 | ); | 179 | ); |
180 | }; | 180 | }; |
181 | $scope.mostrarFichaCliente = function() { | 181 | $scope.mostrarFichaCliente = function() { |
182 | $uibModal.open( | 182 | $uibModal.open( |
183 | { | 183 | { |
184 | ariaLabelledBy: 'Datos del Cliente', | 184 | ariaLabelledBy: 'Datos del Cliente', |
185 | templateUrl: 'foca-crear-nota-pedido-ficha-cliente.html', | 185 | templateUrl: 'foca-crear-nota-pedido-ficha-cliente.html', |
186 | controller: 'focaCrearNotaPedidoFichaClienteController', | 186 | controller: 'focaCrearNotaPedidoFichaClienteController', |
187 | size: 'lg' | 187 | size: 'lg' |
188 | } | 188 | } |
189 | ); | 189 | ); |
190 | }; | 190 | }; |
191 | $scope.obtenerDomicilios = function(id) { | 191 | $scope.obtenerDomicilios = function(id) { |
192 | crearNotaPedidoService.getDomicilios(id).then( | 192 | crearNotaPedidoService.getDomicilios(id).then( |
193 | function(res) { | 193 | function(res) { |
194 | $scope.notaPedido.domicilio = res.data; | 194 | $scope.notaPedido.domicilio = res.data; |
195 | } | 195 | } |
196 | ); | 196 | ); |
197 | }; | 197 | }; |
198 | $scope.getSubTotal = function(item) { | 198 | $scope.getSubTotal = function(item) { |
199 | var subTotal = 0; | 199 | var subTotal = 0; |
200 | var array = $scope.articulosTabla.filter( | 200 | var array = $scope.articulosTabla.filter( |
201 | function(a) { | 201 | function(a) { |
202 | return a.item <= item; | 202 | return a.item <= item; |
203 | } | 203 | } |
204 | ); | 204 | ); |
205 | for (var i = 0; i < array.length; i++) { | 205 | for (var i = 0; i < array.length; i++) { |
206 | subTotal += array[i].precio * array[i].cantidad; | 206 | subTotal += array[i].precio * array[i].cantidad; |
207 | } | 207 | } |
208 | return subTotal.toFixed(2); | 208 | return subTotal.toFixed(2); |
209 | }; | 209 | }; |
210 | $scope.cargarArticulos = function() { | 210 | $scope.cargarArticulos = function() { |
211 | idLista = $scope.notaPedido.precioCondicion; | 211 | idLista = $scope.notaPedido.precioCondicion; |
212 | $scope.articulosTabla = []; | 212 | $scope.articulosTabla = []; |
213 | }; | 213 | }; |
214 | $scope.abrirModalListaPrecio = function() { | 214 | $scope.abrirModalListaPrecio = function() { |
215 | var modalInstance = $uibModal.open( | 215 | var modalInstance = $uibModal.open( |
216 | { | 216 | { |
217 | ariaLabelledBy: 'Busqueda de Precio Condición', | 217 | ariaLabelledBy: 'Busqueda de Precio Condición', |
218 | templateUrl: 'modal-precio-condicion.html', | 218 | templateUrl: 'modal-precio-condicion.html', |
219 | controller: 'focaModalPrecioCondicionController', | 219 | controller: 'focaModalPrecioCondicionController', |
220 | size: 'lg' | 220 | size: 'lg' |
221 | } | 221 | } |
222 | ); | 222 | ); |
223 | modalInstance.result.then( | 223 | modalInstance.result.then( |
224 | function(precioCondicion) { | 224 | function(precioCondicion) { |
225 | $scope.notaPedido.precioCondicion = precioCondicion.nombre; | 225 | $scope.notaPedido.precioCondicion = precioCondicion.nombre; |
226 | }, function() { | 226 | }, function() { |
227 | 227 | ||
228 | } | 228 | } |
229 | ); | 229 | ); |
230 | }; | 230 | }; |
231 | $scope.abrirModalFlete = function() { | ||
232 | if($scope.notaPedido.flete === '1') { | ||
233 | var modalInstance = $uibModal.open( | ||
234 | { | ||
235 | ariaLabelledBy: 'Busqueda de Flete', | ||
236 | templateUrl: 'modal-flete.html', | ||
237 | controller: 'focaModalFleteController', | ||
238 | size: 'lg' | ||
239 | } | ||
240 | ); | ||
241 | modalInstance.result.then( | ||
242 | function(flete) { | ||
243 | $scope.notaPedido.fleteNombre = flete.nombre; | ||
244 | $scope.notaPedido.costoUnitarioKmFlete = flete.costoKilometro; | ||
245 | }, function() { | ||
246 | |||
247 | } | ||
248 | ); | ||
249 | } | ||
250 | }; | ||
231 | } | 251 | } |
232 | ] | 252 | ] |
233 | ) | 253 | ) |
234 | .controller('notaPedidoListaCtrl', [ | 254 | .controller('notaPedidoListaCtrl', [ |
235 | '$scope', | 255 | '$scope', |
236 | 'crearNotaPedidoService', | 256 | 'crearNotaPedidoService', |
237 | '$location', | 257 | '$location', |
238 | function($scope, crearNotaPedidoService, $location) { | 258 | function($scope, crearNotaPedidoService, $location) { |
239 | crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { | 259 | crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { |
240 | $scope.notaPedidos = datos.data; | 260 | $scope.notaPedidos = datos.data; |
241 | }); | 261 | }); |
242 | $scope.editar = function(notaPedido) { | 262 | $scope.editar = function(notaPedido) { |
243 | crearNotaPedidoService.setNotaPedido(notaPedido); | 263 | crearNotaPedidoService.setNotaPedido(notaPedido); |
244 | $location.path('/venta-nota-pedido/abm/'); | 264 | $location.path('/venta-nota-pedido/abm/'); |
245 | }; | 265 | }; |
246 | $scope.crearPedido = function() { | 266 | $scope.crearPedido = function() { |
247 | crearNotaPedidoService.clearNotaPedido(); | 267 | crearNotaPedidoService.clearNotaPedido(); |
248 | $location.path('/venta-nota-pedido/abm/'); | 268 | $location.path('/venta-nota-pedido/abm/'); |
249 | }; | 269 | }; |
250 | } | 270 | } |
251 | ]) | 271 | ]) |
252 | .controller('focaCrearNotaPedidoFichaClienteController', [ | 272 | .controller('focaCrearNotaPedidoFichaClienteController', [ |
253 | '$scope', | 273 | '$scope', |
254 | 'crearNotaPedidoService', | 274 | 'crearNotaPedidoService', |
255 | '$location', | 275 | '$location', |
256 | function($scope, crearNotaPedidoService, $location) { | 276 | function($scope, crearNotaPedidoService, $location) { |
257 | crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { | 277 | crearNotaPedidoService.obtenerNotaPedido().then(function(datos) { |
258 | $scope.notaPedidos = datos.data; | 278 | $scope.notaPedidos = datos.data; |
259 | }); | 279 | }); |
260 | $scope.editar = function(notaPedido) { | 280 | $scope.editar = function(notaPedido) { |
261 | crearNotaPedidoService.setNotaPedido(notaPedido); | 281 | crearNotaPedidoService.setNotaPedido(notaPedido); |
262 | $location.path('/venta-nota-pedido/abm/'); | 282 | $location.path('/venta-nota-pedido/abm/'); |
263 | } | 283 | }; |
264 | $scope.crearPedido = function() { | 284 | $scope.crearPedido = function() { |
265 | crearNotaPedidoService.clearNotaPedido(); | 285 | crearNotaPedidoService.clearNotaPedido(); |
266 | $location.path('/venta-nota-pedido/abm/'); | 286 | $location.path('/venta-nota-pedido/abm/'); |
267 | } | 287 | }; |
268 | } | 288 | } |
269 | ]); | 289 | ]); |
270 | 290 |
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="mostrarFichaCliente()" |
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 | readonly="true" |
63 | ng-bind="vendedor.nombre" | 63 | ng-bind="vendedor.nombre" |
64 | ng-click="abrirModalDomicilio()" | 64 | ng-click="abrirModalDomicilio()" |
65 | placeholder="Seleccione Domicilio" | 65 | placeholder="Seleccione Domicilio" |
66 | > | 66 | > |
67 | </div> | 67 | </div> |
68 | <div class="form-group col-12 col-sm-6 col-md-4"> | 68 | <div class="form-group col-12 col-sm-6 col-md-4"> |
69 | <input | 69 | <input |
70 | class="form-control selectable" | 70 | class="form-control selectable" |
71 | type="text" | 71 | type="text" |
72 | readonly="true" | 72 | readonly="true" |
73 | ng-bind="notaPedido.precioCondicion" | 73 | ng-model="notaPedido.precioCondicion" |
74 | ng-click="abrirModalListaPrecio()" | 74 | ng-click="abrirModalListaPrecio()" |
75 | placeholder="Seleccione Lista de precio" | 75 | placeholder="Seleccione Lista de precio" |
76 | > | 76 | > |
77 | </div> | 77 | </div> |
78 | <div class="form-group col-12 col-sm-6 col-md-4"> | ||
79 | <label>Flete</label> | ||
80 | <div class="form-check custom-radio custom-control-inline"> | ||
81 | <input | ||
82 | class="form-check-input" | ||
83 | type="radio" | ||
84 | name="radioFlete" | ||
85 | value="1" | ||
86 | ng-model="notaPedido.flete"> | ||
87 | <label class="form-check-label">Si</label> | ||
88 | </div> | ||
89 | <div class="form-check custom-radio custom-control-inline"> | ||
90 | <input | ||
91 | class="form-check-input" | ||
92 | type="radio" | ||
93 | name="radioFlete" | ||
94 | value="0" | ||
95 | ng-model="notaPedido.flete"> | ||
96 | <label class="form-check-label">No</label> | ||
97 | </div> | ||
98 | </div> | ||
99 | <div class="form-group col-12 col-sm-6 col-md-4"> | ||
100 | <input | ||
101 | class="form-control selectable" | ||
102 | type="text" | ||
103 | readonly="true" | ||
104 | ng-model="notaPedido.fleteNombre" | ||
105 | ng-click="abrirModalFlete()" | ||
106 | placeholder="Seleccione Flete" | ||
107 | > | ||
108 | </div> | ||
109 | <div class="form-group col-12 col-sm-6 col-md-4"> | ||
110 | <input | ||
111 | class="form-control selectable" | ||
112 | type="number" | ||
113 | step="0.01" | ||
114 | ng-disabled="notaPedido.flete == 0" | ||
115 | ng-model="notaPedido.costoUnitarioKmFlete" | ||
116 | placeholder="Costo por kilómetro" | ||
117 | > | ||
118 | </div> | ||
119 | <div class="form-group col-12 col-sm-6 col-md-4"> | ||
120 | <input | ||
121 | class="form-control selectable" | ||
122 | type="number" | ||
123 | step="0.1" | ||
124 | ng-disabled="notaPedido.flete == 0" | ||
125 | ng-model="notaPedido.kilometros" | ||
126 | placeholder="Kilómetros recorridos" | ||
127 | > | ||
128 | </div> | ||
78 | </div> | 129 | </div> |
79 | </div> | 130 | </div> |
80 | </div> | 131 | </div> |
81 | <div class="row"> | 132 | <div class="row"> |
82 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 133 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
83 | <div class="row"> | 134 | <div class="row"> |
84 | </div> | 135 | </div> |
85 | <div class="row"> | 136 | <div class="row"> |
86 | <table class="table table-striped table-sm"> | 137 | <table class="table table-striped table-sm"> |
87 | <thead> | 138 | <thead> |
88 | <tr> | 139 | <tr> |
89 | <th>Sector</th> | 140 | <th>Sector</th> |
90 | <th>Código</th> | 141 | <th>Código</th> |
91 | <th>Descripción</th> | 142 | <th>Descripción</th> |
92 | <th>Cantidad</th> | 143 | <th>Cantidad</th> |
93 | <th>Precio Unitario</th> | 144 | <th>Precio Unitario</th> |
94 | <th>SubTotal</th> | 145 | <th>SubTotal</th> |
95 | <th></th> | 146 | <th></th> |
96 | <th></th> | 147 | <th></th> |
97 | </tr> | 148 | </tr> |
98 | </thead> | 149 | </thead> |
99 | <tbody> | 150 | <tbody> |
100 | <tr> | 151 | <tr> |
101 | <td colspan="2"><input class="form-control" readonly ng-click="seleccionarArticulo()"></td> | 152 | <td colspan="2"><input class="form-control" readonly ng-click="seleccionarArticulo()"></td> |
102 | <td></td> | 153 | <td></td> |
103 | <td></td> | 154 | <td></td> |
104 | <td></td> | 155 | <td></td> |
105 | <td></td> | 156 | <td></td> |
106 | <td></td> | 157 | <td></td> |
107 | <td></td> | 158 | <td></td> |
108 | </tr> | 159 | </tr> |
109 | <tr style="cursor: pointer;" ng-click="show = !show"> | 160 | <tr style="cursor: pointer;" ng-click="show = !show"> |
110 | <td>1</td> | 161 | <td>1</td> |
111 | <td>1</td> | 162 | <td>1</td> |
112 | <td>Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...</td> | 163 | <td>Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...</td> |
113 | <td>{{10000 | number: 2}}</td> | 164 | <td>{{10000 | number: 2}}</td> |
114 | <td>{{1000000000 | currency:'$'}}</td> | 165 | <td>{{1000000000 | currency:'$'}}</td> |
115 | <td>{{1000000000 | currency:'$'}}</td> | 166 | <td>{{1000000000 | currency:'$'}}</td> |
116 | <td></td> | 167 | <td></td> |
117 | <td> | 168 | <td> |
118 | <button class="btn btn-outline-secondary" style="float: right;"> | 169 | <button class="btn btn-outline-secondary" style="float: right;"> |
119 | <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i> | 170 | <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i> |
120 | <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i> | 171 | <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i> |
121 | </button> | 172 | </button> |
122 | </td> | 173 | </td> |
123 | </tr> | 174 | </tr> |
124 | <tr ng-show="show"> | 175 | <tr ng-show="show"> |
125 | <td>1</td> | 176 | <td>1</td> |
126 | <td>2</td> | 177 | <td>2</td> |
127 | <td>Lorem Ipsum</td> | 178 | <td>Lorem Ipsum</td> |
128 | <td>1</td> | 179 | <td>1</td> |
129 | <td>{{1000000000 | currency:'U$D'}}</td> | 180 | <td>{{1000000000 | currency:'U$D'}}</td> |
130 | <td>{{10 | currency:'$'}}</td> | 181 | <td>{{10 | currency:'$'}}</td> |
131 | <td></td> | 182 | <td></td> |
132 | <td></td> | 183 | <td></td> |
133 | </tr> | 184 | </tr> |
134 | <tr ng-show="show"> | 185 | <tr ng-show="show"> |
135 | <td>1</td> | 186 | <td>1</td> |
136 | <td>2</td> | 187 | <td>2</td> |
137 | <td>Lorem Ipsum</td> | 188 | <td>Lorem Ipsum</td> |
138 | <td>1</td> | 189 | <td>1</td> |
139 | <td>{{10 | currency:'$'}}</td> | 190 | <td>{{10 | currency:'$'}}</td> |
140 | <td>{{10 | currency:'$'}}</td> | 191 | <td>{{10 | currency:'$'}}</td> |
141 | <td></td> | 192 | <td></td> |
142 | <td></td> | 193 | <td></td> |
143 | </tr> | 194 | </tr> |
144 | </tbody> | 195 | </tbody> |
145 | <tfoot> | 196 | <tfoot> |
146 | <tr class="table-secondary"> | 197 | <tr class="table-secondary"> |
147 | <td colspan="5"><b>Cantidad Items:</b> 3</td> | 198 | <td colspan="5"><b>Cantidad Items:</b> 3</td> |
148 | <td colspan="3">{{30 | currency:'$'}}</td> | 199 | <td colspan="3">{{30 | currency:'$'}}</td> |
149 | </tr> | 200 | </tr> |
150 | </tfoot> | 201 | </tfoot> |
151 | </table> | 202 | </table> |
152 | </div> | 203 | </div> |
153 | </div> | 204 | </div> |
154 | </div> | 205 | </div> |
155 | 206 | ||
156 | <!-- | 207 | <!-- |
157 | <form name="formCrearNota"> | 208 | <form name="formCrearNota"> |
158 | <uib-tabset active="active"> | 209 | <uib-tabset active="active"> |
159 | <uib-tab index="0" heading="General"> | 210 | <uib-tab index="0" heading="General"> |
160 | <input type="hidden" name="id" ng-model="notaPedido.id" /> | 211 | <input type="hidden" name="id" ng-model="notaPedido.id" /> |
161 | <div> | 212 | <div> |
162 | <div class="col-auto my-2"> | 213 | <div class="col-auto my-2"> |
163 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | 214 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> |
164 | </div> | 215 | </div> |
165 | </div> | 216 | </div> |
166 | <br> | 217 | <br> |
167 | <br> | 218 | <br> |
168 | <div class="row"> | 219 | <div class="row"> |
169 | <div class="col-md-2"> | 220 | <div class="col-md-2"> |
170 | <div class="col-auto"> | 221 | <div class="col-auto"> |
171 | <label>Fecha de carga</label> | 222 | <label>Fecha de carga</label> |
172 | </div> | 223 | </div> |
173 | </div> | 224 | </div> |
174 | <div class="col-md-3"> | 225 | <div class="col-md-3"> |
175 | <div class="col-auto"> | 226 | <div class="col-auto"> |
176 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | 227 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> |
177 | </div> | 228 | </div> |
178 | </div> | 229 | </div> |
179 | <div class="col-md-2"> | 230 | <div class="col-md-2"> |
180 | <div class="col-auto"> | 231 | <div class="col-auto"> |
181 | <label>Kilómetros</label> | 232 | <label>Kilómetros</label> |
182 | </div> | 233 | </div> |
183 | </div> | 234 | </div> |
184 | <div class="col-md-3"> | 235 | <div class="col-md-3"> |
185 | <div class="col-auto"> | 236 | <div class="col-auto"> |
186 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | 237 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" |
187 | ng-model="notaPedido.kilometros" ng-required="true"> | 238 | ng-model="notaPedido.kilometros" ng-required="true"> |
188 | </div> | 239 | </div> |
189 | </div> | 240 | </div> |
190 | </div> | 241 | </div> |
191 | <div class="row my-3"> | 242 | <div class="row my-3"> |
192 | <div class="col-md-2"> | 243 | <div class="col-md-2"> |
193 | <div class="col-auto"> | 244 | <div class="col-auto"> |
194 | <label>Jurisdicción de IIBB</label> | 245 | <label>Jurisdicción de IIBB</label> |
195 | </div> | 246 | </div> |
196 | </div> | 247 | </div> |
197 | <div class="col-md-3"> | 248 | <div class="col-md-3"> |
198 | <div class="col-auto"> | 249 | <div class="col-auto"> |
199 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | 250 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" |
200 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | 251 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> |
201 | </div> | 252 | </div> |
202 | </div> | 253 | </div> |
203 | <div class="col-md-2"> | 254 | <div class="col-md-2"> |
204 | <div class="col-auto"> | 255 | <div class="col-auto"> |
205 | <label>Costo de financiación</label> | 256 | <label>Costo de financiación</label> |
206 | </div> | 257 | </div> |
207 | </div> | 258 | </div> |
208 | <div class="col-md-3"> | 259 | <div class="col-md-3"> |
209 | <div class="col-auto"> | 260 | <div class="col-auto"> |
210 | <div class="input-group mb-2"> | 261 | <div class="input-group mb-2"> |
211 | <div class="input-group-prepend"> | 262 | <div class="input-group-prepend"> |
212 | <div class="input-group-text">$</div> | 263 | <div class="input-group-text">$</div> |
213 | </div> | 264 | </div> |
214 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | 265 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" |
215 | ng-model="notaPedido.costoFinanciacion"> | 266 | ng-model="notaPedido.costoFinanciacion"> |
216 | </div> | 267 | </div> |
217 | </div> | 268 | </div> |
218 | </div> | 269 | </div> |
219 | </div> | 270 | </div> |
220 | <div class="row"> | 271 | <div class="row"> |
221 | <div class="col-md-2"> | 272 | <div class="col-md-2"> |
222 | <div class="col-auto"> | 273 | <div class="col-auto"> |
223 | <label>Bomba</label> | 274 | <label>Bomba</label> |
224 | </div> | 275 | </div> |
225 | </div> | 276 | </div> |
226 | <div class="col-md-1"> | 277 | <div class="col-md-1"> |
227 | <div class="col-auto"> | 278 | <div class="col-auto"> |
228 | <div class="form-check custom-radio custom-control-inline"> | 279 | <div class="form-check custom-radio custom-control-inline"> |
229 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | 280 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> |
230 | <label class="form-check-label"> | 281 | <label class="form-check-label"> |
231 | Si | 282 | Si |
232 | </label> | 283 | </label> |
233 | </div> | 284 | </div> |
234 | <div class="form-check custom-radio custom-control-inline"> | 285 | <div class="form-check custom-radio custom-control-inline"> |
235 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | 286 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> |
236 | <label class="form-check-label"> | 287 | <label class="form-check-label"> |
237 | No | 288 | No |
238 | </label> | 289 | </label> |
239 | </div> | 290 | </div> |
240 | </div> | 291 | </div> |
241 | </div> | 292 | </div> |
242 | <div class="col-md-1"> | 293 | <div class="col-md-1"> |
243 | <div class="col-auto"> | 294 | <div class="col-auto"> |
244 | <label>Flete</label> | 295 | <label>Flete</label> |
245 | </div> | 296 | </div> |
246 | </div> | 297 | </div> |
247 | <div class="col-md-1"> | 298 | <div class="col-md-1"> |
248 | <div class="col-auto"> | 299 | <div class="col-auto"> |
249 | <div class="form-check custom-radio custom-control-inline"> | 300 | <div class="form-check custom-radio custom-control-inline"> |
250 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | 301 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> |
251 | <label class="form-check-label"> | 302 | <label class="form-check-label"> |
252 | Si | 303 | Si |
253 | </label> | 304 | </label> |
254 | </div> | 305 | </div> |
255 | <div class="form-check custom-radio custom-control-inline"> | 306 | <div class="form-check custom-radio custom-control-inline"> |
256 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | 307 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> |
257 | <label class="form-check-label"> | 308 | <label class="form-check-label"> |
258 | FOB | 309 | FOB |
259 | </label> | 310 | </label> |
260 | </div> | 311 | </div> |
261 | </div> | 312 | </div> |
262 | </div> | 313 | </div> |
263 | <div class="col-md-2"> | 314 | <div class="col-md-2"> |
264 | <div class="col-auto"> | 315 | <div class="col-auto"> |
265 | <label>Costo unitario kilometro flete</label> | 316 | <label>Costo unitario kilometro flete</label> |
266 | </div> | 317 | </div> |
267 | </div> | 318 | </div> |
268 | <div class="col-md-3"> | 319 | <div class="col-md-3"> |
269 | <div class="col-auto"> | 320 | <div class="col-auto"> |
270 | <div class="input-group mb-2"> | 321 | <div class="input-group mb-2"> |
271 | <div class="input-group-prepend"> | 322 | <div class="input-group-prepend"> |
272 | <div class="input-group-text">$</div> | 323 | <div class="input-group-text">$</div> |
273 | </div> | 324 | </div> |
274 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | 325 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" |
275 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | 326 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> |
276 | </div> | 327 | </div> |
277 | </div> | 328 | </div> |
278 | </div> | 329 | </div> |
279 | </div> | 330 | </div> |
280 | <div class="row my-3"> | 331 | <div class="row my-3"> |
281 | <div class="col-md-2"> | 332 | <div class="col-md-2"> |
282 | <div class="col-auto"> | 333 | <div class="col-auto"> |
283 | <label>Vendedor</label> | 334 | <label>Vendedor</label> |
284 | </div> | 335 | </div> |
285 | </div> | 336 | </div> |
286 | <div class="col-md-3"> | 337 | <div class="col-md-3"> |
287 | <div class="col-auto"> | 338 | <div class="col-auto"> |
288 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | 339 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" |
289 | ng-click="seleccionarVendedor()" readonly> | 340 | ng-click="seleccionarVendedor()" readonly> |
290 | </div> | 341 | </div> |
291 | </div> | 342 | </div> |
292 | <div class="col-md-2"> | 343 | <div class="col-md-2"> |
293 | <div class="col-auto"> | 344 | <div class="col-auto"> |
294 | <label>Petrolera</label> | 345 | <label>Petrolera</label> |
295 | </div> | 346 | </div> |
296 | </div> | 347 | </div> |
297 | <div class="col-md-3"> | 348 | <div class="col-md-3"> |
298 | <div class="col-auto"> | 349 | <div class="col-auto"> |
299 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | 350 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" |
300 | ng-click="seleccionarPetrolera()" readonly> | 351 | ng-click="seleccionarPetrolera()" readonly> |
301 | </div> | 352 | </div> |
302 | </div> | 353 | </div> |
303 | </div> | 354 | </div> |
304 | </div> | 355 | </div> |
305 | <div class="row"> | 356 | <div class="row"> |
306 | <div class="col-md-2"> | 357 | <div class="col-md-2"> |
307 | <div class="col-auto"> | 358 | <div class="col-auto"> |
308 | <label>Cliente</label> | 359 | <label>Cliente</label> |
309 | </div> | 360 | </div> |
310 | </div> | 361 | </div> |
311 | <div class="col-md-3"> | 362 | <div class="col-md-3"> |
312 | <div class="col-auto"> | 363 | <div class="col-auto"> |
313 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | 364 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" |
314 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | 365 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> |
315 | </div> | 366 | </div> |
316 | </div> | 367 | </div> |
317 | <div class="col-md-2"> | 368 | <div class="col-md-2"> |
318 | <div class="col-auto"> | 369 | <div class="col-auto"> |
319 | <label>Domicilio</label> | 370 | <label>Domicilio</label> |
320 | </div> | 371 | </div> |
321 | </div> | 372 | </div> |
322 | <div class="col-md-4"> | 373 | <div class="col-md-4"> |
323 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | 374 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> |
324 | <div class="col-auto"> | 375 | <div class="col-auto"> |
325 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | 376 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" |
326 | domi.dom | 377 | domi.dom |
327 | for domi | 378 | for domi |
328 | in domiciliosCliente | 379 | in domiciliosCliente |
329 | " | 380 | " |
330 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | 381 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" |
331 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | 382 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> |
332 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> | 383 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> |
333 | <div ng-show="sinResultados"> | 384 | <div ng-show="sinResultados"> |
334 | No se encontraron resultados. | 385 | No se encontraron resultados. |
335 | </div> | 386 | </div> |
336 | </div> | 387 | </div> |
337 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | 388 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> |
338 | <a class="btn" ng-click="addNewDom()">+</a> | 389 | <a class="btn" ng-click="addNewDom()">+</a> |
339 | </div> | 390 | </div> |
340 | </div> | 391 | </div> |
341 | </div> | 392 | </div> |
342 | </uib-tab> | 393 | </uib-tab> |
343 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | 394 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> |
344 | <div> | 395 | <div> |
345 | <div class="col-auto my-2"> | 396 | <div class="col-auto my-2"> |
346 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | 397 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> |
347 | </div> | 398 | </div> |
348 | </div> | 399 | </div> |
349 | <br> | 400 | <br> |
350 | <br> | 401 | <br> |
351 | <div class="row"> | 402 | <div class="row"> |
352 | <div class="col-md-2"> | 403 | <div class="col-md-2"> |
353 | <div class="col-auto"> | 404 | <div class="col-auto"> |
354 | <label>Precios y condiciones</label> | 405 | <label>Precios y condiciones</label> |
355 | </div> | 406 | </div> |
356 | </div> | 407 | </div> |
357 | <div class="col-md-4"> | 408 | <div class="col-md-4"> |
358 | <div class="col-auto"> | 409 | <div class="col-auto"> |
359 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | 410 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> |
360 | </select> | 411 | </select> |
361 | </div> | 412 | </div> |
362 | </div> | 413 | </div> |
363 | <div class="col-md-2"> | 414 | <div class="col-md-2"> |
364 | <div class="col-auto"> | 415 | <div class="col-auto"> |
365 | <label>Producto</label> | 416 | <label>Producto</label> |
366 | </div> | 417 | </div> |
367 | </div> | 418 | </div> |
368 | <div class="col-md-4"> | 419 | <div class="col-md-4"> |
369 | <div class="col-auto"> | 420 | <div class="col-auto"> |
370 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | 421 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" |
371 | ng-click="seleccionarArticulo()" readonly> | 422 | ng-click="seleccionarArticulo()" readonly> |
372 | </div> | 423 | </div> |
373 | </div> | 424 | </div> |
374 | </div> | 425 | </div> |
375 | <div class="col-md-12"> | 426 | <div class="col-md-12"> |
376 | <table class="table my-3 table-hover table-nonfluid"> | 427 | <table class="table my-3 table-hover table-nonfluid"> |
377 | <thead> | 428 | <thead> |
378 | <tr> | 429 | <tr> |
379 | <th>Código</th> | 430 | <th>Código</th> |
380 | <th>Nombre</th> | 431 | <th>Nombre</th> |
381 | <th>Precio unitario</th> | 432 | <th>Precio unitario</th> |
382 | <th>Costo unitario bruto</th> | 433 | <th>Costo unitario bruto</th> |
383 | <th>Cantidad</th> | 434 | <th>Cantidad</th> |
384 | <th>Subtotal</th> | 435 | <th>Subtotal</th> |
385 | </tr> | 436 | </tr> |
386 | </thead> | 437 | </thead> |
387 | <tbody> | 438 | <tbody> |
388 | <tr ng-repeat="articulo in articulosTabla"> | 439 | <tr ng-repeat="articulo in articulosTabla"> |
389 | <td ng-bind="articulo.codigo"></td> | 440 | <td ng-bind="articulo.codigo"></td> |
390 | <td ng-bind="articulo.nombre"></td> | 441 | <td ng-bind="articulo.nombre"></td> |
391 | <td ng-bind="articulo.precio"></td> | 442 | <td ng-bind="articulo.precio"></td> |
392 | <td ng-bind="articulo.costoUnitario"></td> | 443 | <td ng-bind="articulo.costoUnitario"></td> |
393 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | 444 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> |
394 | <td ng-bind="getSubTotal(articulo.item)"></td> | 445 | <td ng-bind="getSubTotal(articulo.item)"></td> |
395 | </tr> | 446 | </tr> |
396 | </tbody> | 447 | </tbody> |
397 | </table> | 448 | </table> |
398 | </div> | 449 | </div> |
399 | </uib-tab> | 450 | </uib-tab> |
400 | </uib-tabset> | 451 | </uib-tabset> |
401 | </form>--> | 452 | </form>--> |