$operation['message'] = "Se registro correctamente la información."; } } elseif (!$operation['ejecution']) { $log = Log::registro($usuario->getID(), "error", "Registro la información. Tercero Persona. {" . $get->tipo . ", " . $get->regimen . ", " . $get->estado . ", " . $get->nombre . ", " . $get->apellido . ", " . $get->tipo_documento . ", " . $get->numero_documento . ", " . $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."; } } else { if ($get->nit != "" && $get->razon_social != "" && $get->pais != "" && $get->departamento != "" && $get->ciudad != "" && $get->direccion != "" && $get->telefono != "") { $conexion = new Conexion(); $operation = Empresa::registrar($get->nit, $get->razon_social, $get->naturaleza, $get->fecha, $get->ciudad, $get->direccion, $get->telefono, $conexion); if ($operation['ejecution'] && $operation['result']) { $operation = Tercero::registrar($operation['returning']['id'], $get->tipo, $get->regimen, $get->estado, $conexion); if ($operation['result']) { $operation['message'] = "Se registro correctamente la información."; $log = Log::registro($usuario->getID(), "info", "Registro de información. - Tercero Empresa. {" . $get->tipo . ", " . $get->regimen . ", " . $get->estado . ", " . $get->nit . ", " . $get->razon_social . ", " . $get->naturaleza . " , " . $get->fecha . ", " . $get->ciudad . ", " . $get->direccion . ", " . $get->telefono . "}", $conexion); $tercero = new Tercero(); $tercero->instanciarSubID($get->nit, $get->tipo, $conexion); $_SESSION['tercero'] = serialize($tercero); } } elseif (!$operation['ejecution']) { $log = Log::registro($usuario->getID(), "error", "Registro la información. Tercero Empresa. {" . $get->nit . ", " . $get->razon_social . ", " . $get->naturaleza . " , " . $get->fechaconst . ", " . $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."; }