www/prod_r_efficiency.php

Wed, 14 Jul 2021 20:51:45 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 14 Jul 2021 20:51:45 +0200
changeset 772
f9d266eb0ec6
parent 452
4dbfa131d173
permissions
-rw-r--r--

In product editor calculate fermentables before the first IBU calculation. In recipe editor changed to the new water calculations like in the product editor.

452
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 <?php
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 if (! $link) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 if (! mysqli_set_charset($link, "utf8" )) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 echo "error";
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 return 1;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 setlocale ( LC_ALL, 'nl_NL.UTF-8');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 date_default_timezone_set('Europe/Amsterdam');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 $prdate = date(DATE_RFC2822);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 class PDF_MySQL_Table extends FPDF
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 protected $ProcessingTable=false;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 protected $aCols=array();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 protected $TableX;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 function Header() {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 // Print the table header if necessary
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 if ($this->ProcessingTable)
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 $this->TableHeader();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 function TableHeader() {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 $this->SetFont('Helvetica','B',9);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 $this->SetX($this->TableX);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 $this->SetFillColor(255,150,100);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 foreach($this->aCols as $col)
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 $this->Ln();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 function AddCol($width=-1, $caption='', $align='L') {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 function TableTotals() {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 global $link;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 $vul = $this->w - $this->rMargin - $this->lMargin - 128;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 $this->AddCol(18,'Code','L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 $this->AddCol($vul,'Naam','L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53 $this->AddCol(30,'Bier stijl','L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 $this->AddCol(20,'Max extract','R');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 $this->AddCol(20,'Maish eff.','R');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 $this->AddCol(20,'Spoel eff.','R');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57 $this->AddCol(20,'Kook eff.','R');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59 $cMargin=$this->cMargin;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60 $this->cMargin=2;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 $this->TableX=$this->lMargin;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62 $this->TableHeader();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 $this->ProcessingTable=true;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
65 $this->SetFont('Helvetica','',9);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66 $this->SetFillColor(210,245,255);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 $result = mysqli_query($link, "SELECT * FROM products WHERE package_date AND type='2' ORDER BY code");
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70 /*
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71 * Data is not always available, try to calculate the mssing pieces.
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 */
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 $mvol = 0;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 $msugars = 0; // mash sugars
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 $ssugars = 0;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76 $arr = json_decode($row['json_mashs'], true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 foreach($arr as $item) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 if ($item['step_type'] == 0)
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 $mvol += $item['step_infuse_amount'];
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 $ferms = json_decode($row['json_fermentables'], true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 foreach($ferms as $item) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 if ($item['f_added'] == 0) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 $d = $item['f_amount'] * ($item['f_yield'] / 100) * (1 - $item['f_moisture'] / 100);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86 $ssugars += $item['f_amount'];
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 $mvol += $item['f_amount'] * $item['f_moisture'] / 100;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 $msugars += $d;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91 $sugardensity = 1.611;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 $v = $msugars / $sugardensity + $mvol;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 $plato = 1000 * $msugars / ($v * 10); // deg. Plato
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 $mash_efficiency = floatval($row['brew_mash_efficiency']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 $mash_sg = floatval($row['brew_mash_sg']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 if (($mash_efficiency == 0) && ($mash_sg > 1)) {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 $mash_efficiency = 100 * sg_to_plato($mash_sg) / $plato;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 $mash_extract = 100 * $msugars / $ssugars;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 $preboil_sg = floatval($row['brew_preboil_sg']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 $preboil_volume = floatval($row['brew_preboil_volume']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 $est_preboil_plato = sg_to_plato($preboil_sg) * ($preboil_volume / 1.04) * $preboil_sg * 10 / 1000;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 $preboil_efficiency = floatval($row['brew_preboil_efficiency']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 if (($msugars > 0) && ($preboil_efficiency == 0))
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 $preboil_efficiency = $est_preboil_plato / $msugars * 100;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 if ($preboil_efficiency < 0)
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107 $preboil_efficiency = 0;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 $aboil_efficiency = floatval($row['brew_aboil_efficiency']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 $name = iconv('UTF-8','windows-1252',$row['name']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 $st_name = iconv('UTF-8','windows-1252',$row['st_name']);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 $this->SetX($this->TableX);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113 $this->Cell(18,5,$row['code'],0,0,'L',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 $this->Cell($vul,5,$name,0,0,'L',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 $this->Cell(30,5,$st_name,0,0,'L',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 $this->Cell(20,5,sprintf("%.1f",$mash_extract).'%',0,0,'R',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 $this->Cell(20,5,sprintf("%.1f",$mash_efficiency).'%',0,0,'R',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 $this->Cell(20,5,sprintf("%.1f",$preboil_efficiency).'%',0,0,'R',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 $this->Cell(20,5,sprintf("%.1f",$aboil_efficiency).'%',0,0,'R',true);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 $this->Ln();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
121 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 $this->ProcessingTable=false;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 $this->cMargin=$cMargin;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
124 $this->aCols=array();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125 $this->Ln();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 class PDF extends PDF_MySQL_Table {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 function Header() {
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 global $prdate;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 global $my_brewery_name;
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135 $this->Image('images/logo.png',10,10,30);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 // Title
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
137 $this->SetFont('Helvetica','B',18);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
138 $this->SetX(45);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 $this->Cell(0,8,"Efficientie ".$my_brewery_name,0,1,'L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 $this->Ln(1);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
141 $this->SetFont('Helvetica','',10);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142 $this->SetX(45);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 $this->Cell(17,5,'Datum:',0,0,'L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 $this->Cell(0,5,$prdate,0,1,'L');
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 $this->Ln(20);
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146 // Ensure table header is printed
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147 parent::Header();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
148 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
149 }
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
150
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
151
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
153 /*
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
154 * Generate PDF
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
155 */
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 $pdf = new PDF();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
157 $pdf->AddPage();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158 $pdf->TableTotals();
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159 $pdf->Output();

mercurial