コード例 #1
0
     $bg = 1;
     $pdf->SetFillColor(255, 255, 220);
 } else {
     $bg = 0;
 }
 if ($ts_expense_p11d == "1") {
     $pdf->SetTextColor(255, 0, 255);
 } else {
     $pdf->SetTextColor(0, 0, 0);
 }
 $pdf->SetFont($format_font, '', 7);
 $pdf->Cell(10, 4, $ts_expense_id, 0, 0, L, $bg);
 $pdf->SetFont($format_font, '', 9);
 $pdf->Cell(20, 4, $ts_expense_date, 0, 0, L, $bg);
 $pdf->Cell(15, 4, $proj_num, 0, 0, L, $bg);
 $pdf->MultiCell(55, 4, $ts_expense_desc, 0, L, $bg);
 $max_y = $pdf->GetY();
 $x = $x + 100;
 $y = $y;
 $pdf->SetXY($x, $y);
 $pdf->Cell(20, 4, $ts_expense_verified, 0, 0, L, $bg);
 $pdf->Cell(25, 4, $invoice_ref_print, 0, 0, L, $bg);
 $pdf->Cell(15, 4, $ts_expense_value, 0, 0, R, $bg);
 $pdf->Cell(15, 4, $ts_expense_diff_print, 0, 0, R, $bg);
 $pdf->Cell(15, 4, $ts_expense_vat, 0, 1, R, $bg);
 $x = 10;
 $y = $max_y;
 $expense_total_value = $expense_total_value + $array_expense['ts_expense_value'];
 $expense_total_diff = $expense_total_diff + $ts_expense_diff;
 $expense_total_vat = $expense_total_vat + $array_expense['ts_expense_vat'];
 // Work out the totals for invoiced, non-invoiced values
コード例 #2
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
    $pdf->Rect($current_x, $current_y, 3, 3, F);
    $pdf->Cell(5, 5, "", $border, 0, L, $fill);
    $pdf->Cell(60, 5, $item_name, $border, 0, L, $fill, $checklist_link);
    $pdf->Cell(15, 5, $checklist_required_print, $border, 0, L, $fill);
    $pdf->Cell(30, 5, $checklist_date_print, $border, 0, L, $fill);
    $pdf->Cell(0, 1, '', $border, 2);
    $pdf->MultiCell(80, 3, $checklist_comment, 0, L, $fill);
    $pdf->Cell(0, 1, '', 0, 1);
    $y = $pdf->GetY();
    $group = $item_group;
}
$pdf->SetLineWidth(0.3);
$pdf->Cell(0, 5, '', T, 1, L, 0);
$pdf->SetFont($format_font, '', 8);
$pdf->Cell(0, 5, 'Key:', 0, 1);
$pdf->SetLineWidth(1.5);
$pdf->SetDrawColor(255, 255, 255);
$pdf->SetFont($format_font, '', 7);
$pdf->SetFillColor(245, 190, 72);
$pdf->Cell(5, 5, '', 1, 0, L, true);
$pdf->Cell(25, 5, 'To be confirmed', 0, 0);
$pdf->SetFillColor(245, 72, 72);
コード例 #3
0
$user_name_first = $array_project['user_name_first'];
$user_name_second = $array_project['user_name_second'];
if ($blog_type == "phone") {
    $blog_type_view = "Telephone Call";
} elseif ($blog_type == "filenote") {
    $blog_type_view = "File Note";
} elseif ($blog_type == "meeting") {
    $blog_type_view = "Meeting Note";
} elseif ($blog_type == "email") {
    $blog_type_view = "Email Message";
} else {
    $blog_type_view = NULL;
    $type = 0;
}
$blog_type_view = $blog_type_view . " - " . $user_name_first . " " . $user_name_second;
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 14);
$pdf->SetTextColor(200, 200, 200);
$sheet_subtitle = $proj_num . " " . $proj_name . ", " . TimeFormat($blog_date);
$pdf->Cell(0, 7.5, $sheet_subtitle, 0, 1, L, 0);
$pdf->Cell(0, 7.5, $blog_type_view, 0, 1, L, 0);
$pdf->SetFont($format_font, '', 24);
$pdf->SetTextColor(150, 150, 150);
$pdf->MultiCell(0, 8, $blog_title, 0, L);
$pdf->SetXY(40, 85);
$pdf->SetFont($format_font, '', 11);
$pdf->SetTextColor(0, 0, 0);
$pdf->MultiCell(0, 5, $blog_text, 0, L);
// and send to output
$file_name = $proj_num . "_" . Date("Y", $blog_date) . "-" . Date("m", $blog_date) . "-" . Date("d", $blog_date) . "_" . $blog_type . ".pdf";
$pdf->Output($file_name, I);
コード例 #4
0
 $pdf->Cell(0, 4, "to");
 $pdf->SetXY(105, 80);
 $pdf->Cell(0, 4, "invoice no.");
 $pdf->SetXY(152.5, 80);
 $pdf->Cell(0, 4, "invoice date");
 if ($invoice_purchase_order != NULL) {
     $pdf->SetXY(105, 100);
     $pdf->Cell(0, 4, "purchase order no.");
 }
 // If paid
 if ($invoice_paid > 0 and $viewall == "yes") {
     $paid_text = "Paid " . TimeFormat($invoice_paid);
     $pdf->SetFont('Helvetica', 'B', 30);
     $pdf->SetTextColor(204, 0, 0);
     $pdf->SetXY(10, 10);
     $pdf->MultiCell(190, 15, $paid_text, '', R);
 } elseif ($viewall == "yes") {
     $pdf->SetFont('Helvetica', 'B', 30);
     $pdf->SetTextColor(204, 0, 0);
     $pdf->SetXY(10, 10);
     $pdf->MultiCell(190, 15, "Unpaid", '', R);
 }
 if ($viewall == "yes") {
     $pdf->SetFont('Helvetica', 'B', 16);
     $pdf->SetTextColor(204, 0, 0);
     $pdf->SetXY(10, 20);
     $pdf->MultiCell(190, 15, $account_name, '', R);
 }
 //Heading Titles Text
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetFont($format_font, '', 9);
コード例 #5
0
 $proj_num = $array['proj_num'];
 $proj_name = $array['proj_name'];
 $print_submit_begin = date("l, jS F Y", $_POST[submit_begin]);
 $print_submit_begin = "from " . $print_submit_begin;
 if ($_POST[submit_end] > 0) {
     $print_submit_end = $_POST[submit_end];
 } else {
     $print_submit_end = time();
 }
 $print_submit_end = date("l jS F Y", $print_submit_end);
 if ($_POST[submit_begin] == NULL or $_POST[submit_begin] == 0) {
     $print_submit_begin = "";
 }
 $ts_print_title = "Schedule for " . $proj_num . " " . $proj_name . "," . $print_submit_begin . " to " . $print_submit_end;
 $pdf->SetFont($format_font, '', 12);
 $pdf->MultiCell(0, 6, $ts_print_title, 0, L, 0);
 // Printed by, and on...
 $pdf->SetFont($format_font, '', 12);
 $pdf->SetTextColor(0, 0, 0);
 $sql = "SELECT user_name_first, user_name_second FROM intranet_user_details WHERE user_id = {$_COOKIE['user']}";
 $result = mysql_query($sql, $conn) or die(mysql_error());
 $array = mysql_fetch_array($result);
 $user_name_first = $array['user_name_first'];
 $user_name_second = $array['user_name_second'];
 $pdf->SetFont($format_font, '', 8);
 $printed_on = "Generated " . date("r") . " by " . $user_name_first . " " . $user_name_second;
 $pdf->SetFont($format_font, '', 6);
 $pdf->Cell(0, 4, $printed_on, 0, 1, L, 0);
 $pdf->Ln();
 $legend = "Cost (Fa) = Factored cost\nCost (Ho) = Hourly cost\nCost (Fa Acc) = Factored accumulative cost\nCost (Ho Acc) = Hourly accumulative cost\n";
 $pdf->MultiCell(0, 3, $legend);
コード例 #6
0
            $obsolete_message = "* Drawing obsolete";
        }
        if ($drawing_comment != NULL && $revision_letter != "*") {
            $pdf->Cell(25, 4.5, '', $border, 0, L, $fill, $link);
            $pdf->Cell(0, 4.5, $drawing_comment, $border, 1, L, $fill);
        }
        if ($fill == 1) {
            $fill = 0;
        } else {
            $fill = 1;
        }
    }
    $current_drawing = $drawing_id;
    $current_type = $this_type;
}
$pdf->SetLineWidth(0.3);
$pdf->Cell(0, 5, '', T, 1, L, 0);
if ($not_issued != NULL) {
    $pdf->Cell(0, 5, $not_issued, 0, 1, R);
}
if ($obsolete_message != NULL) {
    $pdf->MultiCell(0, 5, $obsolete_message, 0, 1, R);
}
// If development code = "yes" (devcode = "yes") in the $_GET request, include some additional data
if ($_GET[devcode] == "yes") {
    $pdf->MultiCell(0, 4, $sql_drawings);
}
// and send to output
$file_date = time();
$file_name = $proj_num . "_2.05_" . Date("Y", $file_date) . "-" . Date("m", $file_date) . "-" . Date("d", $file_date) . "_Drawing_Schedule.pdf";
$pdf->Output($file_name, I);
コード例 #7
0
 $pdf->SetAutoPageBreak(0, 1.5);
 $pdf->AddFont($format_font, '', $format_font_2);
 // Page headers
 $project_counter = 1;
 $page_count = 1;
 $pdf->SetY(35);
 $pdf->SetFont('Helvetica', 'b', 24);
 $pdf->SetTextColor($format_bg_r, $format_bg_g, $format_bg_b);
 $pdf->Cell(0, 10, "Timesheet Analysis");
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetY(50);
 $pdf->SetFont('Helvetica', 'b', 18);
 $print_title = "Generated " . TimeFormatDetailed(time());
 $print_envelope = "Timesheet Datum: " . TimeFormat($settings_timesheetstart);
 $pdf->SetFillColor(220, 220, 220);
 $pdf->MultiCell(0, 8, $print_title, 0, L, 0);
 $pdf->SetFont('Helvetica', 'b', 12);
 $pdf->MultiCell(0, 5, $print_envelope, 0, L, 0);
 $pdf->MultiCell(0, 5, $print_profit_text, 0, L, 0);
 $pdf->Cell(0, 5, '', 0, 2);
 $pdf->SetFont($format_font, '', 10);
 $pdf->SetTextColor(0, 0, 0);
 // Array through the projects and fee stages
 $bar_width_standard = 130;
 $effectively_zero = 0.1;
 // Sets the minimum bar size if the quantity is zero
 $page_number = 0;
 $complete_profit_total = 0;
 $complete_fee_total = 0;
 $complete_cost_total = 0;
 // Establish the maximum fee for all projects by sorting an array
コード例 #8
0
$result = mysql_query($sql, $conn) or die(mysql_error());
$array = mysql_fetch_array($result);
$proj_num = $array['proj_num'];
$proj_name = $array['proj_name'];
$proj_desc = $array['proj_desc'];
$proj_address_1 = $array['proj_address_1'];
$proj_address_2 = $array['proj_address_2'];
$proj_address_3 = $array['proj_address_3'];
$proj_address_town = $array['proj_address_town'];
$proj_address_county = $array['proj_address_county'];
$proj_address_postcode = $array['proj_address_postcode'];
$proj_client_contact_id = $array['proj_client_contact_id'];
$proj_planning_ref = $array['proj_planning_ref'];
$proj_buildingcontrol_ref = $array['proj_buildingcontrol_ref'];
$print_title = $proj_num . " " . $proj_name;
$pdf->MultiCell(0, 8, $print_title, 0, L, 0);
// Printed by, and on...
$pdf->SetFont($format_font, '', 10);
$sql = "SELECT user_name_first, user_name_second FROM intranet_user_details WHERE user_id = {$_COOKIE['user']}";
$result = mysql_query($sql, $conn) or die(mysql_error());
$array = mysql_fetch_array($result);
$user_name_first = $array['user_name_first'];
$user_name_second = $array['user_name_second'];
$printed_on = "Current at " . date("g:ia, j F Y");
$pdf->Cell(0, 6, $printed_on, 0, 1, L, 0);
$pdf->SetFillColor(255, 255, 255);
$y_current = 70;
$x_current = 10;
// Project Address
$proj_address = $proj_address . AddLine($proj_address_1);
$proj_address = $proj_address . AddLine($proj_address_2);
コード例 #9
0
     $pdf->SetTextColor(0, 0, 200);
 } elseif ($_POST[marketing] == 0 and $contact_include == 2 and $contact_email != NULL) {
     $address_go = $contact_namefirst . " " . $contact_namesecond . "\n" . $company_name_inc . $contact_email;
 } elseif ($_POST[marketing] == 2 and $contact_include == 2) {
     $address_go = $contact_namefirst . " " . $contact_namesecond . "\n" . $company_name_inc . $contact_email;
     $pdf->SetTextColor(0, 0, 0);
 } elseif ($_POST[marketing] == 0 and $contact_include == 0) {
     $pdf->SetTextColor(200, 200, 200);
 } else {
     $pdf->SetTextColor(0, 0, 0);
 }
 if ($_POST[marketing] == 2 and $contact_email == NULL) {
     $pdf->SetTextColor(255, 0, 0);
 }
 $pdf->SetXY($cell_x, $cell_y);
 $pdf->MultiCell($label_c, $label_k, $address_go, 0, 'L');
 $count_cells++;
 $count_columns++;
 if ($count_columns > $label_g) {
     $x = $label_e;
     $y = $y + $label_b;
     $count_columns = 1;
 } else {
     $x = $x + $label_a;
 }
 $count++;
 // Add new page if required
 if ($page_count == $total_cells) {
     $pdf->AddPage();
     if ($import_template == "1") {
         $pdf->setSourceFile("library/background.pdf");
コード例 #10
0
} else {
    unset($s1);
}
if ($_GET[s2] > 0) {
    $s2 = intval($_GET[s2]);
    $section = "Section " . $_GET[s1] . "." . $_GET[s2] . " only - " . $qms_firstpage;
    $s2 = " AND qms_toc2 = {$s2} ";
} else {
    unset($s2);
}
$pdf->AddFont($format_font, '', $format_font_2);
$pdf->SetXY(10, 175);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFillColor(220, 220, 220);
$pdf->SetFont('Helvetica', '', 18);
$pdf->MultiCell(0, 10, $settings_companyname, 0, L);
$pdf->SetFont('Helvetica', 'B', 32);
$pdf->MultiCell(0, 20, 'Quality Management System', 0, L);
$pdf->SetFont($format_font, '', 14);
$printed_date = "Current at " . date("g.ia, jS F Y", time());
$pdf->MultiCell(0, 25, '', 0, L);
$pdf->MultiCell(0, 8, $printed_date, 0, L);
$pdf->SetLineWidth(0.1);
$pdf->SetFont($format_font, '', 11);
$width = $pdf->GetStringWidth($printed_date) + 20;
if ($s1 != NULL or $s2 != NULL) {
    $pdf->MultiCell(0, 8, $section, T, L);
}
$sql = "SELECT * FROM intranet_qms {$s1} {$s2} ORDER BY qms_toc1, qms_toc2, qms_toc3, qms_toc4";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($array = mysql_fetch_array($result)) {
コード例 #11
0
     $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);
 $pdf->Cell(15, $cellheight, $ts_expense_value, 0, 0, R, $bg);
コード例 #12
0
        $pdf->SetXY($x, $y);
        $pdf->SetTextColor(0, 0, 0);
        $pdf->SetFont($format_font, '', 10);
        $year = date("Y", $invoice_date) . " Total";
        $pdf->Cell(130, 5, $year, 'T');
        $invoice_year_novat_print = CashFormat($invoice_year_novat);
        $invoice_year_vat_print = CashFormat($invoice_year_vat);
        $pdf->Cell(30, 5, $invoice_year_novat_print, 'T', 0, 'R');
        $pdf->Cell(30, 5, $invoice_year_vat_print, 'T', 0, 'R');
        $invoice_year_novat = 0;
        $invoice_year_vat = 0;
        $y = $y + 10;
        $pdf->SetXY($x, $y);
    }
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetFont($format_font, '', 10);
    $pdf->Cell(130, 5, "TOTAL", 'T');
    $invoice_item_novat_total_all_print = CashFormat($invoice_value_novat_total_all);
    $invoice_item_vat_total_all_print = CashFormat($invoice_value_vat_total_all);
    $pdf->Cell(30, 5, $invoice_item_novat_total_all_print, 'T', 0, 'R');
    $pdf->Cell(30, 5, $invoice_item_vat_total_all_print, 'T', 0, 'R');
    // And the smallprint
    $y = $y + 15;
    $smallprint = "Notes:\nOverdue invoices are highlighted in red.\nAll figures exclude expenses.";
    $pdf->SetXY(10, $y);
    $pdf->SetFont($format_font, '', 9);
    $pdf->MultiCell(140, 3.75, $smallprint);
    // and send to output
    $file_name = "Invoice_Schedule_" . Date("Y", time()) . "-" . Date("m", time()) . "-" . Date("d", time()) . ".pdf";
    $pdf->Output($file_name, I);
}
コード例 #13
0
 if ($ts_expense_invoiced == NULL) {
     $ts_expense_invoiced = 0;
 }
 if ($_POST[include_p11d] == "both" and $ts_expense_p11d == 1) {
     $pdf->SetFillColor(255, 210, 150);
     $bg = 1;
 } else {
     $pdf->SetFillColor(255, 255, 255);
     $bg = 0;
 }
 $pdf->SetFont($format_font, '', 7);
 $pdf->Cell(10, 4, $ts_expense_id, 0, 0, L, $bg);
 $pdf->SetFont($format_font, '', 9);
 $pdf->Cell(20, 4, $ts_expense_date, 0, 0, L, $bg);
 $pdf->Cell(15, 4, $proj_num, 0, 0, L, $bg);
 $pdf->MultiCell(55, 4, $ts_expense_desc, 0, L, $bg);
 $max_y = $pdf->GetY();
 $x = $x + 100;
 $y = $y;
 $pdf->SetXY($x, $y);
 $pdf->Cell(20, 4, $ts_expense_verified, 0, 0, L, $bg);
 $pdf->Cell(25, 4, $invoice_ref_print, 0, 0, L, $bg);
 $pdf->Cell(15, 4, $ts_expense_value, 0, 0, R, $bg);
 $pdf->Cell(15, 4, $ts_expense_diff_print, 0, 0, R, $bg);
 $pdf->Cell(15, 4, $ts_expense_vat, 0, 1, R, $bg);
 $x = 10;
 $y = $max_y;
 $expense_total_value = $expense_total_value + $array_expense['ts_expense_value'];
 $expense_total_diff = $expense_total_diff + $ts_expense_diff;
 $expense_total_vat = $expense_total_vat + $array_expense['ts_expense_vat'];
 // Work out the totals for invoiced, non-invoiced values
コード例 #14
0
     $revision_letter = "-";
 }
 if ($array_drawings['revision_date'] != 0) {
     $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);
コード例 #15
0
 $ts_expense_value = CashFormat($array_expense['ts_expense_value']);
 $ts_expense_vat = CashFormat($array_expense['ts_expense_vat']);
 $ts_expense_receipt = $array_expense['ts_expense_receipt'];
 $ts_expense_reimburse = $array_expense['ts_expense_reimburse'];
 $proj_num = $array_expense['proj_num'];
 if ($ts_expense_reimburse != 1) {
     $pdf->SetTextColor(150);
 } else {
     $pdf->SetTextColor(0);
 }
 $pdf->SetFont($format_font, '', 7);
 $pdf->Cell(10, 5, $ts_expense_id, 0, 0, L);
 $pdf->SetFont($format_font, '', 9);
 $pdf->Cell(20, 5, $ts_expense_date, 0, 0, L);
 $pdf->Cell(15, 5, $proj_num, 0, 0, L);
 $pdf->MultiCell(100, 5, $ts_expense_desc, 0, L);
 $max_y = $pdf->GetY();
 $x = $x + 145;
 $y = $y;
 $pdf->SetXY($x, $y);
 $pdf->Cell(15, 5, $ts_expense_value, 0, 0, R);
 $pdf->Cell(15, 5, $ts_expense_diff_print, 0, 0, R);
 $pdf->Cell(15, 5, $ts_expense_vat, 0, 1, R);
 $x = 10;
 $y = $max_y;
 if ($ts_expense_reimburse == 1) {
     $expense_total_value = $expense_total_value + $array_expense['ts_expense_value'];
     $expense_total_diff = $expense_total_diff + $ts_expense_diff;
     $expense_total_vat = $expense_total_vat + $array_expense['ts_expense_vat'];
     // Work out the totals for invoiced, non-invoiced values
     if ($ts_expense_invoiced > 0) {