Пример #1
0
 $currentFamilyID = 0;
 while ($row = mysql_fetch_array($rsReport)) {
     extract($row);
     // Check for minimum amount
     if ($iMinimum > 0) {
         $temp = "SELECT SUM(plg_amount) AS total_gifts FROM pledge_plg\n\t\t\t\tWHERE plg_FamID={$fam_ID} AND {$aSQLCriteria['1']}";
         $rsMinimum = RunQuery($temp);
         list($total_gifts) = mysql_fetch_row($rsMinimum);
         if ($iMinimum > $total_gifts) {
             continue;
         }
     }
     // Check for new family
     if ($fam_ID != $currentFamilyID && $currentFamilyID != 0) {
         //New Family. Finish Previous Family
         $pdf->SetFont('Times', 'B', 10);
         $pdf->Cell(20, $summaryIntervalY / 2, " ", 0, 1);
         $pdf->Cell(95, $summaryIntervalY, " ");
         $pdf->Cell(50, $summaryIntervalY, "Total Payments:");
         $totalAmountStr = "\$" . number_format($totalAmount, 2);
         $pdf->SetFont('Courier', '', 9);
         $pdf->Cell(25, $summaryIntervalY, $totalAmountStr, 0, 1, "R");
         $pdf->SetFont('Times', 'B', 10);
         $pdf->Cell(95, $summaryIntervalY, " ");
         $pdf->Cell(50, $summaryIntervalY, "Goods and Services Rendered:");
         $totalAmountStr = "\$" . number_format($totalNonDeductible, 2);
         $pdf->SetFont('Courier', '', 9);
         $pdf->Cell(25, $summaryIntervalY, $totalAmountStr, 0, 1, "R");
         $pdf->SetFont('Times', 'B', 10);
         $pdf->Cell(95, $summaryIntervalY, " ");
         $pdf->Cell(50, $summaryIntervalY, "Tax-Deductible Contribution:");