Ejemplo n.º 1
0
 public function actionIndex()
 {
     //'SELECT * FROM po_type WHERE active = 1 ORDER BY po_type'
     $po_types = po_type::findAll(['active' => '1']);
     $departments = department::findAll(['active' => '1']);
     $buildings = building::findAll(['active' => '1']);
     $rooms = room::findAll(['active' => '1']);
     $sets = sets::findAll(['room_id' => '11']);
     $consignments = consignment::find()->All();
     //print_r($po_types);
     return $this->render('find', ['consignments' => $consignments, 'po_types' => $po_types, 'departments' => $departments, 'buildings' => $buildings, 'rooms' => $rooms, 'sets' => $sets]);
 }
Ejemplo n.º 2
0
 public function actionGetSets($room)
 {
     $sets = sets::findAll(['room_id' => $room]);
     foreach ($sets as $set) {
         echo '<option value = ' . $set->id . '>' . $set->name . '</option>';
     }
 }