public function executeRun() { $this->error = false; if (!$this->applicant) { $this->error = true; $this->messageError = 'Applicant Not Found'; return false; } $ta = $this->applicant; $this->ta_detail = $ta->getTestApplicantDetail(); if (!$this->ta_detail) { $this->error = true; $this->messageError = 'Applicant Detail Not Found'; return false; } $cw = new Criteria(); $cw->add(DepartmentDetailPeer::DEPARTMENT_ID, $ta->getDepartment1()); $this->department_detail = DepartmentDetailPeer::doSelectOne($cw); if (!$this->department_detail) { $this->error = true; $this->messageError = 'Department not found'; return false; } $c = new Criteria(); $c->add(PaymentJournalPeer::PAYER, $ta->getId()); $c->add(PaymentJournalPeer::PAYER_TYPE, PaymentJournal::PAYER_TYPE_APPLICANT); $payments = PaymentJournalPeer::doSelect($c); if (!$payments) { $this->error = true; $this->messageError = 'Payments not fond'; return false; } $this->payments = $payments; }
public function executePaymentReceipt() { $id = $this->getRequestParameter('id'); if (empty($id)) { echo 'ID Not Found'; die; } $ta = TestApplicantPeer::retrieveByPK($id); if (empty($ta)) { echo 'Test Applicant Not Found'; die; } $this->filename = $this->getActionName() . '_' . $ta->getName(); $cw = new Criteria(); $cw->add(DepartmentDetailPeer::DEPARTMENT_ID, $ta->getDepartment1()); $this->department_detail = DepartmentDetailPeer::doSelectOne($cw); $c = new Criteria(); $c->add(PaymentJournalPeer::PAYER, $ta->getId()); $c->add(PaymentJournalPeer::PAYER_TYPE, PaymentJournal::PAYER_TYPE_APPLICANT); $payments = PaymentJournalPeer::doSelect($c); $this->payments = $payments; $this->ta = $ta; $this->ta_detail = $ta->getTestApplicantDetail(); $this->setLayout(false); #$this->orientation = 'landscape'; $this->papersize = 'a4'; $this->setViewClass('sfDomPDF'); }
public function getPaymentJournals($criteria = null, $con = null) { include_once 'lib/model/om/BasePaymentJournalPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collPaymentJournals === null) { if ($this->isNew()) { $this->collPaymentJournals = array(); } else { $criteria->add(PaymentJournalPeer::ACADEMIC_COST_ID, $this->getId()); PaymentJournalPeer::addSelectColumns($criteria); $this->collPaymentJournals = PaymentJournalPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(PaymentJournalPeer::ACADEMIC_COST_ID, $this->getId()); PaymentJournalPeer::addSelectColumns($criteria); if (!isset($this->lastPaymentJournalCriteria) || !$this->lastPaymentJournalCriteria->equals($criteria)) { $this->collPaymentJournals = PaymentJournalPeer::doSelect($criteria, $con); } } } $this->lastPaymentJournalCriteria = $criteria; return $this->collPaymentJournals; }
</th> <th style="vertical-align: middle;"><?php echo __('Status'); ?> </th> </tr> </thead> <tbody> <?php $c = new Criteria(); $c->add(PaymentJournalPeer::PAYER, $student->getId()); $c->add(PaymentJournalPeer::PAID_AT, $paid_at); $c->add(PaymentJournalPeer::YEAR, $year); $c->add(PaymentJournalPeer::TRANSACTION_STATUS_ID, 1); $c->add(PaymentJournalPeer::ACADEMIC_COST_ID, $ac_cost->getId()); $payments = PaymentJournalPeer::doSelect($c); ?> <?php $i = 0; foreach ($payments as $payment) { ?> <tr class="list<?php ++$i; if ($i % 2 == 0) { echo ' even'; } ?> "> <td style="vertical-align: middle;"><?php #echo $i echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
</td> </tr> <tr> <td style="vertical-align:middle;"><label ><?php echo __('Total Kewajiban'); ?> </label></td> <td width="2%" style="text-align:center; vertical-align:middle;">:</td> <td style="vertical-align:middle;"> <?php $cw = new Criteria(); $cw->add(PaymentJournalPeer::PAYER, $student->getId()); $cw->add(PaymentJournalPeer::PAID_AT, $tanggal1); $cw->add(PaymentJournalPeer::PAYMENT_MODEL_ID, $model); $cw->add(PaymentJournalPeer::TRANSACTION_STATUS_ID, 2); $ps = PaymentJournalPeer::doSelect($cw); ?> <?php $total_cost = 0; foreach ($ps as $c) { $total_cost += $c->getAmount(); } ?> <p class="detail" style="font-weight: bold;"><?php echo 'Rp. ' . format_number($total_cost); ?> </p> </td> </tr> <tr> <td class="first" colspan="3" width="100%">
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(PaymentJournalPeer::ID, $pks, Criteria::IN); $objs = PaymentJournalPeer::doSelect($criteria, $con); } return $objs; }