if ($item_group != $group) { $pdf->SetFont($format_font, '', 8); $current_y = $pdf->GetY(); if ($current_y > 250) { $pdf->addPage(); } $pdf->Cell(0, 3, '', 0, 1, L, 0); $pdf->Cell(0, 5, $item_group, B, 1, L, 0); $pdf->SetFont($format_font, '', 7); } else { if ($current_y > 250) { $pdf->addPage(); } } $border = T; $current_x = $pdf->GetX() + 1; $current_y = $pdf->GetY() + 1; if ($checklist_required == "2" and $checklist_date == "0000-00-00") { $pdf->SetFillColor(245, 72, 72); } elseif ($checklist_required == "2" and $checklist_date == NULL) { $pdf->SetFillColor(245, 72, 72); } elseif ($checklist_required == "0") { $pdf->SetFillColor(245, 190, 72); } elseif ($checklist_required == NULL) { $pdf->SetFillColor(245, 190, 72); } elseif ($checklist_required == "1") { $pdf->SetFillColor(220, 220, 220); } else { $pdf->SetFillColor(173, 233, 28); } // Green
} if ($cost_unfactored == 0) { $cost_unfactored = 0.1; } $pdf->Cell(0, 1, '', 0, 2); $pdf->Cell($cost_unfactored, 0.5, '', 0, 2, '', true); $pdf->Cell(0, 0.5, '', 0, 2); SetBarLBlue(); if ($this_bar_width_1 > 0 and $this_bar_width_2 > 0) { $pdf->Cell($this_bar_width_1, 4, '', 0, L, 0, true); $pdf->SetDrawColor(255, 255, 255); $pdf->Cell($this_bar_width_2, 4, '', L, L, 0, true); } else { $pdf->Cell($this_bar_width, 4, '', 0, L, 0, true); } $bar_maximum = $pdf->GetX(); //$pdf->Cell(0,4,$cost_total,0,L,1); // if ($cost_bar_width > 0) { $current_y = $pdf->GetY(); // + 2; $pdf->SetY($current_y); $pdf->SetX(23); if ($cost_bar_width > $this_bar_width) { SetBarRed(); } elseif ($cost_bar_width > $this_bar_width_1) { SetBarOrange(); } else { SetBarDBlue(); } $pdf->Cell($cost_bar_width, 2, '', 0, L, 0, true); $cost_bar_location = $pdf->GetX();
$revision_date = TimeFormat($array_drawings['revision_date']); } else { $revision_date = "-"; } if ($current_drawing != $drawing_id) { if ($revision_letter == "*") { $pdf->SetTextColor(150, 150, 150); } else { $pdf->SetTextColor(0, 0, 0); } $pdf->Cell(60, 5, $drawing_number, T, 0, L, $fill); $pdf->Cell(25, 5, $drawing_date, T, 0, L, $fill); $pdf->MultiCell(0, 5, $drawing_title, T, L, $fill); if ($revision_letter == "*") { $back_y = $pdf->GetY() - 2.5; $back_x = $pdf->GetX(); $new_x = $back_x + 190; $pdf->SetDrawColor(150, 150, 150); $pdf->SetLineWidth(0.1); $pdf->Line($back_x, $back_y, $new_x, $back_y); $pdf->SetDrawColor(0, 0, 0); $new_y = $back_y + 2.5; $pdf->SetXY($back_x, $new_y); $pdf->SetLineWidth(0.3); } if ($revision_letter != "-") { $pdf->SetFont($format_font, '', 8); $pdf->Cell(50, 4, '', 0, 0, L, $fill); $pdf->Cell(10, 4, $revision_letter, 0, 0, L, $fill); $pdf->Cell(25, 4, $revision_date, 0, 0, L, $fill); $pdf->MultiCell(0, 4, $revision_desc, 0, L, $fill);
$pdf->Cell(0, 3, '', 0, 1); } elseif ($qms_toc4 > 0 && $qms_type == "image") { $max_width = 150; $image = "images/" . $qms_text; $image_size = GetImagesize($image); $image_height = $image_size[1]; $image_width = $image_size[0]; $height = $image_height / $image_width * $max_width; if ($pdf->GetY() + $height > 270) { $pdf->addPage(); } UpDate($qms_date); $pdf->SetTextColor(180); $pdf->SetFont('Helvetica', '', 5); $pdf->Cell(15, 5, $number, 0, 0, R); $x = $pdf->GetX(); $y = $pdf->GetY(); $pdf->Image($image, $x, $y, $max_width, $height); $y = $pdf->GetY() + $height + 2; $pdf->SetY($y); unset($x); unset($y); } elseif ($qms_toc4 > 0 && $qms_type == "check") { 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);
if ($stage_start < 0) { $stage_start = 0; $ts_fee_time_end = $ts_fee_time_end - ($current_time - $ts_fee_commence); $noborder = 1; } else { $noborder = 0; } $stage_start = Weeks($stage_start); if ($stage_start > 0 & $stage_start < 230) { $pdf->Cell($stage_start, $rowheight, '', 0, 0, L); } $stage_width = Weeks($ts_fee_time_end); $pdf->SetFont('Helvetica', '', 5); $count = 0; $arraycount = $stage_start / $colwidth; if ($pdf->GetX() < 280 & $stage_start < 230) { while ($count < $stage_width && $x < 280) { //if ($ts_fee_pre > 0 && $count == 0 && $noborder == 0) { $pdf->SetDrawColor(150); $pdf->SetLineWidth(1); $border = ""; } else { $pdf->SetLineWidth(0.2); $border = 0; } $pdf->Cell($colwidth, $rowheight, $fee_weekly_print, $border, 0, R, true); $count = $count + $colwidth; $x = $pdf->GetX(); $array_total[$arraycount] = $array_total[$arraycount] + $fee_weekly; $array_profit[$arraycount] = $array_profit[$arraycount] + $profit_weekly; $arraycount++; } $pdf->Cell(0, 0, '', 0, 1, L); } $pdf->Cell(0, $rowheight, '', 0, 1, L); //if ((BeginWeek(AssessDays($ts_datum_commence)) + $ts_datum_length) < $ts_fee_conclude) { $color_array = array(255,0,0); } else { unset($color_array); } if ($array_proj['ts_fee_commence'] != $array_proj['ts_datum_commence'] or $array_proj['ts_fee_time_end'] > $array_proj['ts_datum_length']) { $color_array = array(225, 0, 0);