www/rec_print.php

changeset 94
295c3af2a421
parent 93
357d59d8ec5e
child 96
107c12c3e49d
equal deleted inserted replaced
93:357d59d8ec5e 94:295c3af2a421
27 $pSugar = 0; 27 $pSugar = 0;
28 $pCara = 0; 28 $pCara = 0;
29 $svg = 77; 29 $svg = 77;
30 $colorw = 0; 30 $colorw = 0;
31 $total_ibus = 0; 31 $total_ibus = 0;
32 32 $preboil_sg = 0;
33 33
34 class PDF_MySQL_Table extends FPDF 34 class PDF_MySQL_Table extends FPDF
35 { 35 {
36 protected $ProcessingTable=false; 36 protected $ProcessingTable=false;
37 protected $aCols=array(); 37 protected $aCols=array();
94 global $cost_fermentables; 94 global $cost_fermentables;
95 global $total_fermentables; 95 global $total_fermentables;
96 global $pSugar; 96 global $pSugar;
97 global $pCara; 97 global $pCara;
98 global $colorw; 98 global $colorw;
99 global $preboil_sg;
99 $vul = $this->w - $this->rMargin - $this->lMargin - 132; 100 $vul = $this->w - $this->rMargin - $this->lMargin - 132;
100 $this->AddCol($vul,'Grondstof','L'); 101 $this->AddCol($vul,'Grondstof','L');
101 $this->AddCol(30,'Leverancier','L'); 102 $this->AddCol(30,'Leverancier','L');
102 $this->AddCol(15,'EBC','R'); 103 $this->AddCol(15,'EBC','R');
103 $this->AddCol(17,'Moment','L'); 104 $this->AddCol(17,'Moment','L');
154 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); 155 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true);
155 $this->Ln(); 156 $this->Ln();
156 } 157 }
157 158
158 $row['est_og'] = estimate_og($sugf, floatval($row['batch_size'])); 159 $row['est_og'] = estimate_og($sugf, floatval($row['batch_size']));
160 $preboil_sg = estimate_og($sugf, floatval($row['boil_size']));
159 $this->SetFillColor(210,245,255); 161 $this->SetFillColor(210,245,255);
160 $this->Cell($vul+62,5,'',0,0,'L',false); 162 $this->Cell($vul+62,5,'',0,0,'L',false);
161 $this->Cell(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true); 163 $this->Cell(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true);
162 $this->Cell(30,5,'',0,0,'L',false); 164 $this->Cell(30,5,'',0,0,'L',false);
163 $this->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true); 165 $this->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true);
169 171
170 function TableHops($row) { 172 function TableHops($row) {
171 global $total_hops; 173 global $total_hops;
172 global $total_ibus; 174 global $total_ibus;
173 global $cost_hops; 175 global $cost_hops;
176 global $preboil_sg;
174 $vul = $this->w - $this->rMargin - $this->lMargin - 135; 177 $vul = $this->w - $this->rMargin - $this->lMargin - 135;
175 $this->AddCol($vul,'Hop','L'); 178 $this->AddCol($vul,'Hop','L');
176 $this->AddCol(35,'Land','L'); 179 $this->AddCol(35,'Land','L');
177 $this->AddCol(15,'Soort','L'); 180 $this->AddCol(15,'Soort','L');
178 $this->AddCol(20,'Moment','L'); 181 $this->AddCol(20,'Moment','L');
208 211
209 $moment = hop_useat_names($useat); 212 $moment = hop_useat_names($useat);
210 if ($useat == "Boil") { 213 if ($useat == "Boil") {
211 $moment = "Kook@".$time; 214 $moment = "Kook@".$time;
212 } 215 }
213 $ibu = calc_IBU($useat, $form, floatval($row['est_og']), floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); 216 $ibu = calc_IBU($useat, $form, /*floatval($row['est_og'])*/ $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']);
214 $total_ibus += $ibu; 217 $total_ibus += $ibu;
215 218
216 $this->Cell($vul,5,$name,0,0,'L',true); 219 $this->Cell($vul,5,$name,0,0,'L',true);
217 $this->Cell(35,5,$origin,0,0,'L',true); 220 $this->Cell(35,5,$origin,0,0,'L',true);
218 $this->Cell(15,5,hop_form_names($form),0,0,'L',true); 221 $this->Cell(15,5,hop_form_names($form),0,0,'L',true);

mercurial