コード例 #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;
 }