public function UpdateLiquidacion(Gyuser_Model_Cheques $Cheques) { if ($Cheques->getProvider_id()) { $data = array('liquidacion_id' => $Cheques->getLiquidacion_id(), 'provider_id' => $Cheques->getProvider_id(), 'status' => 4); } elseif ($Cheques->getCave_id()) { //usable for older sections $data = array('liquidacion_id' => $Cheques->getLiquidacion_id(), 'credit_provider_id' => $Cheques->getCave_id(), 'status' => 4); } if ($Cheques->getAcreditacion_hrs()) { $data['acreditacion_hrs'] = $Cheques->getAcreditacion_hrs(); } $id = $this->getDbTable()->update($data, array('id = ?' => $Cheques->getId())); return $id; }