- If the option to print the total registration fee is on, and there are

pay-for t-shirts, completely remove the tshirt line if no tshirt is selected.
  It should cause less confusion
- If the same conditions are true and a tshirt has been selected, inform the
  student how they can deselect it to not incur the cost of a tshirt with
  registration.
This commit is contained in:
dave 2007-01-31 07:30:43 +00:00
parent 72f4d9031f
commit b6b93e1060

View File

@ -299,12 +299,13 @@ echo "<table><tr><td>";
echo "</table>";
echo "<br /><br />";
function regfee_line($item, $unit, $qty, $tot)
function regfee_line($item, $unit, $qty, $tot, $extra)
{
echo "<tr><td>".i18n($item)."</td>";
echo "<td>($".sprintf("%.02f", $unit)."</td>";
echo "<td>* $qty)</td>";
echo "<td>$".sprintf("%.02f", $tot)."</td>";
echo "<td><font size=-1>".i18n($extra)."</font></td>";
echo "</tr>";
}
if($config['regfee_show_info']) {
@ -322,23 +323,33 @@ echo "<table><tr><td>";
echo "<table>";
if($config['regfee_per'] == 'student') {
$f = $config['regfee'] * $n_students;
regfee_line("Fair Registration (per student)", $config['regfee'], $n_students, $f);
regfee_line("Fair Registration (per student)", $config['regfee'], $n_students, $f, '');
$regfee += $f;
} else {
regfee_line("Fair Registration (per project)", $config['regfee'], 1, $config['regfee']);
regfee_line("Fair Registration (per project)", $config['regfee'], 1, $config['regfee'], '');
$regfee += $config['regfee'];
}
$extra_after = "";
if($config['participant_student_tshirt'] == 'yes') {
$tsc = floatval($config['participant_student_tshirt_cost']);
if($tsc != 0.0) {
$f = $n_tshirts * $tsc;
$regfee += $f;
regfee_line("T-Shirts", $tsc, $n_tshirts, $f);
if($n_tshirts != 0) {
$ex = "*";
$extra_after = "* If you do not wish to order a T-Shirt, please select your T-Shirt size as 'None' on the Student Information Page";
regfee_line("T-Shirts", $tsc, $n_tshirts, $f, $ex);
}
}
}
echo "<tr><td align=right colspan=3>".i18n("Total (inlcuding all taxes)")."</td><td><b>$".sprintf("%.02f", $regfee)."</b></td></tr>";
echo "<tr><td align=right colspan=3>".i18n("Total (including all taxes)")."</td><td><b>$".sprintf("%.02f", $regfee)."</b></td><td></td></tr>";
echo "</table><br />";
echo i18n($extra_after);
echo "<br />";
echo "<br />";
echo "<br />";
}
echo "<h3>".i18n("Registration Instructions")."</h3>";