forked from science-ation/science-ation
A couple fundraising changes for readability
This commit is contained in:
parent
183531ada0
commit
5ec6879149
@ -60,13 +60,14 @@ require_once("../dialog.inc.php");
|
||||
|
||||
echo "</th>\n";
|
||||
echo "<th colspan=\"5\">".i18n($r->name)."</th>\n";
|
||||
echo "<th style=\"text-align: right\">".format_money($r->goal)."</th>\n";
|
||||
echo "<th style=\"text-align: right\"><nobr>".format_money($r->goal)."</nobr></th>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if($r->type=="general")
|
||||
$orsql.="OR fundraising_type IS NULL";
|
||||
|
||||
$typetotal=0;
|
||||
$typeprobtotal=0;
|
||||
$sq=mysql_query("SELECT sponsorships.id, sponsors.organization, sponsorships.value, sponsorships.status, sponsorships.probability
|
||||
FROM sponsorships
|
||||
JOIN sponsors ON sponsorships.sponsors_id=sponsors.id
|
||||
@ -75,11 +76,11 @@ require_once("../dialog.inc.php");
|
||||
ORDER BY status DESC, probability DESC, organization");
|
||||
while($sr=mysql_fetch_object($sq)) {
|
||||
echo "<tr id=\"sponsorships_$sr->id\" class=\"fundraising{$sr->status}\">";
|
||||
echo "<td><a title=\"".i18n("Edit sponsorship details")."\" onclick=\"return SFIABDialog(event,'fundraising_sponsorship.php?id=$sr->id&fundraising_type=$r->type',400,250)\" href=\"#\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/edit.".$config['icon_extension']."\"></a>";
|
||||
echo "<a title=\"".i18n("Remove sponsorship")."\" onclick=\"return confirmClick('Are you sure you want to remove this sponsorship?')\" href=\"fundraising.php?action=sponsorshipdelete&delete=$sr->id\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\"></a>";
|
||||
echo "<td>";
|
||||
echo "<a title=\"".i18n("Remove sponsorship")."\" onclick=\"return confirmClick('Are you sure you want to remove this sponsorship?')\" href=\"fundraising.php?action=sponsorshipdelete&delete=$sr->id\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\"></a></nobr>";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td>$sr->organization</td>\n";
|
||||
echo "<td><a title=\"".i18n("Edit sponsorship details")."\" onclick=\"return SFIABDialog(event,'fundraising_sponsorship.php?id=$sr->id&fundraising_type=$r->type',400,250)\" href=\"#\">$sr->organization</a></td>\n";
|
||||
/*
|
||||
echo "<a href=\"communication.php?action=edit&edit=$r->id\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/edit.".$config['icon_extension']."\"></a>";
|
||||
|
||||
@ -100,23 +101,25 @@ require_once("../dialog.inc.php");
|
||||
{
|
||||
echo "$sr->probability%";
|
||||
echo "</td>";
|
||||
echo "<td>".format_money($sr->value)."</td>";
|
||||
echo "<td><nobr>".format_money($sr->value)."</nobr></td>";
|
||||
}
|
||||
else
|
||||
echo "</td><td></td>\n";
|
||||
|
||||
$probval=$sr->probability/100*$sr->value;
|
||||
echo "<td style=\"text-align: right\">".format_money($probval)."</td>";
|
||||
echo "<td style=\"text-align: right\"><nobr>".format_money($probval)."</nobr></td>";
|
||||
echo "<td></td>\n";
|
||||
echo "</tr>\n";
|
||||
$typetotal+=$probval;
|
||||
$typeprobtotal+=$probval;
|
||||
$typetotal+=$sr->value;
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td><a onclick=\"return SFIABDialog(event,'fundraising_sponsorship.php?fundraising_type=$r->type',400,250)\" href=\"#\">add</a></td>";
|
||||
echo "<td colspan=\"4\" style=\"text-align: right; font-weight: bold;\">".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."</td>\n";
|
||||
echo "<td style=\"font-weight: bold; text-align: right;\">".format_money($typetotal)."</td>\n";
|
||||
echo "<td colspan=\"3\" style=\"text-align: right; font-weight: bold;\">".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."</td>\n";
|
||||
echo "<td style=\"font-weight: bold; text-align: right;\"><nobr>".format_money($typetotal)."</nobr></td>\n";
|
||||
echo "<td style=\"font-weight: bold; text-align: right;\"><nobr>".format_money($typeprobtotal)."</nobr></td>\n";
|
||||
$typediff=$typetotal-$r->goal;
|
||||
echo "<td style=\"font-weight: bold; text-align: right;\">".format_money($typediff)."</td>\n";
|
||||
echo "<td style=\"font-weight: bold; text-align: right;\"><nobr>".format_money($typediff)."</nobr></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$totalgoal+=$r->goal;
|
||||
|
Loading…
Reference in New Issue
Block a user