Commit 1f5fb5fb9c0a47e459d952bebd90f131430a4e81
Exists in
master
Merge branch 'master' into 'master'
Master(mpuebla) See merge request !2
Showing
4 changed files
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-modal-descarga", | 2 | "name": "foca-modal-descarga", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "foca-modal-descarga", | 4 | "description": "foca-modal-descarga", |
5 | "main": "index.js", | 5 | "main": "index.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "refresh": "gulp uglify && cp tmp/foca-modal-descarga.js ../wrapper-demo/node_modules/foca-modal-descarga/dist/foca-modal-descarga.min.js", | ||
7 | "test": "echo \"Error: no test specified\" && exit 1", | 8 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | "compile": "gulp uglify", | 9 | "compile": "gulp uglify", |
9 | "gulp-pre-commit": "gulp pre-commit", | 10 | "gulp-pre-commit": "gulp pre-commit", |
10 | "postinstall": "npm run compile && gulp clean-post-install", | 11 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 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+http://git.focasoftware.com/npm/foca-directivas.git git+http://git.focasoftware.com/npm/foca-modal-remito.git" | 12 | "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 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+http://git.focasoftware.com/npm/foca-directivas.git git+http://git.focasoftware.com/npm/foca-modal-remito.git" |
12 | }, | 13 | }, |
13 | "pre-commit": [ | 14 | "pre-commit": [ |
14 | "gulp-pre-commit" | 15 | "gulp-pre-commit" |
15 | ], | 16 | ], |
16 | "repository": { | 17 | "repository": { |
17 | "type": "git", | 18 | "type": "git", |
18 | "url": "git+http://git.focasoftware.com/npm/foca-modal-descarga.git" | 19 | "url": "git+http://git.focasoftware.com/npm/foca-modal-descarga.git" |
19 | }, | 20 | }, |
20 | "author": "Foca Software", | 21 | "author": "Foca Software", |
21 | "license": "ISC", | 22 | "license": "ISC", |
22 | "devDependencies": { | 23 | "devDependencies": { |
23 | "angular": "^1.7.8", | 24 | "angular": "^1.7.8", |
24 | "angular-ladda": "^0.4.3", | 25 | "angular-ladda": "^0.4.3", |
25 | "angular-route": "^1.7.8", | 26 | "angular-route": "^1.7.8", |
26 | "bootstrap": "^4.3.1", | 27 | "bootstrap": "^4.3.1", |
27 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", | 28 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", |
28 | "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", | 29 | "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", |
29 | "font-awesome": "^4.7.0", | 30 | "font-awesome": "^4.7.0", |
30 | "gulp": "^3.9.1", | 31 | "gulp": "^3.9.1", |
31 | "gulp-angular-templatecache": "^2.2.6", | 32 | "gulp-angular-templatecache": "^2.2.6", |
32 | "gulp-clean": "^0.4.0", | 33 | "gulp-clean": "^0.4.0", |
33 | "gulp-concat": "^2.6.1", | 34 | "gulp-concat": "^2.6.1", |
34 | "gulp-connect": "^5.7.0", | 35 | "gulp-connect": "^5.7.0", |
35 | "gulp-htmlmin": "^5.0.1", | 36 | "gulp-htmlmin": "^5.0.1", |
36 | "gulp-jshint": "^2.1.0", | 37 | "gulp-jshint": "^2.1.0", |
37 | "gulp-rename": "^1.4.0", | 38 | "gulp-rename": "^1.4.0", |
38 | "gulp-replace": "^1.0.0", | 39 | "gulp-replace": "^1.0.0", |
39 | "gulp-sequence": "^1.0.0", | 40 | "gulp-sequence": "^1.0.0", |
40 | "gulp-uglify": "^3.0.2", | 41 | "gulp-uglify": "^3.0.2", |
41 | "gulp-uglify-es": "^1.0.4", | 42 | "gulp-uglify-es": "^1.0.4", |
42 | "jasmine-core": "^3.4.0", | 43 | "jasmine-core": "^3.4.0", |
43 | "jquery": "^3.4.0", | 44 | "jquery": "^3.4.0", |
44 | "jshint": "^2.10.2", | 45 | "jshint": "^2.10.2", |
45 | "ladda": "^1.0.6", | 46 | "ladda": "^1.0.6", |
46 | "pre-commit": "^1.2.2", | 47 | "pre-commit": "^1.2.2", |
47 | "pump": "^3.0.0", | 48 | "pump": "^3.0.0", |
48 | "ui-bootstrap4": "^3.0.6" | 49 | "ui-bootstrap4": "^3.0.6" |
49 | } | 50 | } |
50 | } | 51 | } |
51 | 52 |
src/js/controller.js
1 | angular.module('focaModalDescarga') | 1 | angular.module('focaModalDescarga') |
2 | .controller('focaModalDescargaCtrl', [ | 2 | .controller('focaModalDescargaCtrl', [ |
3 | '$scope', | 3 | '$scope', |
4 | 'focaModalDescargasService', | 4 | 'focaModalDescargasService', |
5 | '$filter', | 5 | '$filter', |
6 | 'focaModalService', | 6 | 'focaModalService', |
7 | '$timeout', | 7 | '$timeout', |
8 | '$uibModalInstance', | 8 | '$uibModalInstance', |
9 | '$uibModal', | 9 | '$uibModal', |
10 | function($scope, focaModalDescargasService, $filter, | 10 | 'remito', |
11 | focaModalService, $timeout, $uibModalInstance, $uibModal) | 11 | 'focaModalDetalleHojaRutaService', |
12 | { | 12 | 'focaSeguimientoService', |
13 | function ($scope, focaModalDescargasService, $filter, | ||
14 | focaModalService, $timeout, $uibModalInstance, $uibModal, remito, | ||
15 | focaModalDetalleHojaRutaService, focaSeguimientoService) { | ||
13 | 16 | ||
14 | //#region variables | 17 | //#region variables |
15 | $scope.remito = {}; | 18 | $scope.remito = {}; |
16 | //#endregion | 19 | $scope.remito = remito; |
20 | $scope.nroRecibo = 0; | ||
21 | $scope.cisternas = remito.cisternas; | ||
22 | $scope.nroRemito = "00" + remito.sucursal + "-000000000" + remito.numeroRemito; | ||
17 | 23 | ||
18 | $scope.crearRemito = function() { | 24 | console.log(remito); |
25 | //#endregion | ||
19 | 26 | ||
27 | $scope.crearRemito = function () { | ||
28 | if (!$scope.remito.cliente) { | ||
29 | focaModalService.alert("No has seleccionado cliente"); | ||
30 | return; | ||
31 | } | ||
32 | // if (!validarDescarga()) { | ||
33 | // focaModalService.alert("Cantidad de descarga ingresada erronea"); | ||
34 | // return; | ||
35 | // } | ||
36 | if (!$scope.nroRecibo) { | ||
37 | focaModalService.alert("No ingresaste nro de recibo"); | ||
38 | return; | ||
39 | } | ||
40 | //#region OBJETO REMITO | ||
20 | var remito = { | 41 | var remito = { |
21 | id: $scope.remito.id, | 42 | id: 0, |
22 | fechaRemito: $scope.now.toISOString().slice(0, 19).replace('T', ' '), | 43 | fechaRemito: new Date().toISOString().slice(0, 19).replace('T', ' '), |
23 | idCliente: $scope.remito.cliente.COD, | 44 | idCliente: $scope.remito.cliente.cod, |
24 | nombreCliente: $scope.remito.cliente.NOM, | 45 | nombreCliente: $scope.remito.cliente.nom, |
25 | cuitCliente: $scope.remito.cliente.CUIT, | 46 | cuitCliente: $scope.remito.cliente.cuit, |
26 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, | 47 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, |
27 | numeroNotaPedido: $scope.remito.numeroNotaPedido, | 48 | numeroNotaPedido: $scope.remito.numeroNotaPedido, |
28 | idVendedor: $scope.remito.vendedor.NUM, | 49 | idVendedor: $scope.remito.vendedor.NUM, |
29 | idProveedor: $scope.remito.proveedor.COD, | 50 | idProveedor: $scope.remito.proveedor.COD, |
30 | idDomicilio: $scope.remito.idDomicilio || $scope.remito.domicilio.id, | 51 | idDomicilio: $scope.remito.idDomicilio || $scope.remito.domicilio.id, |
31 | idCotizacion: $scope.remito.cotizacion.ID, | 52 | idCotizacion: $scope.remito.cotizacion.ID, |
32 | idListaPrecio: $scope.idLista, | 53 | idListaPrecio: $scope.remito.cliente.mod, |
33 | flete: $scope.remito.flete, | 54 | flete: $scope.remito.flete, |
34 | fob: $scope.remito.fob, | 55 | fob: $scope.remito.fob, |
35 | bomba: $scope.remito.bomba, | 56 | bomba: $scope.remito.bomba, |
36 | kilometros: $scope.remito.kilometros, | 57 | kilometros: $scope.remito.kilometros, |
37 | domicilioStamp: $scope.remito.domicilioStamp, | 58 | domicilioStamp: $scope.remito.domicilioStamp, |
38 | observaciones: $scope.remito.observaciones, | 59 | observaciones: $scope.remito.observaciones, |
39 | numeroRemito: parseInt($scope.comprobante), | 60 | numeroRemito: parseInt($scope.comprobante), |
40 | sucursal: parseInt($scope.puntoVenta), | 61 | sucursal: parseInt($scope.puntoVenta), |
41 | responsabilidadIvaCliente: $scope.remito.cliente.IVA, | 62 | responsabilidadIvaCliente: $scope.remito.cliente.iva, |
42 | descuento: 0,//TODO, | 63 | descuento: 0,//TODO, |
43 | importeNeto: getImporte('netoUnitario'), | 64 | importeNeto: getImporte('netoUnitario'), |
44 | importeExento: getImporte('exentoUnitario'), | 65 | importeExento: getImporte('exentoUnitario'), |
45 | importeIva: getImporte('ivaUnitario'), | 66 | importeIva: getImporte('ivaUnitario'), |
46 | importeIvaServicios: 0,//TODO | 67 | importeIvaServicios: 0,//TODO |
47 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), | 68 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), |
48 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), | 69 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), |
49 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), | 70 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), |
50 | percepcion: 0,//TODO | 71 | percepcion: 0,//TODO |
51 | percepcionIva: 0,//TODO | 72 | percepcionIva: 0,//TODO |
52 | redondeo: 0,//TODO | 73 | redondeo: 0,//TODO |
53 | anulado: false, | 74 | anulado: false, |
54 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), | 75 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), |
55 | lugar: parseInt($scope.puntoVenta), | 76 | lugar: parseInt($scope.puntoVenta), |
56 | cuentaMadre: 0,//TODO | 77 | cuentaMadre: 0,//TODO |
57 | cuentaContable: 0,//TODO | 78 | cuentaContable: 0,//TODO |
58 | asiento: 0,//TODO | 79 | asiento: 0,//TODO |
59 | e_hd: '',//TODO | 80 | e_hd: '',//TODO |
60 | c_hd: '', | 81 | c_hd: '', |
61 | numeroLiquidoProducto: 0,//TODO | 82 | numeroLiquidoProducto: 0,//TODO |
62 | estado: 0, | 83 | estado: 0, |
63 | destinoVenta: 0,//TODO | 84 | destinoVenta: 0,//TODO |
64 | operacionTipo: 0, //TODO | 85 | operacionTipo: 0, //TODO |
86 | idHojaRuta: $scope.remito.idHojaRuta | ||
65 | } | 87 | } |
66 | } | 88 | //#endregionc |
89 | focaModalDescargasService.crearRemito({remito: remito, notaPedido: {id:0}}) | ||
90 | .then(function (res) { | ||
91 | console.log(res); | ||
92 | remitoId = res.data.id | ||
93 | descargar(remitoId); | ||
94 | focaModalDescargasService.addArticulos($scope.remito.articulosRemito, remitoId, 1); | ||
95 | focaModalService.alert("Descarga realizada") | ||
96 | .then(function(){ | ||
97 | $uibModalInstance.dismiss(); | ||
98 | }) | ||
99 | }) | ||
100 | .catch(function (e) { console.log(e); }) | ||
67 | 101 | ||
68 | $scope.seleccionarCliente = function() { | 102 | }; |
103 | $scope.getTotal = function () { | ||
104 | var total = 0; | ||
105 | var arrayTempArticulos = $scope.remito.articulosRemito; | ||
106 | for (var i = 0; i < arrayTempArticulos.length; i++) { | ||
107 | total += arrayTempArticulos[i].precio * arrayTempArticulos[i].cantidad; | ||
108 | } | ||
109 | return parseFloat(total.toFixed(2)); | ||
110 | }; | ||
111 | function descargar(idRemito) { | ||
112 | for (var i = 0; i < $scope.cisternas.length; i++) { | ||
113 | var descarga = $scope.cisternas[i].cisternaCarga.descargar; | ||
114 | var hojaRutaMovimientos = []; | ||
115 | var cisternaMovimientos = []; | ||
116 | var cisternaCargas = []; | ||
117 | var cisternaCarga = $scope.cisternas[i].cisternaCarga; | ||
118 | if (!descarga) continue; | ||
119 | // if (descarga > cisternaCarga.cantidad) { | ||
120 | // focaModalService.alert('La cantidad a descargar no debe ser ' + | ||
121 | // 'mayor a la cantidad de la cisterna'); | ||
122 | // $scope.cargando = false; | ||
123 | // return; | ||
124 | // } | ||
125 | cisternaCarga.cantidad -= descarga; | ||
126 | |||
127 | //Guardar | ||
128 | var now = new Date(); | ||
129 | var cisternaMovimiento = { | ||
130 | fecha: now.toISOString().slice(0, 19).replace('T', ' '), | ||
131 | cantidad: descarga, | ||
132 | metodo: 'descarga', | ||
133 | idCisternaCarga: cisternaCarga.id, | ||
134 | idRemito: idRemito | ||
135 | }; | ||
136 | var hojaRutaMovimiento = { | ||
137 | reciboDescarga: $scope.nroRecibo, | ||
138 | idRemito: idRemito | ||
139 | }; | ||
140 | delete cisternaCarga.articulo; | ||
141 | delete cisternaCarga.descargar; | ||
142 | cisternaCargas.push(cisternaCarga); | ||
143 | cisternaMovimientos.push(cisternaMovimiento); | ||
144 | hojaRutaMovimientos.push(hojaRutaMovimiento); | ||
145 | } | ||
146 | var save = { | ||
147 | cisternaCargas: cisternaCargas, | ||
148 | cisternaMovimientos: cisternaMovimientos, | ||
149 | hojaRutaMovimientos: hojaRutaMovimientos, | ||
150 | articulo: $scope.articuloSeleccionado | ||
151 | }; | ||
152 | focaModalDetalleHojaRutaService | ||
153 | .postMovimientoHojaRuta(save) | ||
154 | .then(guardarSeguimiento) | ||
155 | .catch(function() {}); | ||
156 | function guardarSeguimiento(res) { | ||
157 | focaSeguimientoService | ||
158 | .guardarPosicion( | ||
159 | 'Entrega de producto', | ||
160 | res.data[0].id, | ||
161 | $scope.remito.observaciones); | ||
162 | $scope.aDescargar = []; | ||
163 | }; | ||
164 | }; | ||
165 | function getImporte(propiedad) { | ||
166 | var importe = 0; | ||
167 | |||
168 | $scope.remito.articulosRemito.forEach(function (articulo) { | ||
169 | |||
170 | if (articulo[propiedad]) { | ||
171 | importe += articulo[propiedad] * articulo.cantidad; | ||
172 | } | ||
173 | return; | ||
174 | |||
175 | }); | ||
176 | |||
177 | return importe; | ||
178 | }; | ||
179 | function validarDescarga() { | ||
180 | hasDisponible = $scope.cisternas.find(function (cisterna) { | ||
181 | return parseInt(cisterna.cisternaCarga.descargar) > 0 && | ||
182 | parseInt(cisterna.cisternaCarga.descargar) <= | ||
183 | cisterna.cisternaCarga.cantidad | ||
184 | }); | ||
185 | return hasDisponible; | ||
186 | }; | ||
187 | $scope.seleccionarCliente = function () { | ||
69 | 188 | ||
70 | var modalInstance = $uibModal.open( | 189 | var modalInstance = $uibModal.open( |
71 | { | 190 | { |
72 | ariaLabelledBy: 'Busqueda de Cliente', | 191 | ariaLabelledBy: 'Busqueda de Cliente', |
73 | templateUrl: 'foca-busqueda-cliente-modal.html', | 192 | templateUrl: 'foca-busqueda-cliente-modal.html', |
74 | controller: 'focaBusquedaClienteModalController', | 193 | controller: 'focaBusquedaClienteModalController', |
75 | resolve: { | 194 | resolve: { |
76 | vendedor: function () { return null; }, | 195 | vendedor: function () { return null; }, |
77 | cobrador: function () { return null; } | 196 | cobrador: function () { return null; } |
78 | }, | 197 | }, |
79 | size: 'lg' | 198 | size: 'lg' |
80 | } | 199 | } |
81 | ); | 200 | ); |
82 | modalInstance.result.then(function(cliente) { | 201 | modalInstance.result.then(function (cliente) { |
83 | $scope.remito.cliente = cliente; | 202 | $scope.remito.cliente = cliente; |
84 | }, function() { | 203 | }, function () { |
85 | //funcion ejecutada al cancelar modal | 204 | //funcion ejecutada al cancelar modal |
86 | }); | 205 | }); |
87 | }; | 206 | }; |
88 | 207 | $scope.cancelar = function () { | |
89 | $scope.cancelar = function() { | ||
90 | $uibModalInstance.dismiss(); | 208 | $uibModalInstance.dismiss(); |
91 | } | 209 | } |
92 | } | 210 | } |
93 | ]); | 211 | ]); |
src/js/service.js
1 | angular.module('focaModalDescarga') | 1 | angular.module('focaModalDescarga') |
2 | .factory('focaModalDescargasService', ['$http', 'API_ENDPOINT', function ($http, API_ENDPOINT) { | 2 | .factory('focaModalDescargasService', ['$http', 'API_ENDPOINT', 'crearRemitoService', |
3 | return { | 3 | function ($http, API_ENDPOINT, crearRemitoService) { |
4 | 4 | var route = API_ENDPOINT.URL; | |
5 | }; | 5 | return { |
6 | }]); | 6 | crearRemito: function (remito) { |
7 | return $http.post(route + '/remito', remito); | ||
8 | }, | ||
9 | addArticulos: function (articulosRemito, idRemito, cotizacion) { | ||
10 | for (var i = 0; i < articulosRemito.length; i++) { | ||
11 | delete articulosRemito[i].editCantidad; | ||
12 | delete articulosRemito[i].editPrecio; | ||
13 | articulosRemito[i].idRemito = articulosRemito[i].idRemito !== -1 ? | ||
14 | idRemito : articulosRemito[i].idRemito; | ||
15 | articulosRemito[i].precio = articulosRemito[i].precio * cotizacion; | ||
16 | delete articulosRemito[i].idNotaPedido; | ||
17 | crearRemitoService.crearArticulosParaRemito(articulosRemito[i]); | ||
18 | } | ||
19 | } | ||
20 | }; | ||
21 | }]); | ||
7 | 22 |
src/views/foca-modal-descarga.html
1 | <div class="modal-header"> | 1 | <div class="modal-header"> |
2 | <h5>Detalle de descarga</h5> | 2 | <h5>Detalle de descarga</h5> |
3 | </div> | 3 | </div> |
4 | <div class="modal-body"> | 4 | <div class="modal-body"> |
5 | <div class="row"> | 5 | <div class="row px-1"> |
6 | <div class="col-3 mt-1 pl-1"> | 6 | <div class="col-3 align-self-center mt-1 pl-1"> |
7 | <strong>Cliente</strong> | 7 | <strong>Cliente</strong> |
8 | </div> | 8 | </div> |
9 | <div class="col-9"> | 9 | <div class="col-9"> |
10 | <div class="input-group"> | 10 | <div class="input-group"> |
11 | <input | 11 | <input |
12 | type="text" | 12 | type="text" |
13 | ladda="searchLoading" | 13 | ladda="searchLoading" |
14 | class="form-control form-control-sm foca-input" | 14 | class="form-control form-control-sm foca-input" |
15 | placeholder="Busqueda cliente" | 15 | placeholder="Busqueda cliente" |
16 | readonly | 16 | readonly |
17 | > | 17 | > |
18 | <div class="input-group-append"> | 18 | <div class="input-group-append"> |
19 | <button | 19 | <button |
20 | ladda="searchLoading" | 20 | ladda="searchLoading" |
21 | data-spinner-color="#FF0000" | 21 | data-spinner-color="#FF0000" |
22 | class="btn btn-outline-secondary" | 22 | class="btn btn-outline-secondary" |
23 | type="button" | 23 | type="button" |
24 | ng-click="seleccionarCliente()" | 24 | ng-click="seleccionarCliente()" |
25 | > | 25 | > |
26 | <i class="fa fa-search fa-x1" aria-hidden="true"></i> | 26 | <i class="fa fa-search fa-x1" aria-hidden="true"></i> |
27 | </button> | 27 | </button> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | <div class="col-3 pl-1"> | 31 | <div class="col-3 align-self-center pl-1 mt-1"> |
32 | <strong>Domicilio</strong> | 32 | <strong>Domicilio</strong> |
33 | </div> | 33 | </div> |
34 | <div class="col-9"> | 34 | <div class="col-9 align-self-center mt-1"> |
35 | <label ng-bind="remito.cliente.DOM">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Est magni doloribus expedita laudantium veniam ipsum, dicta recusandae natus inventore maiores voluptatum libero, rem obcaecati esse quibusdam quo. Eos, voluptatibus sit.</label> | 35 | <label ng-bind="remito.cliente.DOM"></label> |
36 | </div> | 36 | </div> |
37 | <div class="col-3 pl-1"> | 37 | <!-- <div class="col-3 pl-1"> |
38 | <strong>Punto descarga</strong> | 38 | <strong>Punto descarga</strong> |
39 | </div> | 39 | </div> |
40 | <div class="col-9"> | 40 | <div class="col-9"> |
41 | <label>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Fugiat facilis commodi dolore aperiam dolor quaerat, sit earum vero iste itaque aspernatur qui nisi id repudiandae error architecto inventore vel temporibus.</label> | 41 | <label>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Fugiat facilis commodi dolore aperiam dolor quaerat, sit earum vero iste itaque aspernatur qui nisi id repudiandae error architecto inventore vel temporibus.</label> |
42 | </div> | 42 | </div> --> |
43 | <div class="col-3 px-1"> | 43 | <div class="col-3 align-self-center px-1 mt-1"> |
44 | <strong>Remito Nº</strong> | 44 | <strong>Remito Nº</strong> |
45 | </div> | 45 | </div> |
46 | <div class="col-9"> | 46 | <div class="col-9 mt-1"> |
47 | <input type="text" class="form-control" value="0001-55551111" readonly> | 47 | <input |
48 | type="text" class="form-control form-control-sm" | ||
49 | ng-model="nroRemito" readonly> | ||
48 | </div> | 50 | </div> |
49 | <div class="col-12"> | 51 | <div class="col-12 mt-3"> |
50 | <table class="table"> | 52 | <table class="table"> |
51 | <thead> | 53 | <thead> |
52 | <tr> | 54 | <tr> |
53 | <th>Cisterna</th> | 55 | <th>Cisterna</th> |
54 | <th>Articulo</th> | 56 | <th>Articulo</th> |
55 | <th>Disponibles</th> | 57 | <th>Disponibles</th> |
56 | <th>Descargar</th> | 58 | <th>Descargar</th> |
57 | </tr> | 59 | </tr> |
58 | </thead> | 60 | </thead> |
59 | <tbody> | 61 | <tbody> |
60 | <tr> | 62 | <tr ng-repeat="cisterna in cisternas"> |
61 | <td>b45</td> | 63 | <td ng-bind="cisterna.codigo"></td> |
62 | <td>Nafta súper</td> | 64 | <td ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td> |
63 | <td>400</td> | 65 | <td ng-bind="cisterna.cisternaCarga.cantidad"></td> |
64 | <td> | 66 | <td> |
65 | <input type="text" class=" form-control col-12"> | 67 | <input |
68 | ng-init="cisterna.cisternaCarga.descargar = 0" | ||
69 | ng-model="cisterna.cisternaCarga.descargar" | ||
70 | type="text" class="form-control col-12"> | ||
66 | </td> | 71 | </td> |
67 | </tr> | 72 | </tr> |
68 | </tbody> | 73 | </tbody> |
69 | </table> | 74 | </table> |
70 | </div> | 75 | </div> |
71 | <div class="col-3 px-1"> | 76 | <div class="col-3 align-self-center px-1"> |
72 | <strong>Nº Recibo</strong> | 77 | <strong>Nº Recibo</strong> |
73 | </div> | 78 | </div> |
74 | <div class="col-9"> | 79 | <div class="col-9"> |
75 | <input class="form-control" type="text" placeholder="Nº de recibo"> | 80 | <input ng-model="nroRecibo" class="form-control" type="text" placeholder="Nº de recibo"> |
76 | </div> | 81 | </div> |
77 | </div> | 82 | </div> |
78 | </div> | 83 | </div> |
79 | <div class="modal-footer"> | 84 | <div class="modal-footer"> |
80 | <button | 85 | <button |
81 | class="btn btn-sm btn-secondary" | 86 | class="btn btn-sm btn-secondary" |
82 | ladda="cargando" | 87 | ladda="cargando" |
83 | type="button" | 88 | type="button" |
84 | ng-click="cancelar()">Cancelar</button> | 89 | ng-click="cancelar()">Cancelar</button> |
85 | <button | 90 | <button |
86 | class="btn btn-sm btn-primary" | 91 | class="btn btn-sm btn-primary" |
87 | ladda="cargando" | 92 | ladda="cargando" |
88 | type="button" | 93 | type="button" |
89 | ng-click="aceptar()" | 94 | ng-click="crearRemito()" |
90 | ng-disabled="tieneArticulosPendientes() || idRemito === -1" | 95 | ng-disabled="tieneArticulosPendientes() || idRemito === -1" |
91 | foca-focus="!tieneArticulosPendientes() && idRemito !== -1">Descargar</button> | 96 | foca-focus="!tieneArticulosPendientes() && idRemito !== -1">Descargar</button> |
92 | </div> | 97 | </div> |
93 | 98 |