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