コード例 #1
0
ファイル: payment.php プロジェクト: alcf/chms
 public function lstQuantity_Change($strFormId, $strControlId, $strParameter)
 {
     $lstQuantity = $this->GetControl($strControlId);
     $objFormProduct = FormProduct::Load($strParameter);
     $objSignupProduct = SignupProduct::LoadBySignupEntryIdFormProductId($this->objSignupEntry->Id, $objFormProduct->Id);
     if (!$objSignupProduct) {
         if ($lstQuantity->SelectedValue) {
             $this->objSignupEntry->AddProduct($objFormProduct, $lstQuantity->SelectedValue);
         }
     } else {
         if ($lstQuantity->SelectedValue) {
             $objSignupProduct->Quantity = $lstQuantity->SelectedValue;
             $objSignupProduct->Save();
         } else {
             $objSignupProduct->Delete();
         }
         $this->objSignupEntry->RefreshAmounts();
     }
     $this->RefreshForm();
 }
コード例 #2
0
ファイル: export_to_excel.php プロジェクト: alcf/chms
             case FormQuestionType::Age:
                 print $objAnswer->IntegerValue;
                 break;
             case FormQuestionType::DateofBirth:
                 if ($objAnswer->DateValue) {
                     print $objAnswer->DateValue->ToString('M/D/YYYY');
                 }
                 break;
         }
     }
     print ",";
 }
 if ($objSignupForm->CountFormProducts() > 0) {
     foreach ($objSignupForm->GetFormProductArray(QQ::OrderBy(QQN::FormProduct()->FormProductTypeId, QQN::FormProduct()->OrderNumber)) as $objFormProduct) {
         if ($objFormProduct->ViewFlag) {
             $objSignupProduct = SignupProduct::LoadBySignupEntryIdFormProductId($objSignupEntry->Id, $objFormProduct->Id);
             if ($objSignupProduct) {
                 print QApplication::DisplayCurrency($objSignupProduct->Amount);
             } else {
                 print " ";
             }
             print ",";
         }
     }
     print QApplication::DisplayCurrency($objSignupEntry->AmountTotal);
     print ",";
     print QApplication::DisplayCurrency($objSignupEntry->AmountPaid);
     print ",";
     print QApplication::DisplayCurrency($objSignupEntry->AmountBalance);
     print ",";
     $strReturn = '';
コード例 #3
0
ファイル: result.php プロジェクト: alcf/chms
 protected function pxyEditFormProduct_Click($strFormId, $strControlId, $strParameter)
 {
     $objFormProduct = FormProduct::Load($strParameter);
     if ($objFormProduct->SignupFormId != $this->objSignupForm->Id) {
         return;
     }
     /**
      * @var SignupEntry
      */
     $objSignupEntry = $this->mctSignupEntry->SignupEntry;
     /**
      * @var Person
      */
     $objPerson = $this->mctSignupEntry->SignupEntry->Person;
     $this->dlgEdit->ShowDialogBox();
     $this->dlgEdit->Template = dirname(__FILE__) . '/dlgEditResult_SignupProduct.tpl.php';
     $this->intEditTag = self::EditTagProduct;
     $this->objSignupProduct = SignupProduct::LoadBySignupEntryIdFormProductId($objSignupEntry->Id, $objFormProduct->Id);
     if (!$this->objSignupProduct) {
         $this->objSignupProduct = new SignupProduct();
         $this->objSignupProduct->SignupEntryId = $objSignupEntry->Id;
         $this->objSignupProduct->FormProductId = $objFormProduct->Id;
         $this->objSignupProduct->Amount = $objFormProduct->Cost;
         $this->objSignupProduct->Deposit = $objFormProduct->Deposit;
         $this->objSignupProduct->Quantity = $objFormProduct->MinimumQuantity;
         $this->btnDelete->Visible = false;
     } else {
         $this->btnDelete->Visible = true;
     }
     // Reset
     $this->ResetDialogControls();
     $this->lstListbox->Name = 'Quantity';
     for ($i = $objFormProduct->MinimumQuantity; $i <= $objFormProduct->MaximumQuantity; $i++) {
         $this->lstListbox->AddItem($i, $i, $i == $this->objSignupProduct->Quantity);
     }
     $this->txtFloat->Name = 'Cost per Item';
     $this->txtFloat->Text = $this->objSignupProduct->Amount;
 }
コード例 #4
0
ファイル: results.php プロジェクト: alcf/chms
 public function RenderProductQuantity(SignupEntry $objSignupEntry, $intFormProductId)
 {
     $objSignupProduct = SignupProduct::LoadBySignupEntryIdFormProductId($objSignupEntry->Id, $intFormProductId);
     if (!$objSignupProduct) {
         return;
     }
     return $objSignupProduct->Quantity;
 }