当前位置: 首页>>代码示例>>PHP>>正文


PHP QQN::StewardshipFund方法代码示例

本文整理汇总了PHP中QQN::StewardshipFund方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::StewardshipFund方法的具体用法?PHP QQN::StewardshipFund怎么用?PHP QQN::StewardshipFund使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQN的用法示例。


在下文中一共展示了QQN::StewardshipFund方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetupPanel

 protected function SetupPanel()
 {
     $this->mctPledge = StewardshipPledgeMetaControl::Create($this, $this->strUrlHashArgument, QMetaControlCreateType::CreateOnRecordNotFound);
     if (!$this->mctPledge->EditMode) {
         // Trying to create a NEW comment
         $this->mctPledge->StewardshipPledge->DateStarted = QDateTime::Now();
         $this->mctPledge->StewardshipPledge->Person = $this->objPerson;
         $this->mctPledge->StewardshipPledge->FulfilledFlag = false;
         $this->mctPledge->StewardshipPledge->ActiveFlag = true;
         $this->btnSave->Text = 'Create';
     } else {
         $this->btnSave->Text = 'Update';
         $this->btnDelete = new QLinkButton($this);
         $this->btnDelete->Text = 'Delete';
         $this->btnDelete->CssClass = 'delete';
         $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to DELETE this pledge?'));
         $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));
         $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
     }
     // Create Controls
     $this->lstStewardshipFund = $this->mctPledge->lstStewardshipFund_Create(null, QQ::All(), array(QQ::OrderBy(QQN::StewardshipFund()->Name)));
     $this->calDateStarted = $this->mctPledge->calDateStarted_Create();
     $this->calDateEnded = $this->mctPledge->calDateEnded_Create();
     $this->txtPledgeAmount = $this->mctPledge->txtPledgeAmount_Create();
     $this->chkActiveFlag = $this->mctPledge->chkActiveFlag_Create();
     $this->chkActiveFlag->Text = 'Note: All fulfilled pledges automatically considred "inactive".';
     $this->calDateStarted->MinimumYear = 2000;
     $this->calDateStarted->MaximumYear = date('Y') + 10;
     $this->calDateEnded->MinimumYear = 2000;
     $this->calDateEnded->MaximumYear = date('Y') + 10;
 }
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:Vicp_Stewardship_EditPledge.class.php

示例2: GenerateStewardship

 public static function GenerateStewardship()
 {
     $dttDate = new QDateTime('2004-01-05');
     print 'Generating Stewardship... ';
     $objFundArray = StewardshipFund::QueryArray(QQ::NotEqual(QQN::StewardshipFund()->Id, 1));
     while ($dttDate->IsEarlierThan(QDateTime::Now())) {
         print $strDate = '[' . $dttDate->ToString('YYYY-MMM-DD') . ']';
         $intCheckCount = rand(10, 55);
         $arrStack = array();
         for ($i = 0; $i < floor(($intCheckCount - 1) / 25) + 1; $i++) {
             $arrStack[] = null;
         }
         $objBatch = StewardshipBatch::Create(self::GenerateFromArray(self::$StewardshipUserArray), $arrStack, self::GenerateFromArray(array('Weekend T/O', 'Weekend Giving', 'Tithes and Offerings', 'Tithes & Offerings', null)), $dttDate, $dttDate);
         $intStackCount = $objBatch->CountStewardshipStacks();
         $dttStart = new QDateTime($dttDate);
         $dttStart->SetTime(8, 0, 0);
         $dttEnd = new QDateTime($dttDate);
         $dttEnd->SetTime(16, 0, 0);
         for ($i = 0; $i < $intStackCount; $i++) {
             if ($i == $intStackCount - 1) {
                 if ($intCheckCount % 25 == 0) {
                     $intChecksInStackCount = 25;
                 } else {
                     $intChecksInStackCount = $intCheckCount % 25;
                 }
             } else {
                 $intChecksInStackCount = 25;
             }
             $objStack = StewardshipStack::LoadByStewardshipBatchIdStackNumber($objBatch->Id, $i + 1);
             for ($j = 0; $j < $intChecksInStackCount; $j++) {
                 $objHousehold = self::GenerateFromArray(self::$HouseholdArray);
                 $objHouseholdParticipant = self::GenerateFromArray($objHousehold->GetHouseholdParticipationArray());
                 $mixAmountArray = array();
                 if (rand(0, 50)) {
                     $mixAmountArray[] = array(1, rand(1000, 150000) / 100);
                 } else {
                     $mixAmountArray[] = array(self::GenerateFromArray($objFundArray)->Id, rand(1000, 150000) / 100);
                 }
                 if (!rand(0, 20)) {
                     $mixAmountArray[] = array(self::GenerateFromArray($objFundArray)->Id, rand(1000, 150000) / 100);
                 }
                 $objContribution = StewardshipContribution::Create($objBatch->CreatedByLogin, $objHouseholdParticipant->Person, $objStack, StewardshipContributionType::Check, rand(1000, 9999), $mixAmountArray, self::GenerateDateTime($dttStart, $dttEnd), null, null, null, false);
                 if (rand(0, 5)) {
                     $objContribution->SaveImageFile(__DEVTOOLS_CLI__ . '/datagen_file_assets/check.tif');
                 }
             }
             $objStack->RefreshActualTotalAmount();
         }
         if ($intCheckCount != $objBatch->CountStewardshipContributions()) {
             print "\r\n" . 'MISCOUNT: ' . $objBatch->Id . "\r\n";
         }
         $objBatch->RefreshActualTotalAmount();
         $dttDate->Day += 7;
         print str_repeat(chr(8) . ' ' . chr(8), strlen($strDate));
     }
     print "Done.\r\n";
 }
开发者ID:alcf,项目名称:chms,代码行数:57,代码来源:datagen.cli.php

示例3: dtgFunds_Bind

 public function dtgFunds_Bind()
 {
     $objCondition = QQ::All();
     if (!is_null($blnOption = $this->lstActiveFlag->SelectedValue)) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipFund()->ActiveFlag, $blnOption));
     }
     if (!is_null($blnOption = $this->lstExternalFlag->SelectedValue)) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipFund()->ExternalFlag, $blnOption));
     }
     $this->dtgFunds->MetaDataBinder($objCondition);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:index.php

示例4: Form_Create

 protected function Form_Create()
 {
     $this->dtgPledges = new StewardshipPledgeDataGrid($this);
     $this->dtgPledges->Paginator = new QPaginator($this->dtgPledges);
     $objCol = $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->Person->LastName, 'Name=Person', 'Html=<?= $_ITEM->Person->LinkHtml; ?>', 'Width=200px', 'HtmlEntities=false');
     $objCol->OrderByClause = QQ::OrderBy(QQN::StewardshipPledge()->Person->LastName, QQN::StewardshipPledge()->Person->FirstName, QQN::StewardshipPledge()->Id);
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->StewardshipFund->Name, 'Name=Fund', 'Width=170px', 'FontSize=10px');
     $this->dtgPledges->MetaAddColumn('PledgeAmount', 'Html=<?= $_FORM->RenderAmount($_ITEM, $_ITEM->PledgeAmount); ?>', 'HtmlEntities=false', 'Width=90px', 'Name=Pledged');
     $this->dtgPledges->MetaAddColumn('RemainingAmount', 'Html=<?= $_FORM->RenderAmount($_ITEM, $_ITEM->RemainingAmount); ?>', 'HtmlEntities=false', 'Width=90px', 'Name=Remaining');
     $this->dtgPledges->MetaAddColumn('DateStarted', 'Width=85px', 'FontSize=10px');
     $this->dtgPledges->MetaAddColumn('DateEnded', 'Width=85px', 'FontSize=10px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->FulfilledFlag, 'Html=<?= ($_ITEM->FulfilledFlag ? "Y" : ""); ?>', 'Name=Fulfilled?', 'Width=70px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->ActiveFlag, 'Html=<?= $_FORM->RenderActiveFlag($_ITEM); ?>', 'Name=Active?', 'Width=70px', 'HtmlEntities=false');
     $this->dtgPledges->SetDataBinder('dtgPledges_Bind');
     $this->dtgPledges->NoDataHtml = '<strong>No results.</strong><br/>Please specify search parameters above.';
     $this->dtgPledges->SortColumnIndex = 0;
     $this->dtgPledges->SortDirection = 0;
     $this->pxyActiveFlagToggle = new QControlProxy($this);
     $this->pxyActiveFlagToggle->AddAction(new QClickEvent(), new QAjaxAction('pxyActiveFlagToggle_Click'));
     $this->pxyActiveFlagToggle->AddAction(new QClickEvent(), new QTerminateAction());
     $this->pxyActiveFlagToggleAll = new QControlProxy($this);
     $this->pxyActiveFlagToggleAll->AddAction(new QClickEvent(), new QAjaxAction('pxyActiveFlagToggleAll_Click'));
     $this->pxyActiveFlagToggleAll->AddAction(new QClickEvent(), new QTerminateAction());
     $this->lstFund = new QListBox($this);
     $this->lstFund->AddItem('- View All -');
     foreach (StewardshipFund::QueryArray(QQ::Equal(QQN::StewardshipFund()->ActiveFlag, true), QQ::OrderBy(QQN::StewardshipFund()->Name)) as $objFund) {
         if ($objFund->FundNumber) {
             $this->lstFund->AddItem($objFund->Name . ' (' . $objFund->FundNumber . ')', $objFund->Id);
         } else {
             $this->lstFund->AddItem($objFund->Name, $objFund->Id);
         }
     }
     $this->lstFund->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
     $this->lstActiveFlag = new QListBox($this);
     $this->lstActiveFlag->AddItem('- View All -', null);
     $this->lstActiveFlag->AddItem('Active Only', true);
     $this->lstActiveFlag->AddItem('Inactive Only', false);
     $this->lstActiveFlag->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
     $this->lstFulfilledFlag = new QListBox($this);
     $this->lstFulfilledFlag->AddItem('- View All -', null);
     $this->lstFulfilledFlag->AddItem('Fulfilled Only', true);
     $this->lstFulfilledFlag->AddItem('Not Yet Fulfilled Only', false, true);
     $this->lstFulfilledFlag->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
 }
开发者ID:alcf,项目名称:chms,代码行数:44,代码来源:index.php

示例5: RenderFund

 public function RenderFund(RecurringDonationItems $objItem = null)
 {
     if (!$objItem) {
         return '<strong>TOTAL SUBMISSION</strong>';
     }
     $lstFunds = $this->GetControl('lstFunds' . $this->dtgDonationItems->CurrentRowIndex);
     $txtFund = $this->GetControl('txtFund' . $this->dtgDonationItems->CurrentRowIndex);
     if (!$lstFunds) {
         $lstFunds = new QListBox($this->dtgDonationItems, 'lstFunds' . $this->dtgDonationItems->CurrentRowIndex);
         $lstFunds->ActionParameter = $this->dtgDonationItems->CurrentRowIndex;
         $lstFunds->AddAction(new QChangeEvent(), new QAjaxAction('lstFunds_Change'));
         $txtFund = new QTextBox($this->dtgDonationItems, 'txtFund' . $this->dtgDonationItems->CurrentRowIndex);
         $txtFund->Visible = false;
         if (!$objItem->StewardshipFundId) {
             $lstFunds->AddItem('- Select One -', null);
         }
         foreach (StewardshipFund::LoadArrayByExternalFlag(true, QQ::OrderBy(QQN::StewardshipFund()->ExternalName)) as $objFund) {
             $lstFunds->AddItem($objFund->ExternalName, $objFund->Id, $objFund->Id == $objItem->StewardshipFundId);
         }
         $lstFunds->AddItem('- Other... -', false);
     }
     return $lstFunds->RenderWithError(false) . ' ' . $txtFund->RenderWithError(false);
 }
开发者ID:alcf,项目名称:chms,代码行数:23,代码来源:recurringInfo.php

示例6: SetupPanel


//.........这里部分代码省略.........
     $this->chkNonDeductibleFlag->Name = 'Non-Deductibile?';
     $this->chkNonDeductibleFlag->Text = 'Check if contribution is <strong>NOT</strong> deductible';
     $this->chkNonDeductibleFlag->HtmlEntities = false;
     if (!$this->blnScanFlag) {
         $this->lstStewardshipContributionType = $this->mctContribution->lstStewardshipContributionType_Create();
         $this->lstStewardshipContributionType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstStewardshipContributionType_Change'));
         $this->txtAuthorization = $this->mctContribution->txtAuthorizationNumber_Create();
         $this->txtCheckNumber = $this->mctContribution->txtCheckNumber_Create();
         $this->txtCheckNumber->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtAlternateSource = $this->mctContribution->txtAlternateSource_Create();
         $this->lstStewardshipContributionType_Change();
     } else {
         // If we're scanning, then make sure we allow selecti onof Check or ReturnedCheck
         $this->lstStewardshipContributionType = $this->mctContribution->lstStewardshipContributionType_Create();
         $intIndex = 0;
         while ($intIndex < count($this->lstStewardshipContributionType->GetAllItems())) {
             $objListItem = $this->lstStewardshipContributionType->GetItem($intIndex);
             if ($objListItem->Value == StewardshipContributionType::Check || $objListItem->Value == StewardshipContributionType::ReturnedCheck) {
                 $intIndex++;
             } else {
                 $this->lstStewardshipContributionType->RemoveItem($intIndex);
             }
         }
         $this->txtCheckNumber = $this->mctContribution->txtCheckNumber_Create();
         $this->txtCheckNumber->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtCheckNumber->Select();
     }
     // Setup Total Amount
     $this->lblTotalAmount = new QLabel($this);
     $this->lblTotalAmount->HtmlEntities = false;
     // Setup Error Panels
     $this->pnlFundingError = new QPanel($this);
     $this->pnlFundingError->Visible = false;
     $this->pnlFundingError->CssClass = 'errorMessage';
     $this->pnlPersonError = new QPanel($this);
     $this->pnlPersonError->Visible = false;
     $this->pnlPersonError->CssClass = 'errorMessage';
     // Setup AmountArray
     $this->mctAmountArray = array();
     $objAmountArray = $this->mctContribution->StewardshipContribution->GetStewardshipContributionAmountArray(QQ::OrderBy(QQN::StewardshipContributionAmount()->Id));
     for ($i = 0; $i < 5; $i++) {
         if (array_key_exists($i, $objAmountArray)) {
             $objAmount = $objAmountArray[$i];
         } else {
             $objAmount = new StewardshipContributionAmount();
         }
         $mctAmount = new StewardshipContributionAmountMetaControl($this, $objAmount);
         $this->mctAmountArray[] = $mctAmount;
         if ($mctAmount->EditMode) {
             $lstFund = $mctAmount->lstStewardshipFund_Create(null, QQ::All(), QQ::OrderBy(QQN::StewardshipFund()->Name));
         } else {
             $lstFund = $mctAmount->lstStewardshipFund_Create(null, QQ::Equal(QQN::StewardshipFund()->ActiveFlag, true), QQ::OrderBy(QQN::StewardshipFund()->Name));
         }
         $lstFund->Required = false;
         $lstFund->ActionParameter = $i;
         $txtAmount = $mctAmount->txtAmount_Create();
         $txtAmount->ActionParameter = $i;
         $txtAmount->Text = sprintf('%.2f', $txtAmount->Text, 2);
         $lstFund->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstFund_Change'));
         $this->lstFund_Change(null, null, $i);
         $txtAmount->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lblTotalAmount_Refresh'));
         $txtAmount->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'txtAmount_Enter'));
         $txtAmount->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->lblTotalAmount_Refresh(null, null, null);
     }
     // Setup ChangePerson Dialog stuff
     $this->dlgChangePerson = new StewardshipSelectPersonDialogBox($this, null, $objContribution, $this, 'dlgChangePerson_Select');
     $this->btnChangePerson = new QButton($this);
     $this->btnChangePerson->Text = 'Change';
     $this->btnChangePerson->CssClass = 'primary';
     $this->btnChangePerson->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnChangePerson_Click'));
     if ($this->blnScanFlag) {
         $this->ProcessNewCheck();
         $this->btnSaveAndScanAgain = new QButton($this);
         $this->btnSaveAndScanAgain->CausesValidation = true;
         $this->btnSaveAndScanAgain->Text = 'Save and Scan Next Check';
         $this->btnSaveAndScanAgain->CssClass = 'primary';
         $this->btnSaveAndScanAgain->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));
     } else {
         if (!$this->mctContribution->EditMode) {
             if (!$this->mctContribution->StewardshipContribution->Person) {
                 $this->btnChangePerson_Click(null, null, null);
                 $this->dlgChangePerson->dtgPeople->NoDataHtml = '<div class="section sectionBatchInfo"><strong>Search For Individual</strong><br/><br/>' . 'Use above fields to find the individual for this new entry.</div>';
             } else {
                 $this->mctAmountArray[0]->StewardshipFundIdControl->Focus();
             }
             $this->btnSaveAndScanAgain = new QButton($this);
             $this->btnSaveAndScanAgain->CausesValidation = true;
             $this->btnSaveAndScanAgain->Text = 'Save and Enter Next Entry';
             $this->btnSaveAndScanAgain->ActionParameter = 'new';
             $this->btnSaveAndScanAgain->CssClass = 'primary';
             $this->btnSaveAndScanAgain->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));
         }
     }
     if (!$this->mctContribution->EditMode) {
         $this->LoadSelectedFundsFromSession();
     } else {
         $this->btnSave->Text = 'Update';
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:CpStewardship_EditContribution.class.php

示例7: Form_Create

 protected function Form_Create()
 {
     $this->lblHeading = new QLabel($this);
     if (QApplication::PathInfo(0)) {
         $objSignupForm = SignupForm::Load(QApplication::PathInfo(0));
         if (!$objSignupForm) {
             QApplication::Redirect('/events/');
         }
         if (!$objSignupForm->Ministry->IsLoginCanAdminMinistry(QApplication::$Login)) {
             QApplication::Redirect('/events/');
         }
         $this->strPageTitle .= 'Edit Form';
         $this->lblHeading->Text = 'Edit ' . $objSignupForm->Type . ' Form';
         switch ($objSignupForm->SignupFormTypeId) {
             case SignupFormType::Event:
                 $objChild = $objSignupForm->EventSignupForm;
                 break;
             case SignupFormType::Course:
                 $objChild = $objSignupForm->ClassMeeting;
                 break;
             default:
                 throw new Exception('Invalid SignupFormTypeId: ' . $objSignupForm->SignupFormTypeId);
         }
     } else {
         if (!QApplication::PathInfo(1)) {
             QApplication::Redirect('/events/');
         }
         $objSignupForm = new SignupForm();
         $objSignupForm->SignupFormTypeId = QApplication::PathInfo(1);
         $objSignupForm->DateCreated = QDateTime::Now();
         $objSignupForm->ActiveFlag = true;
         $this->strPageTitle .= 'Create New Form';
         $this->lblHeading->Text = 'Create New ' . $objSignupForm->Type . ' Form';
         switch ($objSignupForm->SignupFormTypeId) {
             case SignupFormType::Event:
                 $objChild = new EventSignupForm();
                 break;
             case SignupFormType::Course:
                 $objChild = new ClassMeeting();
                 break;
             default:
                 throw new Exception('Invalid SignupFormTypeId: ' . $objSignupForm->SignupFormTypeId);
         }
     }
     // Setup MCTs for Signup and Child
     $this->mctSignupForm = new SignupFormMetaControl($this, $objSignupForm);
     switch ($objSignupForm->SignupFormTypeId) {
         case SignupFormType::Event:
             $this->mctSignupChild = new EventSignupFormMetaControl($this, $objChild);
             break;
         case SignupFormType::Course:
             $this->mctSignupChild = new ClassMeetingMetaControl($this, $objChild);
             break;
         default:
             throw new Exception('Invalid SignupFormTypeId: ' . $objSignupForm->SignupFormTypeId);
     }
     $this->txtName = $this->mctSignupForm->txtName_Create();
     $this->txtName->Select();
     $this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtName->Required = true;
     $this->txtDescription = $this->mctSignupForm->txtDescription_Create();
     $this->txtInformationUrl = $this->mctSignupForm->txtInformationUrl_Create();
     $this->chkAllowMultipleFlag = $this->mctSignupForm->chkAllowMultipleFlag_Create();
     $this->chkAllowMultipleFlag->Name = 'Allow Multiple Registrations?';
     $this->chkAllowMultipleFlag->Text = 'Check if people are allowed to be registered multiple times.';
     $this->chkAllowOtherFlag = $this->mctSignupForm->chkAllowOtherFlag_Create();
     $this->chkAllowOtherFlag->Name = 'Allow Registering for Others?';
     $this->chkAllowOtherFlag->Text = 'Check if people are allowed to register on behalf of someone else.';
     $this->chkAllowOtherFlag->Visible = false;
     $this->chkActiveFlag = $this->mctSignupForm->chkActiveFlag_Create();
     $this->chkActiveFlag->Name = 'Active?';
     $this->chkActiveFlag->Text = 'Check if this is an "Active" form.';
     $this->txtToken = $this->mctSignupForm->txtToken_Create();
     $this->txtToken->Name = 'Custom Signup Web Address';
     $this->txtToken->HtmlBefore = '<span>https://my.alcf.net/signup/event.php / </span>';
     $this->chkConfidentialFlag = $this->mctSignupForm->chkConfidentialFlag_Create();
     $this->chkConfidentialFlag->Name = 'Confidential?';
     $this->chkConfidentialFlag->Text = 'Check if this form is considered a "Confidential" form.';
     $this->chkNoLoginSupportFlag = $this->mctSignupForm->chkLoginNotRequiredFlag_Create();
     $this->chkNoLoginSupportFlag->Name = 'Support No Login?';
     $this->chkNoLoginSupportFlag->Text = 'Check if you would like to allow users to signup without having to log in.';
     $this->txtFundingAccount = $this->mctSignupForm->txtFundingAccount_Create();
     if ($this->mctSignupForm->SignupForm->CountFormProducts()) {
         $this->txtFundingAccount->Required = true;
     }
     $this->lstDonationStewardshipFund = $this->mctSignupForm->lstDonationStewardshipFund_Create(null, QQ::Equal(QQN::StewardshipFund()->ActiveFlag, true), QQ::OrderBy(QQN::StewardshipFund()->Name));
     $this->lstDonationStewardshipFund->Name = 'Funding Account for Donations';
     if ($this->mctSignupForm->SignupForm->IsDonationAccepted()) {
         $this->lstDonationStewardshipFund->Required = true;
     }
     // Setup Ministry with Rules
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
         $this->lstMinistry = $this->mctSignupForm->lstMinistry_Create(null, null, QQ::OrderBy(QQN::Ministry()->Name));
     } else {
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $this->lstMinistry = $this->mctSignupForm->lstMinistry_Create(null, QQ::In(QQN::Ministry()->Id, $intMinistryIdArray), QQ::OrderBy(QQN::Ministry()->Name));
     }
//.........这里部分代码省略.........
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:edit.php

示例8: CountByExternalFlag

 /**
  * Count StewardshipFunds
  * by ExternalFlag Index(es)
  * @param boolean $blnExternalFlag
  * @return int
  */
 public static function CountByExternalFlag($blnExternalFlag, $objOptionalClauses = null)
 {
     // Call StewardshipFund::QueryCount to perform the CountByExternalFlag query
     return StewardshipFund::QueryCount(QQ::Equal(QQN::StewardshipFund()->ExternalFlag, $blnExternalFlag), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:StewardshipFundGen.class.php

示例9: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a StewardshipFund-based QQNode.
  * It will also verify that it is a proper StewardshipFund-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'stewardship_fund') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "stewardship_fund".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::StewardshipFund()->Id;
                 case 'MinistryId':
                     return QQN::StewardshipFund()->MinistryId;
                 case 'Ministry':
                     return QQN::StewardshipFund()->Ministry;
                 case 'Name':
                     return QQN::StewardshipFund()->Name;
                 case 'ExternalName':
                     return QQN::StewardshipFund()->ExternalName;
                 case 'AccountNumber':
                     return QQN::StewardshipFund()->AccountNumber;
                 case 'FundNumber':
                     return QQN::StewardshipFund()->FundNumber;
                 case 'ActiveFlag':
                     return QQN::StewardshipFund()->ActiveFlag;
                 case 'ExternalFlag':
                     return QQN::StewardshipFund()->ExternalFlag;
                 default:
                     throw new QCallerException('Simple Property not found in StewardshipFundDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:65,代码来源:StewardshipFundDataGridGen.class.php

示例10: Form_Create

 protected function Form_Create()
 {
     $this->objBatch = PaypalBatch::Load(QApplication::PathInfo(0));
     if (!$this->objBatch) {
         QApplication::Redirect('/stewardship/paypal');
     }
     $this->strPageTitle .= $this->objBatch->Number;
     $this->dtgTransactions = new QDataGrid($this);
     $this->dtgTransactions->SetDataBinder('dtgTransactions_Bind');
     $this->dtgTransactions->AddColumn(new QDataGridColumn('Date Captured', '<?= $_ITEM[0]; ?>', 'Width=150px', 'HtmlEntities=false', 'VerticalAlign=top'));
     $this->dtgTransactions->AddColumn(new QDataGridColumn('Total Amount Charged', '<?= $_ITEM[1]; ?>', 'Width=150px', 'VerticalAlign=top'));
     $this->dtgTransactions->AddColumn(new QDataGridColumn('Transaction Code', '<?= $_ITEM[2]; ?>', 'Width=120px', 'VerticalAlign=top'));
     $this->dtgTransactions->AddColumn(new QDataGridColumn('Account Funding', '<?= $_ITEM[3]; ?>', 'Width=330px', 'HtmlEntities=false', 'VerticalAlign=top', 'FontSize=10px'));
     $this->dtgTransactions->AddColumn(new QDataGridColumn('Funding Amount', '<?= $_ITEM[4]; ?>', 'Width=150px', 'HtmlEntities=false', 'VerticalAlign=top', 'FontSize=10px'));
     $this->dtgFunding = new QDataGrid($this);
     $this->dtgFunding->SetDataBinder('dtgFunding_Bind');
     $this->dtgFunding->AddColumn(new QDataGridColumn('Fund', '<?= $_ITEM[0]; ?>', 'Width=340px', 'HtmlEntities=false'));
     $this->dtgFunding->AddColumn(new QDataGridColumn('Account Number', '<?= $_ITEM[1]; ?>', 'Width=200px'));
     $this->dtgFunding->AddColumn(new QDataGridColumn('Amount', '<?= $_ITEM[2]; ?>', 'HtmlEntities=false', 'Width=380px', 'HtmlEntities=false'));
     $this->dtgUnaccounted = new CreditCardPaymentDataGrid($this);
     $this->dtgUnaccounted->MetaAddColumn('DateCaptured', 'Width=200px');
     $this->dtgUnaccounted->MetaAddColumn('AmountCharged', 'Html=<?= QApplication::DisplayCurrency($_ITEM->AmountCharged); ?>', 'Width=150px');
     $this->dtgUnaccounted->MetaAddColumn('TransactionCode', 'Width=500px');
     $this->dtgUnaccounted->SortColumnIndex = 0;
     $this->dtgUnaccounted->SetDataBinder('dtgUnaccounted_Bind');
     $this->dtgUnaccounted->NoDataHtml = 'Good!  There are no unaccounted-for credit card transaction entries in this PayPal batch.';
     $this->pxyEditFundDonationLineItem = new QControlProxy($this);
     $this->pxyEditFundDonationLineItem->AddAction(new QClickEvent(), new QAjaxAction('pxyEditFundDonationLineItem_Click'));
     $this->pxyEditFundDonationLineItem->AddAction(new QClickEvent(), new QTerminateAction());
     $this->pxyEditFundSignupPayment = new QControlProxy($this);
     $this->pxyEditFundSignupPayment->AddAction(new QClickEvent(), new QAjaxAction('pxyEditFundSignupPayment_Click'));
     $this->pxyEditFundSignupPayment->AddAction(new QClickEvent(), new QTerminateAction());
     $this->lblInstructionHtml = new QLabel($this);
     $this->lblInstructionHtml->TagName = 'p';
     $this->lblInstructionHtml->HtmlEntities = false;
     $this->dtxDateCredited = new QDateTimeTextBox($this);
     $this->dtxDateCredited->Name = 'Date to Credit Stewardship Contributions';
     $this->dtxDateCredited->Text = QDateTime::NowToString('MMMM D YYYY');
     $this->dtxDateCredited->Required = true;
     $this->btnPost = new QButton($this);
     $this->btnPost->Text = 'Post to NOAH';
     $this->btnPost->CssClass = 'primary';
     $this->btnPost->CausesValidation = $this->dtxDateCredited;
     $this->btnSplit = new QButton($this);
     $this->btnSplit->Text = 'Split This Batch';
     $this->btnSplit->CssClass = 'alternate';
     $this->btnSplit->SetCustomStyle('float', 'right');
     $this->btnSplit->AddAction(new QClickEvent(), new QAjaxAction('btnSplit_Click'));
     $this->dlgEditFund = new QDialogBox($this);
     $this->dlgEditFund->MatteClickable = false;
     $this->dlgEditFund->HideDialogBox();
     $this->dlgEditFund->Template = dirname(__FILE__) . '/dlgEditFund.tpl.php';
     $this->lblDialogFund = new QLabel($this->dlgEditFund);
     $this->lblDialogFund->Text = 'Please specify the appropriate Stewardship Funding Account for this line item.';
     $this->lblDialogFund->Visible = false;
     $this->lstDialogFund = new QListBox($this->dlgEditFund);
     $this->lstDialogFund->Name = 'Stewardship Fund';
     $this->lstDialogFund->AddItem('- Select One -', null);
     $this->lstDialogFund->Required = true;
     foreach (StewardshipFund::LoadArrayByActiveFlag(true, QQ::OrderBy(QQN::StewardshipFund()->Name)) as $objFund) {
         $this->lstDialogFund->AddItem($objFund->Name, $objFund->Id);
     }
     $this->lstDialogFund->AddItem('- Other (Non-Donation)... -', -1);
     $this->lstDialogFund->AddAction(new QChangeEvent(), new QAjaxAction('lstDialogFund_Change'));
     $this->lstDialogFund->Visible = false;
     $this->txtDialogOther = new QTextBox($this->dlgEditFund);
     $this->txtDialogOther->Name = 'Non-Donation Funding Account';
     $this->txtDialogOther->Visible = false;
     $this->lblDialogSplitFund = new QLabel($this->dlgEditFund);
     $this->lblDialogSplitFund->Visible = false;
     $this->lstDialogSplitFund = array();
     $this->txtDialogSplitOther = array();
     $this->txtDialogSplitAmount = array();
     $this->lblDialogSplitFundTitle = array();
     for ($i = 0; $i < 2; $i++) {
         $this->lblDialogSplitFundTitle[$i] = new QLabel($this->dlgEditFund);
         $this->lblDialogSplitFundTitle[$i]->HtmlEntities = false;
         $this->lblDialogSplitFundTitle[$i]->Text = '<h4>Line Item ' . ($i + 1) . '</h4>';
         $this->lblDialogSplitFundTitle[$i]->Visible = false;
         $this->lstDialogSplitFund[$i] = new QListBox($this->dlgEditFund);
         $this->lstDialogSplitFund[$i]->Name = 'Stewardship Fund';
         $this->lstDialogSplitFund[$i]->AddItem('- Select One -', null);
         $this->lstDialogSplitFund[$i]->Required = true;
         foreach (StewardshipFund::LoadArrayByActiveFlag(true, QQ::OrderBy(QQN::StewardshipFund()->Name)) as $objFund) {
             $this->lstDialogSplitFund[$i]->AddItem($objFund->Name, $objFund->Id);
         }
         $this->lstDialogSplitFund[$i]->AddItem('- Other (Non-Donation)... -', -1);
         $this->lstDialogSplitFund[$i]->ActionParameter = $i;
         $this->lstDialogSplitFund[$i]->AddAction(new QChangeEvent(), new QAjaxAction('lstDialogSplitFund_Change'));
         $this->lstDialogSplitFund[$i]->Visible = false;
         $this->txtDialogSplitOther[$i] = new QTextBox($this->dlgEditFund);
         $this->txtDialogSplitOther[$i]->Name = 'Non-Donation Funding Account';
         $this->txtDialogSplitOther[$i]->Visible = false;
         $this->txtDialogSplitAmount[$i] = new QFloatTextBox($this->dlgEditFund);
         $this->txtDialogSplitAmount[$i]->Name = 'Funding Amount';
         $this->txtDialogSplitAmount[$i]->Visible = false;
     }
     $this->rbtnUpdateFundSelection = new QRadioButtonList($this->dlgEditFund);
     $this->rbtnUpdateFundSelection->AddItem('Change Stewardship Funding Account of the Line Item', 1);
     $this->rbtnUpdateFundSelection->AddItem('Split this Line Item into two separate Funding Accounts', 2);
//.........这里部分代码省略.........
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:batch.php

示例11: SetupPanel

 protected function SetupPanel()
 {
     $this->dtgStewardshipContributionAmount = new StewardshipContributionAmountDataGrid($this);
     $this->dtgStewardshipContributionAmount->MetaAddColumn(QQN::StewardshipContributionAmount()->StewardshipContribution->DateCredited, 'Html=<?= $_CONTROL->ParentControl->RenderDate($_ITEM); ?>', 'Name=Date', 'Width=100px', 'HtmlEntities=false');
     $this->dtgStewardshipContributionAmount->MetaAddColumn(QQN::StewardshipContributionAmount()->StewardshipContribution->Person->LastName, 'Html=<?= $_CONTROL->ParentControl->RenderPerson($_ITEM); ?>', 'Name=Person', 'Width=180px');
     $this->dtgStewardshipContributionAmount->MetaAddColumn(QQN::StewardshipContributionAmount()->StewardshipFund->Name, 'Name=Fund', 'Width=180px');
     $this->dtgStewardshipContributionAmount->MetaAddColumn(QQN::StewardshipContributionAmount()->StewardshipContribution->StewardshipContributionTypeId, 'Html=<?= $_CONTROL->ParentControl->RenderTransaction($_ITEM); ?>', 'Name=Transaction', 'Width=170px');
     $this->dtgStewardshipContributionAmount->MetaAddColumn(QQN::StewardshipContributionAmount()->Amount, 'Html=<?= $_CONTROL->ParentControl->RenderAmount($_ITEM); ?>', 'HtmlEntities=false', 'FontNames=Lucida Console,Courier New,Courier,monospaced', 'Width=90px');
     $this->dtgStewardshipContributionAmount->SetDataBinder('dtgStewardshipContributionAmount_Bind', $this);
     $this->dtgStewardshipContributionAmount->SortColumnIndex = 0;
     $this->dtgStewardshipContributionAmount->NoDataHtml = 'No contribution records given your filtering criteria above.';
     if ($this->objForm->objHousehold) {
         $this->chkCombined = new QCheckBox($this);
         $this->chkCombined->Text = 'View contributions by all household members';
         $this->chkCombined->Checked = $this->objForm->objHousehold->CombinedStewardshipFlag;
     }
     $this->lstYear = new QListBox($this);
     $this->lstYear->AddItem('- View All -', null);
     $intYearNow = QDateTime::Now()->Year;
     if (array_key_exists('stewardship_view_year', $_SESSION)) {
         $intYearToView = $_SESSION['stewardship_view_year'];
     } else {
         $intYearToView = $intYearNow;
     }
     for ($intYear = 2000; $intYear <= $intYearNow + 1; $intYear++) {
         $this->lstYear->AddItem($intYear, $intYear, $intYear == $intYearToView);
     }
     $this->lstFund = new QListBox($this);
     $this->lstFund->AddItem('- View All -', null, true);
     foreach (StewardshipFund::LoadAll(QQ::OrderBy(QQN::StewardshipFund()->Name)) as $objFund) {
         $this->lstFund->AddItem($objFund->Name, $objFund->Id);
     }
     $this->lstYear->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstYear_Change'));
     $this->lstYear->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'lstYear_Change'));
     $this->lstYear->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->lstFund->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'Filter'));
     $this->lstFund->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'Filter'));
     $this->lstFund->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     if ($this->objForm->objHousehold) {
         $this->chkCombined->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'Filter'));
     }
     $this->pxyPrint = new QControlProxy($this);
     $this->pxyPrint->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyPrint_Click'));
     $this->pxyPrint->AddAction(new QClickEvent(), new QTerminateAction());
     $this->dtgPledges = new StewardshipPledgeDataGrid($this);
     $this->dtgPledges->FontSize = '11px';
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->Person->LastName, 'Name=Pledged By', 'HtmlEntities=false', 'Html=<?= $_CONTROL->ParentControl->RenderPledgePerson($_ITEM); ?>', 'Width=180px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->StewardshipFund->Name, 'Name=Fund', 'Width=150px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->DateStarted, 'Name=Start Date', 'Width=75px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->DateEnded, 'Name=End Date', 'Width=75px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->PledgeAmount, 'Name=Pledged', 'Html=<?= QApplication::DisplayCurrency($_ITEM->PledgeAmount); ?>', 'Width=70px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->ContributedAmount, 'Name=Contributed', 'Html=<?= QApplication::DisplayCurrency($_ITEM->ContributedAmount); ?>', 'Width=70px');
     $this->dtgPledges->MetaAddColumn(QQN::StewardshipPledge()->RemainingAmount, 'Name=Remaining', 'FontBold=true', 'Html=<?= QApplication::DisplayCurrency($_ITEM->RemainingAmount); ?>', 'Width=75px');
     $this->dtgPledges->SetDataBinder('dtgPledges_Bind', $this);
     $this->dtgPledges->NoDataHtml = '<span style="font-size: 14px;">No pledge records given your filtering criteria above.</span>';
     if ($this->objPerson->DeceasedFlag && $this->objForm->objHousehold && $this->objForm->objHousehold->CountHouseholdParticipations() > 1) {
         $this->btnMoveTransactions = new QButton($this);
         $this->btnMoveTransactions->CssClass = 'alternate';
         $this->btnMoveTransactions->Text = 'Deceased / Move Transactions';
         $this->btnMoveTransactions->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnMoveTransactions_Click'));
         $this->dlgMove = new QDialogBox($this);
         $this->dlgMove->Template = dirname(__FILE__) . '/dlgMove.tpl.php';
         $this->dlgMove->MatteClickable = false;
         $this->dlgMove->HideDialogBox();
         $this->lstMoveTo = new QListBox($this->dlgMove);
         $this->lstMoveTo->AddItem('- Select One -', null);
         $this->lstMoveTo->Name = 'Reassign To';
         $this->lstMoveTo->Required = true;
         foreach ($this->objForm->objHousehold->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
             if ($objHouseholdParticipation->PersonId != $this->objPerson->Id) {
                 $this->lstMoveTo->AddItem($objHouseholdParticipation->Person->Name, $objHouseholdParticipation->Person->Id);
             }
         }
         $this->btnMoveSave = new QButton($this->dlgMove);
         $this->btnMoveSave->Text = 'Move Transactions';
         $this->btnMoveSave->CssClass = 'primary';
         $this->btnMoveSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnMoveSave_Click'));
         $this->btnMoveSave->CausesValidation = QCausesValidation::SiblingsAndChildren;
         $this->btnMoveCancel = new QLinkButton($this->dlgMove);
         $this->btnMoveCancel->Text = 'Cancel';
         $this->btnMoveCancel->CssClass = 'cancel';
         $this->btnMoveCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnMoveCancel_Click'));
         $this->btnMoveCancel->AddAction(new QClickEvent(), new QTerminateAction());
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:85,代码来源:Vicp_Stewardship.class.php


注:本文中的QQN::StewardshipFund方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。