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


PHP QQN::StewardshipPledge方法代码示例

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


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

示例1: CalculateQuery

 protected function CalculateQuery(&$objCondition, &$objClauses, &$blnQueried)
 {
     $objCondition = QQ::All();
     $objClauses = array();
     $blnQueried = false;
     if ($intFundId = $this->lstFund->SelectedValue) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipPledge()->StewardshipFundId, $intFundId));
     }
     if (!is_null($blnFlag = $this->lstActiveFlag->SelectedValue)) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipPledge()->ActiveFlag, $blnFlag));
     }
     if (!is_null($blnFlag = $this->lstFulfilledFlag->SelectedValue)) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipPledge()->FulfilledFlag, $blnFlag));
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:18,代码来源:index.php

示例2: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a StewardshipPledge-based QQNode.
  * It will also verify that it is a proper StewardshipPledge-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_pledge') {
             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_pledge".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::StewardshipPledge()->Id;
                 case 'PersonId':
                     return QQN::StewardshipPledge()->PersonId;
                 case 'Person':
                     return QQN::StewardshipPledge()->Person;
                 case 'StewardshipFundId':
                     return QQN::StewardshipPledge()->StewardshipFundId;
                 case 'StewardshipFund':
                     return QQN::StewardshipPledge()->StewardshipFund;
                 case 'DateStarted':
                     return QQN::StewardshipPledge()->DateStarted;
                 case 'DateEnded':
                     return QQN::StewardshipPledge()->DateEnded;
                 case 'PledgeAmount':
                     return QQN::StewardshipPledge()->PledgeAmount;
                 case 'ContributedAmount':
                     return QQN::StewardshipPledge()->ContributedAmount;
                 case 'RemainingAmount':
                     return QQN::StewardshipPledge()->RemainingAmount;
                 case 'FulfilledFlag':
                     return QQN::StewardshipPledge()->FulfilledFlag;
                 case 'ActiveFlag':
                     return QQN::StewardshipPledge()->ActiveFlag;
                 default:
                     throw new QCallerException('Simple Property not found in StewardshipPledgeDataGrid 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,代码行数:71,代码来源:StewardshipPledgeDataGridGen.class.php

示例3: CountByStewardshipFundId

 /**
  * Count StewardshipPledges
  * by StewardshipFundId Index(es)
  * @param integer $intStewardshipFundId
  * @return int
  */
 public static function CountByStewardshipFundId($intStewardshipFundId, $objOptionalClauses = null)
 {
     // Call StewardshipPledge::QueryCount to perform the CountByStewardshipFundId query
     return StewardshipPledge::QueryCount(QQ::Equal(QQN::StewardshipPledge()->StewardshipFundId, $intStewardshipFundId), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:StewardshipPledgeGen.class.php

示例4: GenerateReceiptInPdf

 /**
  * Given an existing Zend_Pdf record, this will generate the PDF Receipt page(s) for this Person or Household for the given year.
  * @param Zend_Pdf $objPdf
  * @param mixed $objPersonOrHousehold
  * @param integer $intYear
  * @param boolean $blnDrawLegal whether or not to include the "legal" tax information (e.g. yes for annual, no for quarterly)
  * @param integer $intQuarter optional, can be 1, 2 or 3 to limit results to JUST Q1, Q1-Q2, Q1-Q3 data if applicable
  */
 public static function GenerateReceiptInPdf(Zend_Pdf $objPdf, $objPersonOrHousehold, $intYear, $blnDrawLegal, $intQuarter = null)
 {
     $intPersonIdArray = self::GetPersonIdArrayForPersonOrHousehold($objPersonOrHousehold);
     // Get the Contributions
     $objContributionAmountArray = self::GetContributionAmountArrayForPersonArray($intPersonIdArray, $intYear, $intQuarter);
     // Get the Pledges
     $objCondition = QQ::AndCondition(QQ::In(QQN::StewardshipPledge()->PersonId, $intPersonIdArray), QQ::OrCondition(QQ::Equal(QQN::StewardshipPledge()->ActiveFlag, true), QQ::AndCondition(QQ::GreaterOrEqual(QQN::StewardshipPledge()->DateStarted, new QDateTime($intYear . '-01-01 00:00:00')), QQ::LessOrEqual(QQN::StewardshipPledge()->DateStarted, new QDateTime($intYear . '-12-31 23:59:59'))), QQ::AndCondition(QQ::GreaterOrEqual(QQN::StewardshipPledge()->DateEnded, new QDateTime($intYear . '-01-01 00:00:00')), QQ::LessOrEqual(QQN::StewardshipPledge()->DateEnded, new QDateTime($intYear . '-12-31 23:59:59'))), QQ::AndCondition(QQ::GreaterOrEqual(QQN::StewardshipPledge()->DateEnded, new QDateTime($intYear . '-12-31 23:59:59')), QQ::LessOrEqual(QQN::StewardshipPledge()->DateStarted, new QDateTime($intYear . '-01-01 00:00:00')))));
     $objPledgeArray = StewardshipPledge::QueryArray($objCondition, QQ::OrderBy(QQN::StewardshipPledge()->DateStarted, QQN::StewardshipPledge()->DateEnded));
     // New Page every 38
     $intPageNumber = 1;
     $objPageOneOfThis = null;
     $intTotalPages = floor((count($objContributionAmountArray) - 1) / 38) + 1;
     for ($intIndex = 0; $intIndex < count($objContributionAmountArray); $intIndex += 38) {
         $objPage = $objPdf->newPage(Zend_Pdf_Page::SIZE_LETTER);
         if (!$objPageOneOfThis) {
             $objPageOneOfThis = $objPage;
         }
         $objPdf->pages[] = $objPage;
         // Draw Header
         if ($intPageNumber == 1) {
             self::DrawHeader($objPage);
             self::DrawAddress($objPage, $objPersonOrHousehold);
             self::DrawFooter($objPage, $blnDrawLegal);
             self::DrawSummary($objPage, $objContributionAmountArray, $intYear);
             self::DrawPledges($objPage, $objPledgeArray);
         }
         // Draw Page Info
         $intY = $intPageNumber == 1 ? STEWARDSHIP_TOP - 1.7125 * 72 : STEWARDSHIP_TOP - 0.5 * 72;
         self::DrawInfo($objPage, $objPersonOrHousehold, $intYear, $intQuarter, $intY, $intPageNumber, $intTotalPages);
         // Draw Items
         $intY = $intPageNumber == 1 ? STEWARDSHIP_TOP - 3.5 * 72 : STEWARDSHIP_TOP - 1.5 * 72;
         self::DrawItems($objPage, array_slice($objContributionAmountArray, $intIndex, 38), $intY);
         // Draw Footer
         $intPageNumber++;
     }
     $blnNonDeductibleFound = false;
     foreach ($objContributionAmountArray as $objAmount) {
         if ($objAmount->StewardshipContribution->NonDeductibleFlag) {
             $blnNonDeductibleFound = true;
         }
     }
     if ($blnNonDeductibleFound) {
         $objPage = $objPageOneOfThis;
         $objPage->setFillColor(new Zend_Pdf_Color_GrayScale(0));
         $objPage->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 8);
         $objPage->drawText('(*) denotes a contribution that does not qualify for tax deduction.', 14, 149, 'UTF-8');
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:56,代码来源:StewardshipContribution.class.php

示例5: dtgPledges_Bind

 public function dtgPledges_Bind()
 {
     if ($this->chkCombined && $this->chkCombined->Checked) {
         $intPersonIdArray = array();
         foreach ($this->objForm->objHousehold->GetHouseholdParticipationArray() as $objParticipation) {
             $intPersonIdArray[] = $objParticipation->PersonId;
         }
         $objCondition = QQ::In(QQN::StewardshipPledge()->PersonId, $intPersonIdArray);
     } else {
         $objCondition = QQ::Equal(QQN::StewardshipPledge()->PersonId, $this->objPerson->Id);
     }
     $this->dtgPledges->MetaDataBinder($objCondition, QQ::Clause(QQ::Expand(QQN::StewardshipPledge()->Person->LastName), QQ::Expand(QQN::StewardshipPledge()->StewardshipFund->Name)));
 }
开发者ID:alcf,项目名称:chms,代码行数:13,代码来源:Vicp_Stewardship.class.php


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