$fltTotalAdditionalUniqueGivers = 0; $fltTotalGiftsOver1000 = 0; $fltTotalGiftsOver10000 = 0; $fltTotalAverageGiftSize = 0; $fltTotalGiftAmount = 0; $fltTotalGivers = 0; $objDataGridArray = array(); $objMonthlyTotal = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $objMonthlyCount = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $objOver1000 = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $objOver10000 = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $objUniqueGiver = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $objGiverCount = array(array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array()); $objGiverList = array(); while ($objContribution = StewardshipContribution::InstantiateCursor($objContributionCursor)) { $objContributionAmtArray = StewardshipContributionAmount::LoadArrayByStewardshipContributionId($objContribution->Id); foreach ($objContributionAmtArray as $objContributionAmt) { $strAccountNumber = StewardshipFund::Load($objContributionAmt->StewardshipFundId)->AccountNumber; if ($strAccountNumber == '7011.010' || substr($strAccountNumber, 0, 1) == '4') { $iMonth = 0; $fltTotalGiftAmount += $objContributionAmt->Amount; $fltTotalGifts++; if ($objContribution->DateCredited->IsLaterOrEqualTo(new QDateTime("1/1/" . $intYear)) && $objContribution->DateCredited->IsEarlierThan(new QDateTime("2/1/" . $intYear))) { $iMonth = 0; } else { if ($objContribution->DateCredited->IsLaterOrEqualTo(new QDateTime("2/1/" . $intYear)) && $objContribution->DateCredited->IsEarlierThan(new QDateTime("3/1/" . $intYear))) { $iMonth = 1; } else { if ($objContribution->DateCredited->IsLaterOrEqualTo(new QDateTime("3/1/" . $intYear)) && $objContribution->DateCredited->IsEarlierThan(new QDateTime("4/1/" . $intYear))) { $iMonth = 2; } else {
/** * Deletes all associated StewardshipContributionAmounts * @return void */ public function DeleteAllStewardshipContributionAmounts() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateStewardshipContributionAmount on this unsaved StewardshipContribution.'); } // Get the Database Object for this Class $objDatabase = StewardshipContribution::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (StewardshipContributionAmount::LoadArrayByStewardshipContributionId($this->intId) as $objStewardshipContributionAmount) { $objStewardshipContributionAmount->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `stewardship_contribution_amount` WHERE `stewardship_contribution_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }