I want to add a column to the Year end Donation Report. An example is below. I think it can be added in the donationReportYearly.php file. I'm just not sure where I need to add the code. Can someone point me in the right direction.
DEACON -
Dear DEACON,
We appreciate your financial support during the past year to Church Fund. The following is a
statement of your donations during the past year.
Total sum of your donations received during the year 2008: $378.00
Below are the details for your donations:
Donation Date Fund Amount
2008-09-22 General Offering $78.00
2008-09-24 Tithes $200.00
2008-09-24 Sunday School $100.00
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Almost there; but I'm having trouble getting the Fund Name field to populate.
Donation Date Amount Fund
2008-09-22 $78.00
2008-09-24 $200.00
2008-09-24 $100.00
Here is code I change. Right now Fund_Name doesn't populate. I'm not sure how if have declared
that table so the code can see it. What I'm I missing. I'm new to PHP. Thanks for the help.
I want to add a column to the Year end Donation Report. An example is below. I think it can be added in the donationReportYearly.php file. I'm just not sure where I need to add the code. Can someone point me in the right direction.
DEACON -
Dear DEACON,
We appreciate your financial support during the past year to Church Fund. The following is a
statement of your donations during the past year.
Total sum of your donations received during the year 2008: $378.00
Below are the details for your donations:
Donation Date Fund Amount
2008-09-22 General Offering $78.00
2008-09-24 Tithes $200.00
2008-09-24 Sunday School $100.00
QBerry,
That is the right place. The code that create's the table is as follows:
$tablehtml="<table border=1><tr bgcolor=#C0C0C0><th>" . _oscgiv_donationdate . "</th><th>" . _oscgiv_amount . "</th></tr>";
//Create table from donations
$totalamount=0;
foreach($donations as $donation)
{
$totalamount+=$donation->getVar('dna_Amount');
$tablehtml.="<tr><td>" . $donation->getVar('don_Date') . "</td><td align=right>" . "\$" . number_format( $donation->getVar('dna_Amount'),2) . "</td></tr>";
}
$tablehtml.="</table>";
If you change anything shoot it back to me and I'll take a look and possibly put it in the code base.
Let me know if this did not answer your question.
Steve
Steve,
Almost there; but I'm having trouble getting the Fund Name field to populate.
Donation Date Amount Fund
2008-09-22 $78.00
2008-09-24 $200.00
2008-09-24 $100.00
Here is code I change. Right now Fund_Name doesn't populate. I'm not sure how if have declared
that table so the code can see it. What I'm I missing. I'm new to PHP. Thanks for the help.
$tablehtml="<table border=1><tr bgcolor=#C0C0C0><th>" . _oscgiv_donationdate . "</th><th>" . _oscgiv_amount . "</th><th>" . _oscgiv_fund . "</th></tr>";
//Create table from donations
$totalamount=0;
foreach($donations as $donation)
{
$totalamount+=$donation->getVar('dna_Amount');
$tablehtml.="<tr><td>" . $donation->getVar('don_Date') . "</td><td align=right>" . "\$" . number_format( $donation->getVar('dna_Amount'),2) . "</td></tr> <td align=right>" . $donation->getVar('Fund_Name') . "</td></tr>";
}
$tablehtml.="</table>";
QBerry,
Fund_Name is not an attribute of the donation class. dna_fund_id is the id of the fund and is an attribute of the donation class.
You will have to create a fund class and call the getFund passing the fund id to get the name.
Steve