Exemplo n.º 1
0
 public function actionLevel3($year, $fdm1_id, $fdm2_id)
 {
     //dates
     $months = FdpeDimPeriod::getYearMonths($year);
     //main positions
     $positions = Fdm3Dimension3::getPositions($year, $fdm2_id);
     //body
     $data = FddpDimDataPeriod::getDataLevelDim3($year, $fdm2_id);
     //table
     $table = FddpDimDataPeriod::createTable($months, $positions, $data);
     //totals
     $totals = FddpDimDataPeriod::calcTotoals($table);
     $this->render('level3', array('year' => $year, 'fdm1_id' => $fdm1_id, 'fdm2_id' => $fdm2_id, 'months' => $months, 'positions' => $positions, 'table' => $table, 'rows_totals' => $totals['row'], 'columns_totals' => $totals['column'], 'total' => $totals['total']));
 }
Exemplo n.º 2
0
 public function beforeDelete()
 {
     //delete related recrd from FddpDimDataPeriod
     $criteria = new CDbCriteria();
     $criteria->compare('fddp_fdda_id', $this->fdda_id);
     foreach (FddpDimDataPeriod::model()->findAll($criteria) as $fddp) {
         $fddp->delete();
     }
     return parent::beforeDelete();
 }