$proj_num = $array_proj['proj_num']; $proj_name = $array_proj['proj_name']; $sheet_title = "Project Checklist"; $pdf->SetXY(10, 45); $pdf->SetFont($format_font, '', 24); $pdf->SetTextColor(0, 0, 0); $pdf->SetDrawColor(0, 0, 0); $pdf->Cell(0, 10, $sheet_title); $pdf->SetXY(10, 55); $pdf->SetFont($format_font, '', 14); $sheet_subtitle = $proj_num . " " . $proj_name; $sheet_date = "Current at " . $current_date; $pdf->Cell(0, 7.5, $sheet_subtitle, 0, 1, L, 0); $pdf->Cell(0, 7.5, $sheet_date, 0, 1, L, 0); $pdf->SetXY(10, 70); $pdf->SetLineWidth(0.5); $sql_checklist = "SELECT * FROM intranet_project_checklist_items LEFT JOIN intranet_project_checklist ON checklist_item = item_id AND checklist_project = {$proj_id} WHERE checklist_required != 1 ORDER BY item_group, item_order, checklist_date DESC, item_name"; $result_checklist = mysql_query($sql_checklist, $conn) or die(mysql_error()); $y = $pdf->GetY() + 10; $pdf->SetY($y); $pdf->SetTextColor(0, 0, 0); $pdf->SetLineWidth(0.3); $pdf->SetFont("Helvetica", 'B', 7); $pdf->Cell(65, 5, "Item", B, 0, L, 0); $pdf->Cell(15, 5, "Required", B, 0, L, 0); $pdf->Cell(30, 5, "Date Completed", B, 0, L, 0); $pdf->Cell(80, 5, "Comment", B, 1, L, 0); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont($format_font, '', 7); $pdf->SetFillColor(240, 240, 240); $pdf->SetLineWidth(0.1);
$pdf->SetFont($format_font, '', 8); } if ($_POST[separate_pages] != 1) { StageTotal($stage_total); StageFee($ts_stage_fee); } else { $pdf->SetFont($format_font, '', 8); $pdf->Cell(20, 5, 'Total', T, 0, L); $hours_total_print = number_format($hours_total); $pdf->Cell(8, 5, $hours_total_print, T, 0, R); $pdf->Cell(0, 5, 'hours', T, 1, L); $hours_total = 0; } if ($_POST[separate_pages] != 1) { $cost_total_print = "£" . number_format($running_cost, 2); $total_cost_nf_print = "(£" . number_format($total_cost_nf, 2) . ")"; $pdf->SetFont($format_font, '', 8); $pdf->Ln(); $pdf->SetFillColor(240, 240, 240); $pdf->SetLineWidth(0.5); $pdf->Cell(71, 5, 'Total Cost', 0, 0, L, 0); $pdf->Cell(20, 5, $cost_total_print, 0, 0, R, 0); $pdf->Cell(20, 5, $total_cost_nf_print, 0, 1, R, 0); StageFee($ts_stage_fee); } // and send to output $print_begin = $_POST[submit_begin]; $print_end = $_POST[submit_end]; $file_name = "Project_Analysis_" . $proj_num . ".pdf"; $pdf->Output($file_name, I); }
$contact_address_print = "Client Details Required"; } $pdf->MultiCell(45, 4, $contact_address_print, 0, L); $pdf->SetTextColor(0, 0, 0); $y = $pdf->GetY(); $pdf->SetXY(105, 88); $pdf->Cell(0, 4, $invoice_ref); $pdf->SetXY(152.5, 88); $pdf->Cell(0, 4, $invoice_date_print); //if ($invoice_purchase_order != NULL) { $pdf->SetXY(105, 108); $pdf->Cell(0, 4, $invoice_purchase_order); //} $y = $y + 10; $pdf->SetDrawColor(0, 0, 0); $pdf->SetLineWidth(0.1); $pdf->SetXY(40, $y); $pdf->SetFont($format_font, '', 10); $pdf->Cell(150, 6, 'Description of Work Undertaken', 'B', '', '', false); $x = 40; $y = $pdf->GetY() + 7; $pdf->SetXY($x, $y); $invoice_novat_total = 0; $invoice_vat_total = 0; $invoice_novat_total = 0; $invoice_total = 0; $ts_expense_total_vat = 0; $ts_disbursement_total = 0; $grand_total = 0; // Pull the corresponding results from the Invoice Item list $sql2 = "SELECT * FROM intranet_timesheet_invoice_item WHERE invoice_item_invoice = '{$invoice_id}' ORDER BY invoice_item_desc";
$pdf->Cell(0, 6, $user_name, 0, 1); $pdf->SetFont($format_font, '', 12); $pdf->Cell(0, 6, '', 0, 1); // Columnn Headings $pdf->SetTextColor(150); $pdf->SetFont($format_font, '', 8); $pdf->Cell(10, 4, "ID", 0, 0, L, 0); $pdf->Cell(20, 4, "Date", 0, 0, L, 0); $pdf->Cell(15, 4, "Project", 0, 0, L, 0); $pdf->Cell(100, 4, "Description", 0, 0, L, 0); $pdf->Cell(15, 4, "Net.", 0, 0, R, 0); $pdf->Cell(15, 4, "VAT", 0, 0, R, 0); $pdf->Cell(15, 4, "Gross.", 0, 1, R, 0); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont($format_font, '', 9); $pdf->SetLineWidth(0.05); $x = 10; $y = 70; $expense_total_value = 0; $expense_total_vat = 0; $expense_total_diff = 0; $expense_invoice_net = 0; $expense_noinvoice_net = 0; $expense_invoice_vat = 0; $expense_noinvoice_vat = 0; $expense_invoice_gross = 0; $expense_noinvoice_gross = 0; // Get the relevant infomation from the Invoice Database $sql_expense = "SELECT * FROM intranet_timesheet_expense, intranet_projects WHERE ts_expense_project = proj_id AND ts_expense_user = '******' AND ( ts_expense_verified = 0 OR ts_expense_verified IS NULL ) ORDER BY ts_expense_date"; $result_expense = mysql_query($sql_expense, $conn) or die(mysql_error()); while ($array_expense = mysql_fetch_array($result_expense)) {