function showItemInfo(&$clsRpt, &$item, &$auction, $lPackageID, $lItemID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; openBlock('Silent Auction Item', strLinkEdit_AuctionItem($lPackageID, $lItemID, 'Edit item information', true) . ' ' . ' ' . strLinkRem_AuctionItem($lPackageID, $lItemID, 'Remove this item record', true, true)); echoT($clsRpt->openReport()); // Item ID echoT($clsRpt->openRow() . $clsRpt->writeLabel('Item ID:') . $clsRpt->writeCell(str_pad($lItemID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow()); // Item Name echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($item->strSafeItemName) . $clsRpt->closeRow()); // Date Obtained echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date Obtained:') . $clsRpt->writeCell(date($genumDateFormat, $item->dteObtained)) . $clsRpt->closeRow()); // Item Donor if ($item->itemDonor_bBiz) { $strNameLink = ' <i>(business)</i> ' . strLinkView_BizRecord($item->lItemDonorID, 'View business record', true); } else { $strNameLink = ' ' . strLinkView_PeopleRecord($item->lItemDonorID, 'View people record', true); } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Item Donor:') . $clsRpt->writeCell($item->itemDonor_safeName . $strNameLink) . $clsRpt->closeRow()); // Donor Acknowledgement echoT($clsRpt->openRow() . $clsRpt->writeLabel('Donor Ack.:') . $clsRpt->writeCell(htmlspecialchars($item->strDonorAck)) . $clsRpt->closeRow()); // Est. Value echoT($clsRpt->openRow() . $clsRpt->writeLabel('Est. Value:') . $clsRpt->writeCell($auction->strCurrencySymbol . ' ' . number_format($item->curEstAmnt, 2)) . $clsRpt->closeRow()); // Out-of-Pocket echoT($clsRpt->openRow() . $clsRpt->writeLabel('Out-of-Pocket:') . $clsRpt->writeCell($auction->strCurrencySymbol . ' ' . number_format($item->curOutOfPocket, 2)) . $clsRpt->closeRow()); // Public Notes echoT($clsRpt->openRow() . $clsRpt->writeLabel('Public Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($item->strDescription))) . $clsRpt->closeRow()); // Private Notes echoT($clsRpt->openRow() . $clsRpt->writeLabel('Private Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($item->strInternalNotes))) . $clsRpt->closeRow()); echoT($clsRpt->closeReport()); closeBlock(); }
function writeAuctionItemsTable(&$package, &$items, $bDescriptions) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lPackageID = $package->lKeyID; echoT(' <table class="enpRpt"> <tr> <td class="enpRptTitle" colspan="8"> Items in the package <b>"' . $package->strPackageSafeName . '"</b> </td> </tr>'); echoT(' <tr> <td class="enpRptLabel"> item ID </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> Est. Value </td> <td class="enpRptLabel"> Out of Pocket </td> <td class="enpRptLabel"> From </td> </tr>'); $curTotVal = $curTotOOP = 0.0; foreach ($items as $item) { $lItemID = $item->lKeyID; if ($item->itemDonor_bBiz) { $strNameLink = ' <i>(business)</i> ' . strLinkView_BizRecord($item->lItemDonorID, 'View business record', true); } else { $strNameLink = ' ' . strLinkView_PeopleRecord($item->lItemDonorID, 'View people record', true); } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center; width: 20pt;">' . str_pad($lItemID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionItem($lItemID, 'View auction item', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkEdit_AuctionItem($lPackageID, $lItemID, 'Edit Item', true) . ' </td> <td class="enpRpt" style="text-align: center; width: 20pt;">' . strLinkRem_AuctionItem($lPackageID, $lItemID, 'Remove auction item', true, true) . ' </td> <td class="enpRpt" style="width: 140pt;">' . $item->strSafeItemName . ' </td> <td class="enpRpt" style="width: 40pt; text-align: right;">' . number_format($item->curEstAmnt, 2) . ' </td> <td class="enpRpt" style="width: 40pt; text-align: right;">' . number_format($item->curOutOfPocket, 2) . ' </td> <td class="enpRpt" style="width: 110pt;">' . $item->itemDonor_safeName . $strNameLink . ' </td> </tr>'); $curTotVal += $item->curEstAmnt; $curTotOOP += $item->curOutOfPocket; } echoT(' <tr class="makeStripe"> <td class="enpRpt" colspan="4"> <b>Total:</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curTotVal, 2) . '</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curTotOOP, 2) . '</b> </td> <td colspan="2"> </td> </tr>'); echoT(' </table><br>'); }