예제 #1
0
파일: payment.php 프로젝트: alcf/chms
 public function dtgProducts_Bind()
 {
     $arrDataSource = array();
     // First add any required products
     foreach ($this->objSignupForm->GetFormProductArrayByType(FormProductType::Required, QQ::OrderBy(QQN::FormProduct()->OrderNumber)) as $objProduct) {
         if ($objProduct->IsAvailableRightNow()) {
             $arrDataSource[] = $objProduct;
         }
     }
     // If there are any valid "Required with Choice" products, add the row for it
     foreach ($this->objSignupForm->GetFormProductArrayByType(FormProductType::RequiredWithChoice, QQ::OrderBy(QQN::FormProduct()->OrderNumber)) as $objProduct) {
         if ($objProduct->IsAvailableRightNow()) {
             $arrDataSource[] = -1;
             break;
         }
     }
     // Add any optional products
     foreach ($this->objSignupForm->GetFormProductArrayByType(FormProductType::Optional, QQ::OrderBy(QQN::FormProduct()->OrderNumber)) as $objProduct) {
         if ($objProduct->IsAvailableRightNow()) {
             $arrDataSource[] = $objProduct;
         }
     }
     // Add any payments
     $arrDataSource = array_merge($arrDataSource, $this->objSignupEntry->GetSignupPaymentArray(QQ::OrderBy(QQN::SignupPayment()->TransactionDate)));
     // Add "Balance Due"
     $arrDataSource[] = null;
     $this->dtgProducts->DataSource = $arrDataSource;
 }
예제 #2
0
파일: results.php 프로젝트: alcf/chms
 public function RenderPaymentType(SignupEntry $objSignupEntry)
 {
     $strReturn = '';
     if ($objSignupEntry->CountSignupPayments()) {
         $objArray = $objSignupEntry->GetSignupPaymentArray();
         $strReturn .= SignupPaymentType::ToString($objArray[0]->SignupPaymentTypeId);
     } else {
         $strReturn = 'No payment';
     }
     return $strReturn;
 }