Example #1
0
 public static function doSelectByDepartmentFromTestAppl()
 {
     $ta_id = sfContext::getInstance()->getRequest()->getParameter('test_applicant_id');
     $ta = TestApplicantPeer::retrieveByPK($ta_id);
     if ($ta == null) {
         return array();
     }
     $subject_transfers = $ta->getSubjectTransfers();
     $subject_ids = array();
     foreach ($subject_transfers as $st) {
         $subject_ids[] = $st->getSubjectId();
     }
     $dept1 = array();
     $dept2 = array();
     if ($ta->getDepartmentRelatedByDepartment1()) {
         $dept1 = $ta->getDepartmentRelatedByDepartment1()->getIdRecurs();
         $dept1 = explode(",", $dept1);
     }
     if ($ta->getDepartmentRelatedByDepartment2()) {
         $dept2 = $ta->getDepartmentRelatedByDepartment2()->getIdRecurs();
         $dept2 = explode(",", $dept2);
     }
     $depts = array_merge($dept1, array_diff($dept2, $dept1));
     $c = new Criteria();
     $c->add(SubjectPeer::DEPARTMENT_ID, $depts, Criteria::IN);
     $c->add(SubjectPeer::ID, $subject_ids, Criteria::NOT_IN);
     return SubjectPeer::doSelect($c);
 }
Example #2
0
 public static function doSelectByClassGroup2()
 {
     $ta_id = sfContext::getInstance()->getRequest()->getParameter('id');
     $ta = TestApplicantPeer::retrieveByPK($ta_id);
     if ($ta == null) {
         return array();
     }
     if ($ta->getClassGroup2() != null) {
         $dept_id = ClassGroupPeer::retrieveByPK($ta->getClassGroup2())->getDepartmentId();
         $c = new Criteria();
         $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
         $c->addJoin(AcademicCalendarPeer::ID, RegPeriodPeer::ACADEMIC_CALENDAR_ID);
         $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept_id);
         $objs = RegTestPeriodPeer::doSelect($c);
         return $objs;
     }
 }
Example #3
0
 public function getTestApplicant($con = null)
 {
     include_once 'lib/model/om/BaseTestApplicantPeer.php';
     if ($this->aTestApplicant === null && $this->test_applicant_id !== null) {
         $this->aTestApplicant = TestApplicantPeer::retrieveByPK($this->test_applicant_id, $con);
     }
     return $this->aTestApplicant;
 }
Example #4
0
"
<?php 
$i = 0;
foreach ($pager->getResults() as $payment_history) {
    ++$i;
    ?>
"<?php 
    echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
    ?>
",<?php 
    if (!$byStudent) {
        ?>
"<?php 
        $payer = null;
        if ($payment_history->getPaymentJournal()->getPayerType() == PaymentJournal::PAYER_TYPE_APPLICANT) {
            $payer = TestApplicantPeer::retrieveByPK($payment_history->getPaymentJournal()->getPayer());
        } elseif ($payment_history->getPaymentJournal()->getPayerType() == PaymentJournal::PAYER_TYPE_STUDENT) {
            $payer = StudentPeer::retrieveByPK($payment_history->getPaymentJournal()->getPayer());
        }
        echo strlen($payment_history->getPaymentJournal()->getPayer() && $payer != null) > 0 ? $payer->tostring() : 'n/a';
        ?>
",<?php 
    }
    ?>
"<?php 
    echo $payment_history->getPaymentJournal()->getAcademicCost() ? $payment_history->getPaymentJournal()->getAcademicCost()->getAcademicCostComponent() ? $payment_history->getPaymentJournal()->getAcademicCost()->getAcademicCostComponent()->toString() : '-' : '-';
    ?>
","<?php 
    echo $payment_history->getPaymentJournal()->getAcademicProcess() ? $payment_history->getPaymentJournal()->getAcademicProcess()->toString() : '-';
    ?>
","<?php 
Example #5
0
            ?>
									<?php 
            if ($can_remove) {
                echo link_to_remote(__('delete'), array('url' => ' payment_journal_s/delete?id=' . $payment_journal->getId() . '&student_id=' . $student->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
            }
            ?>
								</p>
							</td>
						<?php 
        } else {
            ?>
							<td class='first'>
								<?php 
            $payer = null;
            if ($payment_journal->getPayerType() == PaymentJournal::PAYER_TYPE_APPLICANT) {
                $payer = TestApplicantPeer::retrieveByPK($payment_journal->getPayer());
            } elseif ($payment_journal->getPayerType() == PaymentJournal::PAYER_TYPE_STUDENT) {
                $payer = StudentPeer::retrieveByPK($payment_journal->getPayer());
            }
            ?>
								<?php 
            echo link_to_function(strlen($payment_journal->getPayer() && $payer != null) > 0 ? $payer->tostring() : 'n/a', visual_effect('toggle_appear', 'row_' . $payment_journal->getId(), array('onclick' => 'this.blur()')));
            ?>
								<p id="row_<?php 
            echo $payment_journal->getId();
            ?>
" style="display:none;">.
									<?php 
            echo link_to_remote(__('detail'), array('url' => ' payment_journal_s/show?id=' . $payment_journal->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
            ?>
									<?php 
Example #6
0
<style>
	th {
		font-style: italic;
		background-color: #DAF383;
		border: 1px solid black;
	}
</style>
<br>&nbsp;
<?php 
echo include_partial('global/listAsPDF', array('no_header' => true, 'title' => 'TANDA BUKTI PEMBAYARAN', 'subtitle' => 'No. ' . str_pad($journal->getId(), 4, '0', STR_PAD_LEFT) . '/KEU-GDS/' . date('m/y')));
use_helper('Number', 'myHelper');
$ta = TestApplicantPeer::retrieveByPK($journal->getPayer());
?>
<br>&nbsp;
<br>&nbsp;
<table align="center" style="border-collapse:collapse;margin-left: 40px;widht:100%;">
	<tr><td colspan="3"nowrap>Telah terima pembayaran dari<br><br></td></tr>
	<tr><td>Nama Calon Siswa</td><td>&nbsp;</td><td>: <?php 
echo $ta->getName();
?>
</td></tr>
	<tr><td>No. Pendaftaran</td><td>&nbsp;</td><td>: <?php 
echo $ta->getCode();
?>
</td></tr>
	<tr><td>Komponen Biaya</td><td>&nbsp;</td><td>: <?php 
echo $journal->getAcademicCost() && $journal->getAcademicCost()->getAcademicCostComponent() ? $journal->getAcademicCost()->getAcademicCostComponent()->toString() : '-';
?>
</td></tr>
	<tr><td>Jumlah Pembayaran</td><td>&nbsp;</td><td>: Rp. <?php 
echo format_number($journal->getAmount());
Example #7
0
 public function executeSaveResult()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     $test_applicant_id = $this->getRequestParameter('test_applicant_id');
     $test_schedule_id = $this->getRequestParameter('test_schedule_id');
     $dept_id = $this->getRequestParameter('department_id');
     $c = new Criteria();
     $c->add(TestApplSchedPeer::TEST_APPLICANT_ID, $this->getRequestParameter('test_applicant_id'));
     $c->add(TestApplSchedPeer::TEST_SCHEDULE_ID, $this->getRequestParameter('test_schedule_id'));
     $test_appl_sched = TestApplSchedPeer::doSelectOne($c);
     $test_appl_sched->setTestApplicantId($this->getRequestParameter('test_applicant_id'));
     $test_appl_sched->setTestScheduleId($this->getRequestParameter('test_schedule_id'));
     $test_appl_sched->setRank('rank');
     $test_appl_sched->setDescription('description');
     $test_appl_sched->save();
     $test_applicant = TestApplicantPeer::retrieveByPK($this->getRequestParameter('test_applicant_id'));
     $test_applicant->setStatus('status');
     $test_applicant->save();
     return $this->redirect('test_schedule/listApplicant?id=' . $test_schedule_id . '&dept_id=' . $dept_id);
 }
Example #8
0
 public function executeRegistrationCard()
 {
     $id = $this->getRequestParameter('id');
     $this->forward404Unless($id);
     $ta = TestApplicantPeer::retrieveByPK($id);
     $this->forward404Unless($ta);
     $this->filename = $this->getActionName() . '_' . $ta->getCode();
     $cw = new Criteria();
     $cw->add(DepartmentDetailPeer::DEPARTMENT_ID, $ta->getDepartment1());
     $this->department_detail = DepartmentDetailPeer::doSelectOne($cw);
     $c = new Criteria();
     $c->add(TestApplSchedPeer::TEST_APPLICANT_ID, $ta->getId());
     $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $ta->getDepartment1());
     $c->addJoin(AcademicCalendarPeer::ID, RegPeriodPeer::ACADEMIC_CALENDAR_ID);
     $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
     $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
     $c->addJoin(TestSchedulePeer::ID, TestApplSchedPeer::TEST_SCHEDULE_ID);
     $appl_sched1 = TestApplSchedPeer::doSelectJoinTestSchedule($c);
     $this->ta = $ta;
     $this->ta_detail = $ta->getTestApplicantDetail();
     $this->sched1 = $appl_sched1;
     $this->setLayout(false);
     $this->orientation = 'landscape';
     #$this->papersize = 'letter';
     $this->papersize = 'gdscform';
     $this->setViewClass('sfDomPDF');
 }
Example #9
0
 public function executeGraduateReceipt()
 {
     $ta_id = $this->getRequestParameter('id');
     $ta = TestApplicantPeer::retrieveByPK($ta_id);
     $this->forward404Unless($ta);
     $this->ta = $ta;
     $this->ta_detail = $ta->getTestApplicantDetail();
     $ta_detail = $ta->getTestApplicantDetail();
     $this->ta_detail = $ta_detail;
     $cw = new Criteria();
     $cw->add(DepartmentDetailPeer::DEPARTMENT_ID, $ta->getDepartment1());
     $this->department_detail = DepartmentDetailPeer::doSelectOne($cw);
     $cm = new Criteria();
     $cm->add(TestApplicantParentsPeer::TEST_APPLICANT_ID, $ta->getId());
     $cm->add(TestApplicantParentsPeer::RELATION, StudentParents::RELATION_FATHER);
     $father = TestApplicantParentsPeer::doSelectOne($cm);
     if ($father == null) {
         $father = new TestApplicantParents();
     }
     $cl = new Criteria();
     $cl->add(TestApplicantParentsPeer::TEST_APPLICANT_ID, $ta->getId());
     $cl->add(TestApplicantParentsPeer::RELATION, StudentParents::RELATION_MOTHER);
     $mother = TestApplicantParentsPeer::doSelectOne($cl);
     if ($mother == null) {
         $mother = new TestApplicantParents();
     }
     $c = new Criteria();
     $c->add(TestApplSchedPeer::TEST_APPLICANT_ID, $ta->getId());
     $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $ta->getDepartment1());
     $c->addJoin(AcademicCalendarPeer::ID, RegPeriodPeer::ACADEMIC_CALENDAR_ID);
     $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
     $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
     $c->addJoin(TestSchedulePeer::ID, TestApplSchedPeer::TEST_SCHEDULE_ID);
     $appl_sched1 = TestApplSchedPeer::doSelectJoinTestSchedule($c);
     $this->setTemplate('graduateReceipt');
     $this->papersize = 'a4';
     $this->father = $father;
     $this->mother = $mother;
     $this->sched1 = $appl_sched1;
     $this->orientation = 'portrait';
     $this->setLayout(false);
     $this->setViewClass('sfDomPDF');
 }
Example #10
0
            echo link_to_remote(_('Tentukan Periode Test'), array('url' => 'auth/test?id=' . $applicant_id, 'update' => 'content', 'script' => 'true'));
        } else {
            echo link_to_remote(_('Informasi Detail Pendaftar'), array('url' => 'auth/test?id=' . $applicant_id, 'update' => 'content', 'script' => 'true'));
        }
        ?>
        </li>
</ul>
</td></tr>
</table>
<br />
<?php 
    } elseif ($title == 'periode') {
        $c = new Criteria();
        $c->add(TestApplicantPhotoPeer::TEST_APPLICANT_ID, $applicant_id);
        $applicant_photo = TestApplicantPhotoPeer::doSelectOne($c);
        $applicant = TestApplicantPeer::retrieveByPK($applicant_id);
        ?>
<table width="500px" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<ul id="breadcrumb">
        <li><?php 
        echo link_to(image_tag('home.png', array('title' => __('Home'))), '/auth', 'style=padding-top: 7px;');
        ?>
</li>
        <li><?php 
        echo link_to_remote(_('Biodata Pendaftar'), array('url' => 'auth/detail?id=' . $applicant_id, 'update' => 'content', 'script' => 'true'));
        ?>
</li>
        <li>
        <?php 
        if ($applicant_photo == null) {
Example #11
0
 public function executeGetLetter()
 {
     $test_applicant = TestApplicantPeer::retrieveByPK($this->getRequestParameter('test_applicant_id'));
     $this->forward404Unless($test_applicant);
     $this->test_applicant = $test_applicant;
     $this->subject_transfers = $test_applicant->getSubjectTransfers();
     $this->setViewClass('sfDomPDF');
 }
Example #12
0
?>
<table class="form">
<tr><td class="form">
	<table class="form_content" width="100%">
	<tbody>
    	<tr>
           <td class='first' width="20%" style="vertical-align:middle;"><label><?php 
echo __('Test applicant');
?>
</label></td>
           <td class="first" width="2%" style="text-align:center; vertical-align:middle;">:</td>
		   <td class="first" style="vertical-align:middle;">
           <?php 
echo object_input_hidden_tag($payment_journal_ta, 'getPayer');
if (isset($payment_journal_ta) && $payment_journal_ta->getId()) {
    echo input_auto_complete_tag('payer_name', $payment_journal_ta->getPayer() ? TestApplicantPeer::retrieveByPK($payment_journal_ta->getPayer())->toString() : '', '/test_applicant/getList', array('size' => 70), array('after_update_element' => 'function(f, s) {$("payer").updateFromInformalAutocomplete(f, s);}', 'min_chars' => 1));
} else {
    echo input_auto_complete_tag('payer_name', null, '/test_applicant/getList', array('size' => 70), array('after_update_element' => 'function(f, s) {$("payer").updateFromInformalAutocomplete(f, s);}', 'min_chars' => 1));
}
?>
		   </td>
        </tr>
        <tr>
           <td style="vertical-align:middle;"><label><?php 
echo __('Academic cost');
?>
</label></td>
           <td width="2%" style="text-align:center; vertical-align:middle;">:</td>
		   <td style="vertical-align:middle;">
           <?php 
echo select_tag('academic_cost_id', options_for_select($academic_costs, $payment_journal_ta->getAcademicCostId() ? $payment_journal_ta->getAcademicCostId() : '', array('related_class' => 'AcademicCost', 'include_blank' => true)));
Example #13
0
 public static function doSelectByRegTestPeriod1()
 {
     $ta_id = sfContext::getInstance()->getRequest()->getParameter('id');
     $ta = TestApplicantPeer::retrieveByPK($ta_id);
     if ($ta == null) {
         return array();
     }
     $accal_id = RegTestPeriodPeer::retrieveByPK($ta->getRegTestPeriod1())->getRegPeriodId()->getAcademicCalendarId();
     $c = new Criteria();
     $c->add(LocationPeer::ACADEMIC_CALENDAR_ID, $accal_id);
     $objs = LocationPeer::doSelect($c);
     return $objs;
 }