Exemplo n.º 1
0
 public function executeShowElse()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'student_type');
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
     $this->forward404Unless($student);
     $payment_student = PaymentJournalPeer::retrieveByPK($this->getRequestParameter('id'));
     $this->forward404Unless($payment_student);
     $this->payment_student = $payment_student;
     $this->type = 'detail';
     $actions = array(array('name' => 'cancel', 'url' => 'student_payment/listElse?student_id=' . $student->getId(), 'color' => 'black'));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'student_payment/deleteElse?id=' . $payment_student->getId() . '&student_id=' . $student->getId(), 'color' => 'red'));
     }
     if ($acl->getEditPriv()) {
         array_push($actions, array('name' => 'edit', 'url' => 'student_payment/editElse?id=' . $payment_student->getId() . '&student_id=' . $student->getId(), 'color' => 'blue'));
     }
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Daftar Murid</span>', 'url' => 'student_type/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Pembayaran SPP</span>', 'url' => 'student_payment/listSpp?student_id=' . $student->getId(), 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Pembayaran Lain-lain</span>', 'url' => 'student_payment/listElse?student_id=' . $student->getId(), 'color' => 'sun', 'type' => 'direct'));
     array_push($actions2, array('name' => '<span>Histori Pembayaran</span>', 'url' => 'student_payment/listHistory?student_id=' . $student->getId(), 'color' => 'sky'));
     $this->actions2 = $actions2;
     $this->subtitle = $payment_student->toString();
     $this->student = $student;
 }
Exemplo n.º 2
0
 public function executePrintReceipt()
 {
     $journal_id = $this->getRequestParameter('id');
     $journal = PaymentJournalPeer::retrieveByPK($journal_id);
     $this->forward404Unless($journal);
     $this->journal = $journal;
     $this->papersize = 'gdscform';
     $this->orientation = 'portrait';
     $this->setViewClass('sfDomPDF');
 }
Exemplo n.º 3
0
 public function getPaymentJournal($con = null)
 {
     include_once 'lib/model/om/BasePaymentJournalPeer.php';
     if ($this->aPaymentJournal === null && $this->payment_journal_id !== null) {
         $this->aPaymentJournal = PaymentJournalPeer::retrieveByPK($this->payment_journal_id, $con);
     }
     return $this->aPaymentJournal;
 }