public function LeerSaldocaifInversion() { global $db; $cuentasinceros=uf_spg_cuenta_sin_cero($this->sig_cuenta); if($cuentasinceros=="") { $cuentasinceros=$this->sig_cuenta; } $ovariacion = new AsientoVariacionDao(); $ovariacion->sig_cuenta=$cuentasinceros; $totalvariacion=$ovariacion->LeerSaldoVariacion(); $sql="select (select denominacion from sigesp_plan_unico_re where sig_cuenta='{$this->sig_cuenta}') as denominaciongas, (select codcaif from sigesp_plan_unico_re where sig_cuenta='{$this->sig_cuenta}') as codcaifgas, COALESCE(sum((spe_int_cuentas.enero+spe_int_cuentas.febrero+spe_int_cuentas.marzo+spe_int_cuentas.abril+spe_int_cuentas.mayo+spe_int_cuentas.junio+spe_int_cuentas.julio+spe_int_cuentas.agosto+spe_int_cuentas.septiembre+spe_int_cuentas.octubre+spe_int_cuentas.noviembre+spe_int_cuentas.diciembre)),000) as montoglobalgas from {$this->_table} inner join sigesp_plan_unico_re on {$this->_table}.sig_cuenta=sigesp_plan_unico_re.sig_cuenta where codemp='{$this->codemp}' and ano_presupuesto='{$this->ano_presupuesto}' and spe_int_cuentas.sig_cuenta like '{$cuentasinceros}%'"; $rs =$db->Execute($sql); if($rs==true) { return $rs; } else { return false; } }