echo ' <td>' . $obj->rank . '</td>'; echo ' <td>' . $obj->display_name . '</td>'; echo '<td class="attendance user' . $obj->personnel_id . '">'; echo ' <input type="hidden" id="activity_id" name="activity_id" value="' . $activity->activity_id . '" />'; echo ' <select name="attendance_' . $obj->personnel_id . '" id="attendance_' . $obj->personnel_id . '">'; echo ' <option value=""' . (is_null($obj->personnel_id) ? ' selected="selected"' : '') . '></option>'; echo ' <option value="' . ATC_ATTENDANCE_PRESENT . '"' . ($obj->presence === ATC_ATTENDANCE_PRESENT ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_PRESENT_SYMBOL . '</option>'; echo ' <option value="' . ATC_ATTENDANCE_ON_LEAVE . '"' . ($obj->presence === ATC_ATTENDANCE_ON_LEAVE ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_ON_LEAVE_SYMBOL . '</option>'; echo ' <option value="' . ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE . '"' . ($obj->presence === ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE_SYMBOL . '</option>'; echo ' </select>'; echo '</td>'; echo '<td><input type="text" name="note_' . $obj->personnel_id . '" id="note_' . $obj->personnel_id . '" value="' . htmlentities($obj->note) . '" maxlength="255" /></td>'; // echo '<td><input type="number" step="0.1" name="amtpaid_'.$obj->personnel_id.'" id="amtpaid_'.$obj->personnel_id.'" value="'.htmlentities($obj->amount_paid).'" min="0" style="width:3em;" '.($ATC->user_has_permission(ATC_PERMISSION_FINANCE_EDIT)?'':'readonly="readonly"').'/></td>'; $payments = $ATC->get_activity_money_outstanding($obj->personnel_id, $activity->activity_id); if (count($payments)) { echo '<td nowrap="nowrap" style="text-align:right">' . ($ATC->user_has_permission(ATC_PERMISSION_FINANCE_VIEW, $obj->personnel_id) ? $ATC->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $payments[0]->remaining) : '<em>Hidden</em>') . '</td>'; } echo '</tr>'; } ?> </tbody> </table> </form> <script> $("thead th").button().removeClass("ui-corner-all").css({ display: "table-cell" }); </script> <?php exit; } elseif (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == 'contactsheet') { $activity = $ATC->get_activity((int) $_GET["id"]); $activity = $activity[0];
<tr> <th colspan="4">Total</th> <td style="font-weight:bold; text-align:right;"></td> </tr> </tfoot> <tbody> <?php $total = 0; foreach ($termfeesoutstanding as $obj) { $class = strtotime("+5 weeks", strtotime($obj->startdate)) < time() ? "ui-state-error" : (strtotime("+6 weeks", strtotime($obj->startdate)) < time() ? "ui-state-highlight" : ''); echo '<tr class="' . $class . '">'; echo ' <td>' . $obj->rank . '</td>'; echo ' <td><a href="personnel.php?id=' . $obj->personnel_id . '">' . $obj->display_name . '</a></td>'; echo ' <td>' . date(ATC_SETTING_DATE_OUTPUT, strtotime($obj->startdate)) . '</td>'; echo ' <td>' . date(ATC_SETTING_DATE_OUTPUT, strtotime($obj->enddate)) . '</td>'; echo ' <td style="text-align:right">' . $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $obj->remaining) . '</td>'; echo '</tr>'; $total += $obj->remaining; } ?> </tbody> </table> <script> $('#termfees tfoot td').html('<?php echo $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $total); ?> '); </script> <?php } } catch (ATCExceptionInsufficientPermissions $e) { // We just don't show the error if it was a permission issue, that's fine, we don't know who's logged in, after all }
$pdf->Cell(190, 10, 'Financial history', 0, 1, 'C', true); $pdf->SetFillColor(200); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(30, 8, 'Date', 1, 0, 'C', true); $pdf->Cell(40, 8, 'Amount', 1, 0, 'C', true); $pdf->Cell(40, 8, 'Payment type', 1, 0, 'C', true); $pdf->Cell(40, 8, 'Reference', 1, 0, 'C', true); $pdf->Cell(40, 8, 'Recorded by', 1, 1, 'C', true); $totalamount = 0; $pdf->SetFillColor(255); foreach ($obj->payments as $obj) { $totalamount += $obj->amount; $pdf->SetFont('Arial', '', 8); $pdf->Cell(30, 8, date(ATC_SETTING_DATE_OUTPUT . " Y", strtotime($obj->created)), 1, 0, 'C', true); $pdf->SetFont('Arial', '', 8); $pdf->Cell(40, 8, $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $obj->amount), 1, 0, 'R', true); $pdf->Cell(40, 8, $translations['paymenttype'][$obj->payment_type], 1, 0, 'C', true); $pdf->SetFont('Arial', '', 6); $pdf->Cell(40, 8, $obj->reference, 1, 0, 'C', true); $pdf->Cell(40, 8, $obj->rank . ' ' . $obj->display_name, 1, 0, 'C', true); $pdf->Cell(0, 8, '', 1, 1, 'C', true); } $pdf->SetFillColor(200); $pdf->SetFont('Arial', 'UB', 8); $pdf->Cell(30, 8, 'Total', 1, 0, 'C', true); $pdf->Cell(40, 8, $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $totalamount), 1, 0, 'C', true); $pdf->Cell(40, 8, '', 1, 0, 'C', true); $pdf->Cell(40, 8, '', 1, 0, 'C', true); $pdf->Cell(40, 8, '', 1, 1, 'C', true); } $pdf = $pdf->Output($ATC->generate_session_key() . '.pdf', 'D');
</tr> </thead> <tfoot> <tr> <th> Total: </th> <td colspan="4"></td> </tr> </tfoot> <tbody> <?php $totalamount = 0; foreach ($payments as $obj) { $totalamount += $obj->amount; echo '<tr>'; echo ' <td> ' . date(ATC_SETTING_DATE_OUTPUT . " Y", strtotime($obj->created)) . ' </td>'; echo ' <td> ' . $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $obj->amount) . ' </td>'; echo ' <td> ' . htmlentities($translations['paymenttype'][$obj->payment_type]) . ' </td>'; echo ' <td> ' . htmlentities($obj->reference) . ' </td>'; echo ' <td> ' . htmlentities($obj->rank . ' ' . $obj->display_name) . ' </td>'; echo '</tr>'; } ?> </tbody> </table> <script>$('tfoot td').html('<?php echo $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $totalamount); ?> ');</script> <?php $ATC->gui_output_page_footer(null); }
case ATC_NOK_TYPE_OTHER: $description .= ' (Other)'; break; case ATC_NOK_TYPE_GRANDMOTHER: $description .= ' (Grandmother)'; break; case ATC_NOK_TYPE_GRANDFATHER: $description .= ' (Grandfather)'; break; } $description .= ' ' . vcalendarsafestring($nok->firstname) . ' ' . vcalendarsafestring($nok->lastname) . ' ' . vcalendarsafestring($nok->email) . ' (' . vcalendarsafestring($nok->mobile_number) . ') (' . vcalendarsafestring($nok->home_number) . ')' . $CRLF; } } } if (strlen(trim($description))) { $description = 'Cost\\: ' . $ATC->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $obj->cost) . $CRLF . ' Attendees:' . $CRLF . ' ' . $description; echo 'DESCRIPTION:' . wordwrap($description, 75, "\n ", true); } echo 'END:VEVENT' . $CRLF; //echo 'CONTACT:'.vcalendarsafestring($obj->display_name).'\\,'.vcalendarsafestring($obj->mobile_phone).$CRLF; //echo 'SEQUENCE:0'.$CRLF; //echo 'DURATION:PT3H0M'.$CRLF; //echo 'ORGANIZER;CN='.$obj->display_name.':mailto:'.$obj->email.$CRLF; //echo 'ATTENDEE;ROLE=NON-PARTICIPANT:'.vcalendaruserstring( $obj->twoic_display_name, $obj->twoic_email, $obj->twoic_mobile_phone).$CRLF; //echo 'ATTENDEE;ROLE=CHAIR:mailto:'.$obj->email.$CRLF; } echo "END:VCALENDAR" . $CRLF; function vcalendarsafestring($string) { return str_replace(",", "\\,", $string); }