コード例 #1
0
     $pdf->Cell(0, 5, $array_conditions['condition_type'], T, 1, '', true);
     $pdf->SetFont('Helvetica', '', 9);
     $pdf->Cell(15, 5, '', B, 0, '', true);
     if ($company_name != NULL) {
         $company_name = "Responsibility: " . $company_name;
     }
     $pdf->Cell(90, 5, $company_name, B, 0, '', true);
     if ($array_conditions['condition_submitted_ref']) {
         $condition_submitted_ref = "Ref: " . $array_conditions['condition_submitted_ref'];
     } else {
         unset($condition_submitted_ref);
     }
     $pdf->Cell(0, 5, $condition_submitted_ref, B, 1, '', true);
     StyleBody(10);
     $pdf->ln(2.5);
     $pdf->SetX(25);
     $pdf->MultiCell(150, 5, $array_conditions['condition_text'], 0, L);
     if ($array_conditions['condition_note'] != NULL) {
         $pdf->ln(2.5);
         $pdf->SetX(25);
         $pdf->SetFont('Helvetica', B, 10);
         $pdf->Cell(0, 7.5, "Notes:", T, 1);
         $pdf->SetX(25);
         StyleBody(10);
         $pdf->MultiCell(150, 5, $array_conditions['condition_note'], 0, L);
     }
     $pdf->SetX(15);
     $pdf->SetX(10);
     $pdf->ln(5);
     $current_ref = $array_conditions['condition_ref'];
 }
コード例 #2
0
 $pdf->Cell(13, 3, 'Fee', R, 0);
 while ($separator_count < $bar_width_standard) {
     $unit_scale_print = "£" . number_format($unit_scale);
     $pdf->Cell($separator, 3, $unit_scale_print, R, 0);
     $separator_count = $separator_count + $separator;
     $unit_scale = $unit_scale + $unit;
 }
 $unit_scale_print = "£" . number_format($unit_scale);
 $pdf->Cell(0, 3, $unit_scale_print, 0, 1);
 $pdf->SetDrawColor(0, 0, 0);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetY($current_y);
 $pdf->SetFont($format_font, '', 9);
 $pdf->Cell(0, 5, $proj_title, 0, 1, L, 0, $proj_link);
 $pdf->SetFont($format_font, '', 6);
 $pdf->SetX(10);
 $pdf->Cell(0, 6, '', 0, 1);
 SetBar2("no");
 // Insert a line showing the PROJECT TOTAL if this is a new project we're about to start
 TotalCost($proj_id, $bar_scale, $bar_width_standard);
 // Now a bar which shows the unassigned work
 $sql_cost_unassigned = " SELECT SUM(ts_cost_factored) FROM intranet_timesheet WHERE `ts_stage_fee` = 0 AND `ts_project`= {$proj_id}";
 $result_cost_unassigned = mysql_query($sql_cost_unassigned, $conn) or die(mysql_error());
 $array_cost_unassigned = mysql_fetch_array($result_cost_unassigned);
 $cost_unassigned = $array_cost_unassigned['SUM(ts_cost_factored)'];
 $project_cost_total = $project_cost_total + $cost_unassigned;
 // if ($cost_unassigned = 0) { $cost_unassigned = $effectively_zero; }
 if ($cost_unassigned > 0) {
     $bar_width = $cost_unassigned / $bar_scale * $bar_width_standard;
     $pdf->SetTextColor(150, 150, 150);
     $cost_unassigned = str_replace("&pound;", "£", MoneyFormat($cost_unassigned)) . " [Unassigned]";
コード例 #3
0
 if ($ts_expense_invoiced == NULL) {
     $ts_expense_invoiced = 0;
 }
 if ($ts_expense_p11d == 1 and $ts_expense_invoiced > 0) {
     $bg = 1;
     $pdf->SetFillColor(255, 0, 0);
 } elseif ($ts_expense_p11d == 1) {
     $bg = 1;
     $pdf->SetFillColor(180, 230, 130);
 } elseif ($ts_expense_invoiced > 0) {
     $bg = 1;
     $pdf->SetFillColor(255, 255, 200);
 } else {
     $bg = 0;
 }
 $pdf->SetX(55);
 $pdf->MultiCell(45, 4, $ts_expense_desc, 0, L, $bg);
 $max_y = $pdf->GetY();
 $cellheight = $max_y - $y;
 $pdf->SetXY(10, $y);
 $link = $pdf_location . "index2.php?page=timesheet_expense_view&ts_expense_id=" . $ts_expense_id;
 $pdf->SetFont($format_font, '', 7);
 $pdf->Cell(10, $cellheight, $ts_expense_id, 0, 0, L, $bg, $link);
 $pdf->SetFont($format_font, '', 9);
 $pdf->Cell(20, $cellheight, $ts_expense_date, 0, 0, L, $bg);
 $pdf->Cell(15, $cellheight, $proj_num, 0, 0, L, $bg);
 $x = $x + 90;
 $pdf->SetXY($x, $y);
 $pdf->Cell(10, $cellheight, $user_intials, 0, 0, L, $bg);
 $pdf->Cell(20, $cellheight, $ts_expense_verified, 0, 0, L, $bg);
 $pdf->Cell(25, $cellheight, $invoice_ref_print, 0, 0, L, $bg);
コード例 #4
0
 if ($_GET[proj_id] != NULL && substr($qms_text, 0, 1) == "#") {
     $qms_text = ChecklistDate($_GET[proj_id], $qms_text);
 }
 if ($qms_toc4 > 0 && $qms_type == "code") {
     if ($pdf->GetY() > 270) {
         $pdf->addPage();
     }
     UpDate($qms_date);
     $pdf->SetTextColor(180);
     $pdf->SetFont('Helvetica', '', 5);
     $pdf->Cell(15, 5, $number, 0, 0, R);
     $pdf->SetFont('Courier', '', 10);
     $pdf->SetTextColor(0);
     $pdf->Cell(150, 2, '', 0, 2, '', 1);
     $pdf->MultiCell(150, 4.5, $qms_text, 0, '', true);
     $pdf->SetX(25);
     $pdf->Cell(150, 2, '', 0, 2, '', 1);
     $pdf->Cell(0, 3, '', 0, 1);
 } elseif ($qms_toc4 > 0 && $qms_type == "comp") {
     if ($pdf->GetY() > 260) {
         $pdf->addPage();
     }
     UpDate($qms_date);
     $pdf->SetTextColor(180);
     $pdf->SetFont('Helvetica', '', 5);
     $pdf->Cell(15, 5, $number, 0, 0, R);
     $pdf->SetTextColor(0);
     $pdf->SetLineWidth(0.5);
     $pdf->SetDrawColor(100);
     $pdf->Cell(1, 3, '', 0, 0);
     $pdf->SetFont('Helvetica', '', 12);
コード例 #5
0
             $pdf->SetFillColor(255);
         } elseif ($user_user_ended <= $user_start && $user_user_ended > 0) {
             $pdf->SetFillColor(255);
         }
         if (array_search($date, $array_bankholidays) > 0) {
             $pdf->SetFillColor(150);
         }
         // don't understand why this search does not find the bank holidays?
         if (date("N", $user_start) < 6) {
             $print_cell = date("j", $user_start);
             $pdf->Cell($day_width, 5, '', L, 0, L, 1);
         }
         $user_start = $user_start + 86400;
     }
     $pdf->Cell(0, 5, '', 0, 1);
     $pdf->SetX(10);
 }
 // Now let's  attempt a graph
 if ($pdf->GetY() > 150) {
     $pdf->addPage(L);
     DrawGrid();
 }
 $axis_y_max_1 = max($weekdiff_array);
 $axis_y_min_1 = min($weekdiff_array);
 $axis_y_max_2 = max($array_netprofit);
 $axis_y_min_2 = min($array_netprofit);
 if ($axis_y_max_1 > $axis_y_max_2) {
     $axis_y_max = $axis_y_max_1;
 } else {
     $axis_y_max = $axis_y_max_2;
 }