Commit d55dfb3f3b04cfa7822fda98da1992fdd2e1796b

Authored by Marcelo Puebla
1 parent 5b9d7a11ac
Exists in master

fix idLista precio, numero remito sucursal remito

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