Exemplo n.º 1
0
foreach ($months as $month) {
    ?>
						   <tr class="list<?php 
    ++$i;
    if ($i % 2 == 0) {
        echo ' even';
    }
    ?>
">
							<?php 
    $c = new Criteria();
    $c->add(PaymentJournalPeer::PAYER_TYPE, PaymentJournal::PAYER_TYPE_STUDENT);
    $c->add(PaymentJournalPeer::PAYER, $student->getId());
    $c->add(PaymentJournalPeer::ACADEMIC_COST_ID, $ac_cost->getId());
    $c->add(PaymentJournalPeer::MONTH, $month->getId());
    $payment = PaymentJournalPeer::doSelectOne($c);
    ?>
                            <td nowrap="nowrap" style="vertical-align:middle; text-align: center;">
								<?php 
    if ($payment) {
        echo link_to_remote(image_tag('delete.gif', 'title=Pembayaran Batal'), array('url' => 'student_payment/deleteSpp?id=' . $payment->getId() . '&student_id=' . $student->getId(), 'confirm' => __('Anda Yakin Akan Membatalkan Pembayaran SPP Bulan&nbsp;') . $month->getName() . '&nbsp;?', 'update' => 'content', 'script' => 'true'));
    } else {
        echo checkbox_tag('months', $month->getId(), false, array('id' => 'months'));
    }
    ?>
                            </td>
							<td style="vertical-align:middle;"><?php 
    echo $month->getName() ? $month->getName() : 'n/a';
    ?>
</td>
						   	<td style="text-align:right; vertical-align:middle;"><?php 
Exemplo n.º 2
0
 public function executePrintElseForm()
 {
     $tanggal1 = $this->getRequestParameter('tanggal');
     $tgl_code = $this->getRequestParameter('tgl_code');
     $payment_model = $this->getRequestParameter('payment_model');
     $comments = $this->getRequestParameter('comments');
     $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
     $this->forward404Unless($student);
     $cr = new Criteria();
     $cr->add(StudentTypePeer::STUDENT_ID, $student->getId());
     $stu_type = StudentTypePeer::doSelectOne($cr);
     $cr = new Criteria();
     $cr->add(StudentTypePeer::STUDENT_ID, $student->getId());
     $stu_type = StudentTypePeer::doSelectOne($cr);
     $c = new Criteria();
     $cton1 = $c->getNewCriterion(VAcaCostElsePeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendar()->getChildRecurs(), Criteria::IN);
     $cton2 = $c->getNewCriterion(VAcaCostElsePeer::CLASS_GROUP_ID, $student->getClassGroup()->getParentRecurs(), Criteria::IN);
     $cton3 = $c->getNewCriterion(VAcaCostElsePeer::PAYER_TYPE_ID, $stu_type->getPayerTypeId(), Criteria::IN);
     $cton4 = $c->getNewCriterion(VAcaCostElsePeer::PAYER_TYPE_ID, $stu_type->getPayerType()->getParent(), Criteria::IN);
     $cton5 = $c->getNewCriterion(VAcaCostElsePeer::PAYER_CODE, $stu_type->getPayerType()->getCode(), Criteria::IN);
     $cton4->addOr($cton5);
     $cton3->addOr($cton4);
     $cton2->addAnd($cton3);
     $cton1->addAnd($cton2);
     $c->add($cton1);
     $c->addDescendingOrderByColumn(VAcaCostElsePeer::AMOUNT);
     $ac_costs = VAcaCostElsePeer::doSelect($c);
     $this->forward404Unless($ac_costs);
     $c = new Criteria();
     $c->add(PaymentJournalPeer::PAYER, $student->getId());
     $c->add(PaymentJournalPeer::PAYER_TYPE, PaymentJournal::PAYER_TYPE_STUDENT);
     #$c->add(PaymentJournalPeer::PAYMENT_MODEL_ID, $model);
     $c->add(PaymentJournalPeer::PAID_AT, $tanggal1);
     $c->add(PaymentJournalPeer::TRANSACTION_STATUS_ID, 2);
     $payment_student = PaymentJournalPeer::doSelectOne($c);
     $this->payment_student = $payment_student;
     $this->ac_costs = $ac_costs;
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('VAcaCost', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     $this->subtitle = $student->toString();
     $this->student = $student;
     $this->tanggal1 = $tanggal1;
     $this->payment_model = $payment_model;
     $this->tgl_code = $tgl_code;
     $this->comments = $comments;
     $this->papersize = 'gdscform';
     $this->orientation = 'landscape';
     $this->setViewClass('sfDomPDF');
 }