示例#1
0
</td>
				
                		<td style="width: 1%; white-space:nowrap;" align="left">
				<?php 
        $total_student += $payment_history->getStudentCount();
        echo $payment_history->getStudentCount() ? $payment_history->getStudentCount() . '  Anak' : '-';
        ?>
</td>
				
                		<td style="width: 1%; white-space:nowrap;" align="right" nowrap>
                		<?php 
        $c = new Criteria();
        $c->add(VInfaqPaymentPeer::USER_ID, $payment_history->getUserId());
        $c->add(VInfaqPaymentPeer::PAID_AT, $payment_history->getPaidAt());
        $c->add(VInfaqPaymentPeer::ACADEMIC_COST_COMPONENT_ID, $payment_history->getAcademicCostComponentId());
        $paids = VInfaqPaymentPeer::doSelect($c);
        $total = 0;
        foreach ($paids as $paid) {
            $total += $paid->getPaid();
        }
        echo format_number($total);
        $total_amount += $total;
        ?>
</td>
                
                		    
                
                		<td style="width: 1%; white-space:nowrap;" align="left" class='first' nowrap>
                		<?php 
        if ($payment_history->getPaidAt() != null) {
            echo DateToIndo($payment_history->getPaidAt());
示例#2
0
 public function getVInfaqPayments($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVInfaqPaymentPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVInfaqPayments === null) {
         if ($this->isNew()) {
             $this->collVInfaqPayments = array();
         } else {
             $criteria->add(VInfaqPaymentPeer::ACADEMIC_COST_ID, $this->getId());
             VInfaqPaymentPeer::addSelectColumns($criteria);
             $this->collVInfaqPayments = VInfaqPaymentPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VInfaqPaymentPeer::ACADEMIC_COST_ID, $this->getId());
             VInfaqPaymentPeer::addSelectColumns($criteria);
             if (!isset($this->lastVInfaqPaymentCriteria) || !$this->lastVInfaqPaymentCriteria->equals($criteria)) {
                 $this->collVInfaqPayments = VInfaqPaymentPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVInfaqPaymentCriteria = $criteria;
     return $this->collVInfaqPayments;
 }
示例#3
0
 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(VInfaqPaymentPeer::ID, $pks, Criteria::IN);
         $objs = VInfaqPaymentPeer::doSelect($criteria, $con);
     }
     return $objs;
 }