Commit 10ff3c6922d7a12790e5b279cc2a78132e569bf5
Exists in
master
Merge branch 'master' into 'master'
Master(mpuebla) See merge request !8
Showing
2 changed files
Show diff stats
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 | 'remito', | 10 | 'remito', |
11 | 'focaModalDetalleHojaRutaService', | 11 | 'focaModalDetalleHojaRutaService', |
12 | 'focaSeguimientoService', | 12 | 'focaSeguimientoService', |
13 | 'crearRemitoService', | 13 | 'crearRemitoService', |
14 | function ($scope, focaModalDescargasService, $filter, | 14 | function ($scope, focaModalDescargasService, $filter, |
15 | focaModalService, $timeout, $uibModalInstance, $uibModal, remito, | 15 | focaModalService, $timeout, $uibModalInstance, $uibModal, remito, |
16 | focaModalDetalleHojaRutaService, focaSeguimientoService, crearRemitoService) { | 16 | focaModalDetalleHojaRutaService, focaSeguimientoService, crearRemitoService) { |
17 | 17 | ||
18 | //#region variables | 18 | //#region variables |
19 | console.log(remito); | ||
20 | $scope.remito = {}; | 19 | $scope.remito = {}; |
21 | $scope.remito = remito; | 20 | $scope.remito = remito; |
22 | $scope.nroRecibo = 0; | 21 | $scope.nroRecibo = 0; |
23 | $scope.cisternas = remito.cisternas; | 22 | $scope.cisternas = remito.cisternas; |
23 | $scope.nroSucursal = "00" + remito.sucursal; | ||
24 | $scope.nroRemito; | 24 | $scope.nroRemito; |
25 | $scope.articulos = []; | 25 | $scope.articulos = []; |
26 | //#endregion | 26 | //#endregion |
27 | 27 | ||
28 | function init () { | 28 | function init () { |
29 | crearRemitoService.getNumeroRemito().then( | 29 | crearRemitoService.getNumeroRemito().then( |
30 | function (res) { | 30 | function (res) { |
31 | 31 | ||
32 | $scope.nroRemito = rellenar(res.data.sucursal, 4) + '-' + | 32 | $scope.nroRemito = rellenar(res.data.sucursal, 4) + '-' + |
33 | rellenar(res.data.numeroRemito, 8); | 33 | rellenar(res.data.numeroRemito, 8); |
34 | }, | 34 | }, |
35 | function (err) { | 35 | function (err) { |
36 | focaModalService.alert('La terminal no esta configurada correctamente'); | 36 | focaModalService.alert('La terminal no esta configurada correctamente'); |
37 | console.info(err); | 37 | console.info(err); |
38 | } | 38 | } |
39 | ); | 39 | ); |
40 | }; | 40 | }; |
41 | 41 | ||
42 | init(); | 42 | init(); |
43 | 43 | ||
44 | $scope.crearRemito = function () { | 44 | $scope.crearRemito = function () { |
45 | if (!$scope.remito.cliente) { | 45 | if (!$scope.remito.cliente) { |
46 | focaModalService.alert("No has seleccionado cliente"); | 46 | focaModalService.alert("No has seleccionado cliente"); |
47 | return; | 47 | return; |
48 | } | 48 | } |
49 | if (!validarDescarga()) { | 49 | if (validarDescarga()) { |
50 | focaModalService.alert("Cantidad de descarga ingresada erronea"); | ||
51 | return; | ||
52 | } | ||
53 | if (!$scope.nroRecibo) { | ||
54 | focaModalService.alert("No ingresaste nro de recibo"); | ||
55 | return; | 50 | return; |
56 | } | 51 | } |
57 | //#region OBJETO REMITO | 52 | //#region OBJETO REMITO |
58 | var remito = { | 53 | var remito = { |
59 | id: 0, | 54 | id: 0, |
60 | fechaRemito: new Date().toISOString().slice(0, 19).replace('T', ' '), | 55 | fechaRemito: new Date().toISOString().slice(0, 19).replace('T', ' '), |
61 | idCliente: $scope.remito.cliente.cod, | 56 | idCliente: $scope.remito.cliente.cod, |
62 | nombreCliente: $scope.remito.cliente.nom, | 57 | nombreCliente: $scope.remito.cliente.nom, |
63 | cuitCliente: $scope.remito.cliente.cuit, | 58 | cuitCliente: $scope.remito.cliente.cuit, |
64 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, | 59 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, |
65 | numeroNotaPedido: $scope.remito.numeroNotaPedido, | 60 | numeroNotaPedido: $scope.remito.numeroNotaPedido, |
66 | idVendedor: $scope.remito.cliente.ven, | 61 | idVendedor: $scope.remito.cliente.ven, |
67 | idProveedor: $scope.remito.proveedor.COD, | 62 | idProveedor: $scope.remito.proveedor.COD, |
68 | idDomicilio: 0, | 63 | idDomicilio: 0, |
69 | idCotizacion: $scope.remito.cotizacion.ID, | 64 | idCotizacion: $scope.remito.cotizacion.ID, |
70 | idListaPrecio: $scope.remito.cliente.mod, | 65 | idListaPrecio: $scope.remito.cliente.mod, |
71 | flete: $scope.remito.flete, | 66 | flete: $scope.remito.flete, |
72 | fob: $scope.remito.fob, | 67 | fob: $scope.remito.fob, |
73 | bomba: $scope.remito.bomba, | 68 | bomba: $scope.remito.bomba, |
74 | kilometros: $scope.remito.kilometros, | 69 | kilometros: $scope.remito.kilometros, |
75 | domicilioStamp: $scope.remito.cliente.DOM, | 70 | domicilioStamp: $scope.remito.cliente.DOM, |
76 | observaciones: $scope.remito.observaciones, | 71 | observaciones: $scope.remito.observaciones, |
77 | numeroRemito: parseInt($scope.comprobante), | 72 | numeroRemito: parseInt($scope.comprobante), |
78 | sucursal: parseInt($scope.puntoVenta), | 73 | sucursal: parseInt($scope.puntoVenta), |
79 | responsabilidadIvaCliente: $scope.remito.cliente.iva, | 74 | responsabilidadIvaCliente: $scope.remito.cliente.iva, |
80 | descuento: 0,//TODO, | 75 | descuento: 0,//TODO, |
81 | importeNeto: getImporte('netoUnitario'), | 76 | importeNeto: getImporte('netoUnitario'), |
82 | importeExento: getImporte('exentoUnitario'), | 77 | importeExento: getImporte('exentoUnitario'), |
83 | importeIva: getImporte('ivaUnitario'), | 78 | importeIva: getImporte('ivaUnitario'), |
84 | importeIvaServicios: 0,//TODO | 79 | importeIvaServicios: 0,//TODO |
85 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), | 80 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), |
86 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), | 81 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), |
87 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), | 82 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), |
88 | percepcion: 0,//TODO | 83 | percepcion: 0,//TODO |
89 | percepcionIva: 0,//TODO | 84 | percepcionIva: 0,//TODO |
90 | redondeo: 0,//TODO | 85 | redondeo: 0,//TODO |
91 | anulado: false, | 86 | anulado: false, |
92 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), | 87 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), |
93 | lugar: parseInt($scope.puntoVenta), | 88 | lugar: parseInt($scope.puntoVenta), |
94 | cuentaMadre: 0,//TODO | 89 | cuentaMadre: 0,//TODO |
95 | cuentaContable: 0,//TODO | 90 | cuentaContable: 0,//TODO |
96 | asiento: 0,//TODO | 91 | asiento: 0,//TODO |
97 | e_hd: '',//TODO | 92 | e_hd: '',//TODO |
98 | c_hd: '', | 93 | c_hd: '', |
99 | numeroLiquidoProducto: 0,//TODO | 94 | numeroLiquidoProducto: 0,//TODO |
100 | estado: 0, | 95 | estado: 0, |
101 | destinoVenta: 0,//TODO | 96 | destinoVenta: 0,//TODO |
102 | operacionTipo: 0, //TODO | 97 | operacionTipo: 0, //TODO |
103 | idHojaRuta: $scope.remito.idHojaRuta | 98 | idHojaRuta: $scope.remito.idHojaRuta |
104 | } | 99 | } |
105 | //#endregionc | 100 | //#endregion |
106 | focaModalDescargasService.crearRemito({ remito: remito, notaPedido: { id: 0 } }) | 101 | focaModalDescargasService.crearRemito({ remito: remito, notaPedido: { id: 0 } }) |
107 | .then(function (res) { | 102 | .then(function (res) { |
108 | console.log(res); | ||
109 | remitoId = res.data.id | 103 | remitoId = res.data.id |
110 | descargar(remitoId); | 104 | descargar(remitoId); |
111 | focaModalDescargasService. | 105 | focaModalDescargasService. |
112 | addArticulos($scope.remito.articulosRemito, $scope.articulos, remitoId, 1); | 106 | addArticulos($scope.remito.articulosRemito, $scope.articulos, remitoId, 1); |
113 | focaModalService.alert("Descarga realizada") | 107 | focaModalService.alert("Descarga realizada") |
114 | .then(function () { | 108 | .then(function () { |
115 | $uibModalInstance.dismiss(); | 109 | $uibModalInstance.dismiss(); |
116 | }) | 110 | }) |
117 | }) | 111 | }) |
118 | .catch(function (e) { console.log(e); }) | 112 | .catch(function (e) { console.log(e); }) |
119 | 113 | ||
120 | }; | 114 | }; |
121 | $scope.getTotal = function () { | 115 | $scope.getTotal = function () { |
122 | var total = 0; | 116 | var total = 0; |
123 | $scope.cisternas.forEach(function (cisterna) { | 117 | $scope.cisternas.forEach(function (cisterna) { |
124 | 118 | ||
125 | total += cisterna.cisternaCarga.articulo.PreVen * cisterna.cisternaCarga.descargar; | 119 | total += cisterna.cisternaCarga.articulo.PreVen * cisterna.cisternaCarga.descargar; |
126 | cisterna.cisternaCarga.articulo.cantidad = cisterna.cisternaCarga.descargar; | 120 | cisterna.cisternaCarga.articulo.cantidad = cisterna.cisternaCarga.descargar; |
127 | $scope.articulos.push(cisterna.cisternaCarga.articulo); | 121 | $scope.articulos.push(cisterna.cisternaCarga.articulo); |
128 | }); | 122 | }); |
129 | return parseFloat(total.toFixed(2)); | 123 | return parseFloat(total.toFixed(2)); |
130 | }; | 124 | }; |
131 | function descargar(idRemito) { | 125 | function descargar(idRemito) { |
132 | 126 | ||
133 | for (var i = 0; i < $scope.cisternas.length; i++) { | 127 | for (var i = 0; i < $scope.cisternas.length; i++) { |
134 | var descarga = $scope.cisternas[i].cisternaCarga.descargar; | 128 | var descarga = $scope.cisternas[i].cisternaCarga.descargar; |
135 | var hojaRutaMovimientos = []; | 129 | var hojaRutaMovimientos = []; |
136 | var cisternaMovimientos = []; | 130 | var cisternaMovimientos = []; |
137 | var cisternaCargas = []; | 131 | var cisternaCargas = []; |
138 | var cisternaCarga = $scope.cisternas[i].cisternaCarga; | 132 | var cisternaCarga = $scope.cisternas[i].cisternaCarga; |
139 | if (!descarga) continue; | 133 | if (!descarga) continue; |
140 | // if (descarga > cisternaCarga.cantidad) { | ||
141 | // focaModalService.alert('La cantidad a descargar no debe ser ' + | ||
142 | // 'mayor a la cantidad de la cisterna'); | ||
143 | // $scope.cargando = false; | ||
144 | // return; | ||
145 | // } | ||
146 | cisternaCarga.cantidad -= descarga; | 134 | cisternaCarga.cantidad -= descarga; |
147 | 135 | ||
148 | //Guardar | 136 | //Guardar |
149 | var now = new Date(); | 137 | var now = new Date(); |
150 | var cisternaMovimiento = { | 138 | var cisternaMovimiento = { |
151 | fecha: now.toISOString().slice(0, 19).replace('T', ' '), | 139 | fecha: now.toISOString().slice(0, 19).replace('T', ' '), |
152 | cantidad: descarga, | 140 | cantidad: descarga, |
153 | metodo: 'descarga', | 141 | metodo: 'descarga', |
154 | idCisternaCarga: cisternaCarga.id, | 142 | idCisternaCarga: cisternaCarga.id, |
155 | idRemito: idRemito | 143 | idRemito: idRemito |
156 | }; | 144 | }; |
157 | var hojaRutaMovimiento = { | 145 | var hojaRutaMovimiento = { |
158 | reciboDescarga: $scope.nroRecibo, | 146 | reciboDescarga: $scope.nroRecibo, |
159 | idRemito: idRemito | 147 | idRemito: idRemito |
160 | }; | 148 | }; |
161 | 149 | ||
162 | cisternaCarga = angular.copy($scope.cisternas[i].cisternaCarga); | 150 | cisternaCarga = angular.copy($scope.cisternas[i].cisternaCarga); |
163 | 151 | ||
164 | delete cisternaCarga.articulo; | 152 | delete cisternaCarga.articulo; |
165 | delete cisternaCarga.descargar; | 153 | delete cisternaCarga.descargar; |
166 | cisternaCargas.push(cisternaCarga); | 154 | cisternaCargas.push(cisternaCarga); |
167 | cisternaMovimientos.push(cisternaMovimiento); | 155 | cisternaMovimientos.push(cisternaMovimiento); |
168 | hojaRutaMovimientos.push(hojaRutaMovimiento); | 156 | hojaRutaMovimientos.push(hojaRutaMovimiento); |
169 | } | 157 | } |
170 | var save = { | 158 | var save = { |
171 | cisternaCargas: cisternaCargas, | 159 | cisternaCargas: cisternaCargas, |
172 | cisternaMovimientos: cisternaMovimientos, | 160 | cisternaMovimientos: cisternaMovimientos, |
173 | hojaRutaMovimientos: hojaRutaMovimientos, | 161 | hojaRutaMovimientos: hojaRutaMovimientos, |
174 | articulo: $scope.articuloSeleccionado | 162 | articulo: $scope.articuloSeleccionado |
175 | }; | 163 | }; |
176 | focaModalDetalleHojaRutaService | 164 | focaModalDetalleHojaRutaService |
177 | .postMovimientoHojaRuta(save) | 165 | .postMovimientoHojaRuta(save) |
178 | .then(guardarSeguimiento) | 166 | .then(guardarSeguimiento) |
179 | .catch(function () { }); | 167 | .catch(function () { }); |
180 | function guardarSeguimiento(res) { | 168 | function guardarSeguimiento(res) { |
181 | focaSeguimientoService | 169 | focaSeguimientoService |
182 | .guardarPosicion( | 170 | .guardarPosicion( |
183 | 'Entrega de producto', | 171 | 'Entrega de producto', |
184 | res.data[0].id, | 172 | res.data[0].id, |
185 | ''); | 173 | ''); |
186 | $scope.aDescargar = []; | 174 | $scope.aDescargar = []; |
187 | }; | 175 | }; |
188 | }; | 176 | }; |
189 | function getImporte(propiedad) { | 177 | function getImporte(propiedad) { |
190 | var importe = 0; | 178 | var importe = 0; |
191 | $scope.remito.articulosRemito.forEach(function (articulo) { | 179 | $scope.remito.articulosRemito.forEach(function (articulo) { |
192 | if (articulo[propiedad]) { | 180 | if (articulo[propiedad]) { |
193 | importe += articulo[propiedad] * articulo.cantidad; | 181 | importe += articulo[propiedad] * articulo.cantidad; |
194 | } | 182 | } |
195 | return; | 183 | return; |
196 | }); | 184 | }); |
197 | return importe; | 185 | return importe; |
198 | }; | 186 | }; |
199 | function validarDescarga() { | 187 | function validarDescarga() { |
200 | hasDisponible = $scope.cisternas.find(function (cisterna) { | 188 | for (var i = 0; i < $scope.cisternas.length; i++) { |
201 | return parseInt(cisterna.cisternaCarga.descargar) >= 0 && | 189 | if (parseInt($scope.cisternas[i].cisternaCarga.descargar) > |
202 | parseInt(cisterna.cisternaCarga.descargar) <= | 190 | $scope.cisternas[i].cisternaCarga.cantidad || |
203 | cisterna.cisternaCarga.cantidad | 191 | parseInt($scope.cisternas[i].cisternaCarga.descargar) < 0) { |
204 | }); | 192 | focaModalService.alert("Cantidad de descarga ingresada erronea"); |
205 | return hasDisponible; | 193 | return true; |
194 | } | ||
195 | } | ||
196 | return false; | ||
206 | }; | 197 | }; |
207 | $scope.seleccionarCliente = function () { | 198 | $scope.seleccionarCliente = function () { |
208 | |||
209 | var modalInstance = $uibModal.open( | 199 | var modalInstance = $uibModal.open( |
210 | { | 200 | { |
211 | ariaLabelledBy: 'Busqueda de Cliente', | 201 | ariaLabelledBy: 'Busqueda de Cliente', |
212 | templateUrl: 'foca-busqueda-cliente-modal.html', | 202 | templateUrl: 'foca-busqueda-cliente-modal.html', |
213 | controller: 'focaBusquedaClienteModalController', | 203 | controller: 'focaBusquedaClienteModalController', |
214 | resolve: { | 204 | resolve: { |
215 | vendedor: function () { return null; }, | 205 | vendedor: function () { return null; }, |
216 | cobrador: function () { return null; } | 206 | cobrador: function () { return null; } |
217 | }, | 207 | }, |
218 | size: 'lg' | 208 | size: 'lg' |
219 | } | 209 | } |
220 | ); | 210 | ); |
221 | modalInstance.result.then(function (cliente) { | 211 | modalInstance.result.then(function (cliente) { |
222 | $scope.remito.cliente = cliente; | 212 | $scope.remito.cliente = cliente; |
223 | }, function () { | 213 | }, function () { |
224 | //funcion ejecutada al cancelar modal | 214 | //funcion ejecutada al cancelar modal |
225 | }); | 215 | }); |
226 | }; | 216 | }; |
227 | $scope.cancelar = function () { | 217 | $scope.cancelar = function () { |
228 | $uibModalInstance.dismiss(); | 218 | $uibModalInstance.dismiss(); |
229 | } | 219 | } |
230 | 220 | ||
231 | 221 | ||
232 | function rellenar(relleno, longitud) { | 222 | function rellenar(relleno, longitud) { |
233 | relleno = '' + relleno; | 223 | relleno = '' + relleno; |
234 | while (relleno.length < longitud) { | 224 | while (relleno.length < longitud) { |
235 | relleno = '0' + relleno; | 225 | relleno = '0' + relleno; |
236 | } | 226 | } |
237 | return relleno; | 227 | return relleno; |
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 px-1"> | 5 | <div class="row px-1"> |
6 | <div class="col-3 align-self-center 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 | ng-model="remito.cliente.nom" | 16 | ng-model="remito.cliente.nom" |
17 | readonly | 17 | readonly |
18 | > | 18 | > |
19 | <div class="input-group-append"> | 19 | <div class="input-group-append"> |
20 | <button | 20 | <button |
21 | ladda="searchLoading" | 21 | ladda="searchLoading" |
22 | data-spinner-color="#FF0000" | 22 | data-spinner-color="#FF0000" |
23 | class="btn btn-outline-secondary" | 23 | class="btn btn-outline-secondary" |
24 | type="button" | 24 | type="button" |
25 | ng-click="seleccionarCliente()" | 25 | ng-click="seleccionarCliente()" |
26 | > | 26 | > |
27 | <i class="fa fa-search fa-x1" aria-hidden="true"></i> | 27 | <i class="fa fa-search fa-x1" aria-hidden="true"></i> |
28 | </button> | 28 | </button> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | </div> | 31 | </div> |
32 | <div class="col-3 align-self-center pl-1 mt-1"> | 32 | <div class="col-3 align-self-center pl-1 mt-1"> |
33 | <strong>Domicilio</strong> | 33 | <strong>Domicilio</strong> |
34 | </div> | 34 | </div> |
35 | <div class="col-9 align-self-center mt-1"> | 35 | <div class="col-9 align-self-center mt-1"> |
36 | <label ng-bind="remito.cliente.DOM"></label> | 36 | <label ng-bind="remito.cliente.DOM"></label> |
37 | </div> | 37 | </div> |
38 | <!-- <div class="col-3 pl-1"> | ||
39 | <strong>Punto descarga</strong> | ||
40 | </div> | ||
41 | <div class="col-9"> | ||
42 | <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> | ||
43 | </div> --> | ||
44 | <div class="col-3 align-self-center px-1 mt-1"> | 38 | <div class="col-3 align-self-center px-1 mt-1"> |
45 | <strong>Remito Nº</strong> | 39 | <strong>Remito Nº</strong> |
46 | </div> | 40 | </div> |
47 | <div class="col-9 mt-1"> | 41 | <div class="col-3 pr-0 mt-1"> |
48 | <input | 42 | <input |
49 | type="text" class="form-control form-control-sm" | 43 | type="text" class="text-center form-control form-control-sm" |
50 | ng-model="nroRemito" readonly> | 44 | ng-model="nroSucursal" readonly> |
51 | </div> | 45 | </div> |
52 | <div class="col-12 mt-3"> | 46 | <div class="col-6 mt-1"> |
47 | <input | ||
48 | type="number" class="text-center form-control form-control-sm" | ||
49 | ng-model="remito.numeroRemito"> | ||
50 | </div> | ||
51 | <div class="col-12 mt-3 p-0"> | ||
53 | <table class="table"> | 52 | <table class="table"> |
54 | <thead> | 53 | <thead> |
55 | <tr> | 54 | <tr> |
56 | <th>Cisterna</th> | 55 | <th>Cisterna</th> |
57 | <th>Articulo</th> | 56 | <th>Articulo/Disponibles</th> |
58 | <th>Disponibles</th> | ||
59 | <th>Descargar</th> | 57 | <th>Descargar</th> |
60 | </tr> | 58 | </tr> |
61 | </thead> | 59 | </thead> |
62 | <tbody> | 60 | <tbody> |
63 | <tr ng-repeat="cisterna in cisternas"> | 61 | <tr ng-repeat="cisterna in cisternas"> |
64 | <td ng-bind="cisterna.codigo"></td> | 62 | <td class="text-center" ng-bind="cisterna.codigo"></td> |
65 | <td ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td> | 63 | <td class="text-center"> |
66 | <td ng-bind="cisterna.cisternaCarga.cantidad"></td> | 64 | {{cisterna.cisternaCarga.articulo.DetArt}}<br> |
65 | {{cisterna.cisternaCarga.cantidad}} | ||
66 | </td> | ||
67 | <td> | 67 | <td> |
68 | <input | 68 | <input |
69 | ng-init="cisterna.cisternaCarga.descargar = cisterna.cisternaCarga.cantidad" | 69 | ng-init="cisterna.cisternaCarga.descargar = |
70 | cisterna.cisternaCarga.cantidad" | ||
70 | ng-model="cisterna.cisternaCarga.descargar" | 71 | ng-model="cisterna.cisternaCarga.descargar" |
71 | type="text" class="form-control col-12"> | 72 | type="number" class="text-center form-control col-12"> |
72 | </td> | 73 | </td> |
73 | </tr> | 74 | </tr> |
74 | </tbody> | 75 | </tbody> |
75 | </table> | 76 | </table> |
76 | </div> | 77 | </div> |
77 | <div class="col-3 align-self-center px-1"> | 78 | <div class="col-3 align-self-center px-1"> |
78 | <strong>Nº Recibo</strong> | 79 | <strong>Nº Recibo</strong> |
79 | </div> | 80 | </div> |
80 | <div class="col-9"> | 81 | <div class="col-9"> |
81 | <input ng-model="nroRecibo" class="form-control" type="text" placeholder="Nº de recibo"> | 82 | <input |
83 | ng-model="nroRecibo" class="form-control" | ||
84 | type="number" placeholder="Nº de recibo"> | ||
82 | </div> | 85 | </div> |
83 | </div> | 86 | </div> |
84 | </div> | 87 | </div> |
85 | <div class="modal-footer"> | 88 | <div class="modal-footer"> |
86 | <button | 89 | <button |
87 | class="btn btn-sm btn-secondary" | 90 | class="btn btn-sm btn-secondary" |
88 | ladda="cargando" | 91 | ladda="cargando" |
89 | type="button" | 92 | type="button" |
90 | ng-click="cancelar()">Cancelar</button> | 93 | ng-click="cancelar()">Cancelar</button> |
91 | <button | 94 | <button |
92 | class="btn btn-sm btn-primary" | 95 | class="btn btn-sm btn-primary" |