コード例 #1
0
ファイル: BaseAcademicCost.php プロジェクト: taryono/school
 public function getBankAccount($con = null)
 {
     include_once 'lib/model/om/BaseBankAccountPeer.php';
     if ($this->aBankAccount === null && $this->bank_account_id !== null) {
         $this->aBankAccount = BankAccountPeer::retrieveByPK($this->bank_account_id, $con);
     }
     return $this->aBankAccount;
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeGetAcademicCalendars()
 {
     $budget_id = $this->getRequestParameter('budget');
     $budget = BankAccountPeer::retrieveByPK($budget_id);
     $this->forward404Unless($budget);
     $c = new Criteria();
     $c->addJoin(AcademicCalenderPeer::ID, ExpenditureJournalPeer::ACADEMIC_CALENDAR_ID);
     $c->addJoin(AcademicCalendarPeer::CURRICULUM_ID, CurriculumPeer::ID);
     $c->addJoin(CurriculumPeer::DEPARTMENT_ID, BankAccountPeer::DEPARTMENT_ID);
     $c->add(BankAccountPeer::ID, $bank_account->getId());
     if ($bank_account->getDepartmentId()) {
         $c->add(CurriculumPeer::DEPARTMENT_ID, $bank_account->getDepartment()->getParentRecurs(), Criteria::IN);
     }
     $objs = AcademicCalendarPeer::doSelect($c);
     $ac_calendars = array();
     foreach ($objs as $o) {
         $ac_calendars[$o->getId()] = $o->toString();
     }
     $this->content = $ac_calendars;
     $this->forward404Unless($ac_calendars);
     $this->setTemplate('buildOptions');
 }