if ($get->subcuenta != "" && $get->id != "" && $get->nombre != "" && $get->descripcion != "" && $get->ajuste != "" && $get->reqta != "" && $get->estado != "") { $get->subcuenta = strtoupper(base64_decode($get->subcuenta)); $get->id = strtoupper(base64_decode($get->id)); $get->nombre = strtoupper(base64_decode($get->nombre)); $get->descripcion = base64_decode($get->descripcion); $get->ajuste = base64_decode($get->ajuste); $get->reqta = base64_decode($get->reqta); $get->estado = base64_decode($get->estado); $gbd = new Conexion(); $operation = $cuenta_auxiliar->actualizar($get->nombre, $get->descripcion, $get->ajuste, $get->reqta, $get->estado, $get->subcuenta, $get->id, $gbd); if ($operation['ejecution'] && $operation['result']) { $operation['message'] = "Se modifico correctamente la información."; $log = Log::registro($usuario->getID(), "info", "Modificación de información. - Cuenta Auxiliar. {" . $get->nombre . ", " . $get->descripcion . ", " . $get->ajuste . ", " . $get->reqta . ", " . $get->estado . ", " . $get->subcuenta . ", " . $get->id . "}", $gbd); $cuenta_auxiliar = new PUCCuentaAuxiliar($get->id, $gbd); $cuenta_auxiliar->cargarSubcuenta($gbd); $subcuenta = $cuenta_auxiliar->getSubcuenta(); $subcuenta->cargarCuenta($gbd); $cuenta = $subcuenta->getCuenta(); $cuenta->cargarGrupo($gbd); $grupo = $cuenta->getGrupo(); $grupo->cargarClase($gbd); $_SESSION['cuenta_auxiliar'] = serialize($cuenta_auxiliar); } elseif (!$operation['ejecution']) { $log = Log::registro($usuario->getID(), "error", "Modificación de información. - Cuenta Auxiliar. {" . $get->nombre . ", " . $get->descripcion . ", " . $get->ajuste . ", " . $get->reqta . ", " . $get->estado . ", " . $get->subcuenta . ", " . $get->id . "} - {" . $operation['error'] . "}", $gbd); } } else { $operation['ejecution'] = true; $operation['result'] = false; $operation['message'] = "Por favor diligencie los todos los campos del formulario."; } echo json_encode($operation);