Merge branch 'main' of https://github.com/AduanaSoft/IMPORTADORES
This commit is contained in:
@@ -233,7 +233,7 @@
|
||||
|
||||
<!-- Activo -->
|
||||
<div class="form-check mb-4">
|
||||
<input id="status" name="status" type="checkbox" class="hide form-check-input" <?= $factura['status']==1?'checked':'' ?>>
|
||||
<input id="status" value=1 name="status" type="checkbox" class="hide form-check-input" <?= $factura['status']==1?'checked':'' ?>>
|
||||
<label for="status" class="hide form-check-label">Activo</label>
|
||||
</div>
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
// ✅ 2. FUNCIÓN PARA CARGAR PROVEEDORES (CON PROMESA)
|
||||
function cargarProveedores() {
|
||||
const proveedorEl = document.getElementById('proveedor_id');
|
||||
// Obtenemos la cadena con la ID del proveedor guardado
|
||||
const proveedorActual = '<?= htmlspecialchars($proveedor_clave_actual ?? '') ?>';
|
||||
|
||||
return fetch('/IMPORTADORES/solicitud_importacion/ajax_proveedores')
|
||||
@@ -287,8 +288,8 @@
|
||||
opt.value = item.id;
|
||||
opt.textContent = item.text;
|
||||
|
||||
// ✅ Pre-seleccionar si coincide con el proveedor actual
|
||||
if (item.id === proveedorActual && proveedorActual !== '') {
|
||||
// Comparar forzando a cadena para que coincida con proveedorActual
|
||||
if (String(item.id) === proveedorActual && proveedorActual !== '') {
|
||||
opt.selected = true;
|
||||
}
|
||||
|
||||
@@ -395,4 +396,4 @@
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user