if ($showFields->bAddress) { echoT($clsRpt->writeCell($person->strAddress, 160)); } //-------------------- // Phone/Email //-------------------- if ($showFields->bPhoneEmail) { echoT($clsRpt->writeCell(strPhoneCell($person->strPhone, $person->strCell, true, true) . '<br>' . $person->strEmailFormatted)); } //-------------------- // Gift Summary //-------------------- if ($showFields->bGiftSummary) { $strLinkAddNew = strLinkAdd_Gift($lPID, 'New gift', true) . ' ' . strLinkAdd_Gift($lPID, 'New gift', false) . '<br>' . strLinkAdd_Pledge($lPID, 'New pledge', true) . ' ' . strLinkAdd_Pledge($lPID, 'New pledge', false); if ($person->lNumACODonationGroups_hard + $person->lNumACODonationGroups_soft > 0) { $strLinkGiftHistory = '<br>' . strLinkView_GiftsHistory($lPID, 'History', true) . ' ' . strLinkView_GiftsHistory($lPID, 'History', false) . '<br>' . $strLinkAddNew; } else { $strLinkGiftHistory = $strLinkAddNew; } echoT($clsRpt->writeCell(strBuildCumlativeTable($person->lNumACODonationGroups_hard, $person->donationsViaACO_hard, 140) . $strLinkGiftHistory)); echoT($clsRpt->writeCell(strBuildCumlativeTable($person->lNumACODonationGroups_soft, $person->donationsViaACO_soft, 140))); } //-------------------- // Sponsorship //-------------------- if ($showFields->bSponsor) { $strLinkAddNew = strLinkAdd_Sponsorship($lPID, 'Add new sponsorship', true, 'id="addSponI_' . $lPID . '"') . ' ' . strLinkAdd_Sponsorship($lPID, 'Add new', false, 'id="addSponL_' . $lPID . '"'); $strSponSum = $clsSpon->strSponsorSumLiteViaPID($lPID); if ($strSponSum == 'n/a') { $strStyle = ' text-align: center; color: #b0b0b0;'; } else {
function showGifts($lFID, $bBiz, $strCumGiftsNonSoftMon, $strCumGiftsNonSoftInKind, $strCumGiftsSoft, $strCumSpon, $lNumPledges, $lTotHard, $lTotSoft, $lTotInKind, $lNumSponPay) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gstrCurrency; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'giftSumDiv'; $attributes->divImageID = 'giftSumDivImg'; $attributes->bStartOpen = false; openBlock('Donations <span style="font-size: 9pt;">(' . $lTotHard . ' hard / ' . $lTotSoft . ' soft / ' . $lTotInKind . ' in-kind / ' . $lNumSponPay . ' spon pay)</span><br>', strLinkView_GiftsHistory($lFID, 'Gift history', true) . ' ' . strLinkView_GiftsHistory($lFID, 'Gift history', false) . ' ' . strLinkAdd_Gift($lFID, 'New donation', true) . ' ' . strLinkAdd_Gift($lFID, 'New donation', false) . ' ' . strLinkAdd_Pledge($lFID, 'New pledge', true) . ' ' . strLinkAdd_Pledge($lFID, 'New pledge', false), $attributes); if (bAllowAccess('showGiftHistory')) { echoT(' <table border="0"> <tr> <td class="enpView" style="width: 120pt;"> Total Monetary Gifts: </td> <td class="enpView" style="text-align: right; vertical-align: top; width: 70pt;" nowrap>' . $gstrCurrency . $strCumGiftsNonSoftMon . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Total In-Kind Gifts: </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumGiftsNonSoftInKind . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Sponsorship Payments:<br> <i>included in monetary gifts</i> </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumSpon . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Total Soft Donations: </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumGiftsSoft . ' </td> <td class="enpView"> </td> </tr>'); if ($lNumPledges > 0) { $strLinkPledges = strLinkView_PledgeViaFID($lFID, 'View pledges', true); } else { $strLinkPledges = ''; } echoT(' <tr> <td class="enpView"> Pledges: </td> <td class="enpView" style="text-align: center;">' . $lNumPledges . ' ' . $strLinkPledges . ' </td> <td class="enpView"> </td> </tr>'); echoT(' </table>'); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
public function strDonationGroupedDonorViewTable(&$sRpt, $sqlStr, $bShowACO, $strTitle = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $this->groupedGiftOpts($sRpt, $bAggregateDonor, $bShowAccts, $bShowCamps); if ($bShowACO) { $clsACO = new madmin_aco(); } $query = $this->db->query($sqlStr); if ($query->num_rows() == 0) { return '<br><br><i>There are no donations that match your search criteria.</i>'; } else { $strOut = ' <table class="enpRptC" style="">' . $strTitle . ' <tr> <td class="enpRptLabel" style="width: 70px;"> # Gifts </td> <td class="enpRptLabel" style="width: 110px;"> Total Amount </td> <td class="enpRptLabel" style="width: 250px;"> Donor </td>'; if ($bShowAccts || $bShowCamps) { $strOut .= ' <td class="enpRptLabel" style="width: 150px;"> Account </td>'; } if ($bShowCamps) { $strOut .= ' <td class="enpRptLabel" style="width: 150px;"> Campaign </td>'; } $strOut .= ' <td class="enpRptLabel" style="width: 80px;"> Gift History </td> </tr>'; foreach ($query->result() as $row) { $bBiz = $row->pe_bBiz; $lPeopleID = $row->pe_lKeyID; if ($bShowACO) { $strFlagImg = ' ' . $clsACO->strFlagImage($row->aco_strFlag, $row->aco_strName); } else { $strFlagImg = ''; } if ($bBiz) { $strName = htmlspecialchars($row->pe_strLName); $strLink = strLinkView_BizRecord($lPeopleID, 'View business/organization record', true); } else { $strName = htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName); $strLink = strLinkView_PeopleRecord($lPeopleID, 'View people record', true); } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt" style="width: 50px; text-align: center;">' . number_format($row->lNumRec) . ' </td> <td class="enpRpt" style="text-align: right; padding-right: 5px;">' . number_format($row->curSumAmnt, 2) . $strFlagImg . ' </td> <td class="enpRpt" style="text-align: left;">' . $strLink . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT) . ' ' . $strName . ' </td>'; if ($bShowAccts || $bShowCamps) { $strOut .= ' <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->ga_strAccount) . ' </td>'; } if ($bShowCamps) { $strOut .= ' <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->gc_strCampaign) . ' </td>'; } $strOut .= ' <td class="enpRpt" style="text-align: center;" nowrap>' . strLinkView_GiftsHistory($lPeopleID, 'View gift history', true) . ' ' . strLinkView_GiftsHistory($lPeopleID, 'View history', false) . ' </td> </tr>'; } $strOut .= '</table>' . "\n"; return $strOut; } }
function showGiftInfo(&$clsRpt, $lGID, $lFID, $bBiz, &$gifts, $people, $biz, $bSponPayment) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; // deposit info $lDepositID = $gifts->lDepositLogID; if (is_null($lDepositID)) { $strDeposit = 'n/a'; } else { $strDeposit = strLinkView_DepositEntry($lDepositID, 'View deposit', true) . str_pad($lDepositID, 5, '0', STR_PAD_LEFT) . ' '; if ($gifts->strDepositBank . '' != '') { $strDeposit .= $gifts->strDepositBank; } if ($gifts->strDepositAccount . '' != '') { if ($gifts->strDepositBank . '' != '') { $strDeposit .= ' / '; } $strDeposit .= $gifts->strDepositAccount; } $strDeposit .= ' (created ' . date($genumDateFormat, $gifts->dteDeposit) . ')'; } // pledge info if (is_null($gifts->lPledgeID)) { $strPledge = 'n/a'; } else { $strPledge = 'pledgeID ' . str_pad($gifts->lPledgeID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_Pledge($gifts->lPledgeID, 'View pledge record', true); } openBlock(($bSponPayment ? 'Sponsorship Payment' : 'Gift') . "\n", strLinkEdit_GiftRecord($lGID, 'Edit gift record', true) . "\n" . ' ' . "\n" . strLinkAdd_Gift($lFID, 'Add new gift', true) . "\n" . ' ' . "\n" . strLinkView_GiftsHistory($lFID, 'View donor\'s gift history', true) . ' ' . strLinkView_GiftsHistory($lFID, 'Donor\'s gift history', false) . "\n" . ' ' . "\n" . strLinkRem_Gift($lGID, 'Remove this gift record', true, true) . "\n\n"); echoT($clsRpt->openReport()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Gift ID:') . $clsRpt->writeCell(str_pad($lGID, 5, '0', STR_PAD_LEFT), '', '', 1, 1, ' id="gift_id" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Amount:') . $clsRpt->writeCell($gifts->strFormattedAmnt, '', '', 1, 1, ' id="gift_amount" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date:') . $clsRpt->writeCell(date($genumDateFormat, $gifts->gi_dteDonation), '', '', 1, 1, ' id="gift_date" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Account:') . $clsRpt->writeCell(htmlspecialchars($gifts->ga_strAccount), '', '', 1, 1, ' id="gift_acct" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Campaign:') . $clsRpt->writeCell(htmlspecialchars($gifts->gc_strCampaign), '', '', 1, 1, ' id="gift_camp" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Check #:') . $clsRpt->writeCell(htmlspecialchars($gifts->gi_strCheckNum), '', '', 1, 1, ' id="gift_cn" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Pledge:') . $clsRpt->writeCell($strPledge, '', '', 1, 1, ' id="gift_pledge" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Payment Type:') . $clsRpt->writeCell(htmlspecialchars($gifts->strPaymentType), '', '', 1, 1, ' id="gift_pt" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Deposit:') . $clsRpt->writeCell($strDeposit, '', '', 1, 1, ' id="gift_dep" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Gift Category:') . $clsRpt->writeCell(htmlspecialchars($gifts->strMajorGiftCat), '', '', 1, 1, ' id="gift_cat" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed To:') . $clsRpt->writeCell(htmlspecialchars($gifts->strAttribTo), '', '', 1, 1, ' id="gift_attrib" ') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($gifts->strNotes)), '', '', 1, 1, ' id="gift_notes" ') . $clsRpt->closeRow()); //-------------------- // in-kind //-------------------- echoT($clsRpt->openRow() . $clsRpt->writeLabel('In-Kind?:')); if ($gifts->gi_bGIK) { echoT($clsRpt->writeCell('Yes - ' . htmlspecialchars($gifts->strInKind), '', '', 1, 1, ' id="gift_ik" ')); } else { echoT($clsRpt->writeCell('No', '', '', 1, 1, ' id="gift_ik" ')); } echoT($clsRpt->closeRow()); //-------------------- // Acknowledged? //-------------------- echoT($clsRpt->openRow() . $clsRpt->writeLabel('Acknowledged?:', '', 'padding-top: 8px;')); if ($gifts->bAck) { echoT($clsRpt->writeCell('Yes - ' . date($genumDateFormat, $gifts->dteAck) . ' ' . strLinkSpecial_GiftChangeAck($lGID, false, 'Set to unacknowledged', true), '', 'padding-top: 8px;', 1, 1, ' id="gift_ack" ')); } else { echoT($clsRpt->writeCell('No ' . strLinkSpecial_GiftChangeAck($lGID, true, 'Set to acknowledged', true), '', 'padding-top: 8px;', 1, 1, ' id="gift_ack" ')); } echoT($clsRpt->closeRow()); echoT($clsRpt->closeReport('')); closeBlock(); }
} $strAddr = strBuildAddress($contact->strAddr1, $contact->strAddr2, $contact->strCity, $contact->strState, $contact->strCountry, $contact->strZip, true); if ($strAddr != '') { $strAddr .= '<br><br>'; } $strEmail = $contact->strEmail; if ($strEmail != '') { $strAddr .= strBuildEmailLink($strEmail, '', false, '') . '<br>'; } $strPhone = $contact->strPhone; if ($strPhone != '') { $strAddr .= $strPhone; } if (bAllowAccess('showGiftHistory')) { if ($contact->lNumACODonationGroups_hard + $contact->lNumACODonationGroups_soft > 0) { $strLinkGiftHistory = '<br>' . strLinkView_GiftsHistory($lPID, 'Gift history', true) . ' ' . strLinkView_GiftsHistory($lPID, 'Gift history', false); } } echoT($clsRpt->openRow(true)); echoT($clsRpt->writeCell(strLinkView_PeopleRecord($lPID, 'View people record', true) . ' ' . str_pad($lPID, 5, '0', STR_PAD_LEFT), 60)); echoT($clsRpt->writeCell($strHOH, 60)); echoT($clsRpt->writeCell($contact->strSafeNameLF, 60)); echoT($clsRpt->writeCell($strAddr, 60)); if (bAllowAccess('showGiftHistory')) { echoT($clsRpt->writeCell(strBuildCumlativeTable($contact->lNumACODonationGroups_hard, $contact->donationsViaACO_hard, 140) . $strLinkGiftHistory)); echoT($clsRpt->writeCell(strBuildCumlativeTable($contact->lNumACODonationGroups_soft, $contact->donationsViaACO_soft, 140))); } if (bAllowAccess('showSponsors')) { echoT($clsRpt->writeCell($clsSpon->strSponsorSumLiteViaPID($lPID))); } echoT($clsRpt->closeRow());