Beispiel #1
0
                 $operation['result'] = false;
                 $operation['message'] = "Por favor diligencie los todos los campos del formulario.";
             }
         } else {
             $empresa = $tercero->getEmpresa();
             if ($get->nit != "" && $get->razon_social != "" && $get->pais != "" && $get->departamento != "" && $get->ciudad != "" && $get->direccion != "" && $get->telefono != "") {
                 $conexion = new Conexion();
                 $operation = $empresa->modificar($get->nit, $get->razon_social, $get->naturaleza, $get->fecha, $get->ciudad, $get->direccion, $get->telefono, $conexion);
                 if ($operation['ejecution'] && $operation['result']) {
                     $operation = $tercero->modificar($tercero->getTipo(), $get->regimen, $get->estado, $conexion);
                     $operation['message'] = "Se actualizó correctamente la información.";
                     $log = Log::registro($usuario->getID(), "info", "Actualización de información. - Tercero Empresa. {" . $tercero->getTipo() . ", " . $get->regimen . ", " . $get->estado . ", " . $get->nit . ", " . $get->razon_social . ", " . $get->naturaleza . " , " . $get->fecha . ", " . $get->ciudad . ", " . $get->direccion . ", " . $get->telefono . "}", $conexion);
                     $id = $tercero->getID();
                     $tipo = $tercero->getTipo();
                     $tercero = new Tercero();
                     $tercero->instanciarID($id, $conexion);
                     $_SESSION['tercero'] = serialize($tercero);
                 } elseif (!$operation['ejecution']) {
                     $log = Log::registro($usuario->getID(), "error", "Actualización la información. Tercero Empresa. {" . $tercero->getTipo() . ", " . $get->regimen . ", " . $get->estado . ", " . $get->nit . ", " . $get->razon_social . ", " . $get->naturaleza . " , " . $get->fecha . ", " . $get->ciudad . ", " . $get->direccion . ", " . $get->telefono . "} - {" . $operation['error'] . "}", $conexion);
                 }
             } else {
                 $operation['ejecution'] = true;
                 $operation['result'] = false;
                 $operation['message'] = "Por favor diligencie los todos los campos del formulario.";
             }
         }
         echo json_encode($operation);
     }
 }
 if ($get->buscar) {
     $conexion = new Conexion();