Mon, 04 Feb 2019 15:21:49 +0100
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
165 | 1 | <?php |
2 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); | |
3 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); | |
4 | require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); | |
5 | ||
6 | ||
7 | $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
8 | if (! $link) { | |
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); | |
10 | } | |
11 | if (! mysqli_set_charset($link, "utf8" )) { | |
12 | echo "error"; | |
13 | return 1; | |
14 | } | |
15 | ||
16 | setlocale ( LC_ALL, 'nl_NL.UTF-8'); | |
17 | $record = $_GET["record"]; | |
18 | $result = mysqli_query($link, "SELECT * FROM products WHERE record='".$record."'"); | |
19 | $row = mysqli_fetch_array($result); | |
20 | ||
21 | $total_fermentables = 0.0; | |
22 | $cost_fermentables = 0.0; | |
23 | $total_hops = 0.0; | |
24 | $cost_hops = 0.0; | |
25 | $cost_yeasts = 0.0; | |
26 | $cost_miscs = 0.0; | |
27 | $pSugar = 0; | |
28 | $pCara = 0; | |
29 | $svg = 77; | |
30 | $colorw = 0; | |
31 | $total_ibus = 0; | |
32 | $preboil_sg = 0; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
33 | date_default_timezone_set('Europe/Amsterdam'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
34 | $prdate = date(DATE_RFC2822); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
35 | |
165 | 36 | |
37 | class PDF_MySQL_Table extends FPDF | |
38 | { | |
39 | protected $ProcessingTable=false; | |
40 | protected $aCols=array(); | |
41 | protected $TableX; | |
42 | ||
43 | function Header() { | |
44 | // Print the table header if necessary | |
45 | if ($this->ProcessingTable) | |
46 | $this->TableHeader(); | |
47 | } | |
48 | ||
49 | function TableHeader() { | |
50 | $this->SetFont('Helvetica','B',9); | |
51 | $this->SetX($this->TableX); | |
52 | $this->SetFillColor(255,150,100); | |
53 | foreach($this->aCols as $col) | |
54 | $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true); | |
55 | $this->Ln(); | |
56 | } | |
57 | ||
58 | function AddCol($width=-1, $caption='', $align='L') { | |
59 | $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); | |
60 | } | |
61 | ||
62 | function TableGlobal($row) { | |
63 | /* 2 Columns */ | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
64 | $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); |
165 | 65 | $vul = $this->w - $this->rMargin - $this->lMargin - 160; |
66 | $cMargin=$this->cMargin; | |
67 | $this->cMargin=2; | |
68 | $this->TableX=$this->lMargin; | |
69 | $this->SetFont('Helvetica','B',9); | |
70 | $this->SetX($this->TableX); | |
71 | $this->SetFillColor(255,150,100); | |
72 | $this->Cell(0, 5, 'Recept overzicht',0,0,'C',true); | |
73 | $this->Ln(); | |
74 | ||
75 | $this->SetFont('Helvetica','',9); | |
76 | $this->SetFillColor(210,245,255); | |
77 | ||
78 | $this->SetX($this->TableX); | |
79 | $this->Cell(35,5,'Type',0,0,'L',true); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
80 | $this->Cell(45,5,$recipetype[$row['type']],0,0,'L',true); |
165 | 81 | $this->Cell($vul,5,'',0,0,'L',false); |
82 | $this->Cell(35,5,'Batch grootte',0,0,'L',true); | |
83 | $this->Cell(45,5,$row['batch_size'].' liter',0,0,'L',true); | |
84 | $this->Ln(); | |
85 | ||
86 | $this->SetX($this->TableX); | |
87 | $this->Cell(35,5,'Kooktijd',0,0,'L',true); | |
88 | $this->Cell(45,5,$row['boil_time'].' minuten',0,0,'L',true); | |
89 | $this->Cell($vul,5,'',0,0,'L',false); | |
90 | $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true); | |
91 | $this->Cell(45,5,$row['efficiency'].' %',0,0,'L',true); | |
92 | $this->Ln(); | |
93 | ||
94 | $this->SetX($this->TableX); | |
95 | $this->Cell(35,5,'Bierstijl',0,0,'L',true); | |
96 | $this->Cell(45,5,$row['st_name'],0,0,'L',true); | |
97 | $this->Cell($vul,5,'',0,0,'L',false); | |
98 | $this->Cell(35,5,'Installatie',0,0,'L',true); | |
99 | $this->Cell(45,5,$row['eq_name'],0,0,'L',true); | |
100 | $this->Ln(10); | |
101 | ||
102 | $this->cMargin=$cMargin; | |
103 | } | |
104 | ||
105 | function TableFermentables($row) { | |
106 | global $cost_fermentables; | |
107 | global $total_fermentables; | |
108 | global $pSugar; | |
109 | global $pCara; | |
110 | global $colorw; | |
111 | global $preboil_sg; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
112 | $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); |
165 | 113 | $vul = $this->w - $this->rMargin - $this->lMargin - 132; |
114 | $this->AddCol($vul,'Grondstof','L'); | |
115 | $this->AddCol(30,'Leverancier','L'); | |
116 | $this->AddCol(15,'EBC','R'); | |
117 | $this->AddCol(17,'Moment','L'); | |
118 | $this->AddCol(20,'Kg','R'); | |
119 | $this->AddCol(15,'Procent','R'); | |
120 | $this->AddCol(15,'Opbr.','R'); | |
121 | $this->AddCol(20,'Prijs','R'); | |
122 | ||
123 | $cMargin=$this->cMargin; | |
124 | $this->cMargin=2; | |
125 | $this->TableX=$this->lMargin; | |
126 | $this->TableHeader(); | |
127 | $this->ProcessingTable=true; | |
128 | ||
129 | $sugarsf = 0; | |
130 | $sugarsm = 0; | |
131 | $this->SetFont('Helvetica','',9); | |
132 | $this->SetFillColor(250, 195, 65); | |
133 | $arr = json_decode($row['json_fermentables'], true); | |
134 | foreach($arr as $item) { //foreach element in $arr | |
135 | $name = iconv('UTF-8','windows-1252',$item['f_name']); | |
136 | $supplier = iconv('UTF-8','windows-1252',$item['f_supplier']); | |
137 | $amount = floatval($item['f_amount']); | |
138 | $costkg = floatval($item['f_cost']); | |
139 | $yield = floatval($item['f_yield']); | |
140 | $moisture = floatval($item['f_moisture']); | |
141 | $color = floatval($item['f_color']); | |
142 | $percent = floatval($item['f_percentage']); | |
143 | ||
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
144 | if ($item['f_type'] == 1) // Sugar |
165 | 145 | $pSugar += $percent; |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
146 | if ($item['f_graintype'] == 2) // Crystal |
165 | 147 | $pCara += $percent; |
148 | ||
149 | $cost = $amount * $costkg; | |
150 | $cost_fermentables += $cost; | |
151 | $total_fermentables += $amount; | |
152 | /* Calculate the amount of sugars */ | |
153 | $d = $amount * ($yield / 100) * (1 - $moisture / 100); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
154 | if ($item['f_added'] == 0) { |
165 | 155 | $d = floatval($row['efficiency']) / 100 * $d; |
156 | $sugarsm += $d; | |
157 | } | |
158 | $sugarsf += $d; | |
159 | $colorw += ($amount * ebc_to_srm($color) / $row['batch_size']) * 8.34436; | |
160 | ||
161 | $this->Cell($vul,5,$name,0,0,'L',true); | |
162 | $this->Cell(30,5,$supplier,0,0,'L',true); | |
163 | $this->Cell(15,5,sprintf("%.0f",$color),0,0,'R',true); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
164 | $this->Cell(17,5,$added[$item['f_added']],0,0,'L',true); |
165 | 165 | $this->Cell(20,5,sprintf("%8.3f",$amount),0,0,'R',true); |
166 | $this->Cell(15,5,sprintf("%.1f%%",$percent),0,0,'R',true); | |
167 | $this->Cell(15,5,sprintf("%.1f%%",$yield),0,0,'R',true); | |
168 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
169 | $this->Ln(); | |
170 | } | |
171 | ||
172 | $row['est_og'] = estimate_sg($sugarsf, floatval($row['batch_size'])); | |
173 | $preboil_sg = estimate_sg($sugarsm, floatval($row['boil_size'])); | |
174 | $this->SetFillColor(210,245,255); | |
175 | $this->Cell($vul+62,5,'',0,0,'L',false); | |
176 | $this->Cell(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true); | |
177 | $this->Cell(30,5,'',0,0,'L',false); | |
178 | $this->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true); | |
179 | $this->Ln(10); | |
180 | $this->ProcessingTable=false; | |
181 | $this->cMargin=$cMargin; | |
182 | $this->aCols=array(); | |
183 | } | |
184 | ||
185 | function TableHops($row) { | |
186 | global $total_hops; | |
187 | global $total_ibus; | |
188 | global $cost_hops; | |
189 | global $preboil_sg; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
190 | $hopform = array( 'Pellets', 'Plugs', 'Bellen' ); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
191 | $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); |
165 | 192 | $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
193 | $this->AddCol($vul,'Hop','L'); | |
194 | $this->AddCol(35,'Land','L'); | |
195 | $this->AddCol(15,'Soort','L'); | |
196 | $this->AddCol(20,'Moment','L'); | |
197 | $this->AddCol(15,'Alpha','R'); | |
198 | $this->AddCol(12,'IBU','R'); | |
199 | $this->AddCol(18,'Gram','R'); | |
200 | $this->AddCol(20,'Prijs','R'); | |
201 | ||
202 | $cMargin=$this->cMargin; | |
203 | $this->cMargin=2; | |
204 | $this->TableX=$this->lMargin; | |
205 | $this->TableHeader(); | |
206 | $this->ProcessingTable=true; | |
207 | ||
208 | $this->SetFont('Helvetica','',9); | |
209 | $this->SetFillColor(100, 250, 65); | |
210 | ||
211 | $arr = json_decode($row['json_hops'], true); | |
212 | foreach($arr as $item) { //foreach element in $arr | |
213 | $name = iconv('UTF-8','windows-1252',$item['h_name']); | |
214 | $origin = iconv('UTF-8','windows-1252',$item['h_origin']); | |
215 | $amount = floatval($item['h_amount']) * 1000; | |
216 | $mass = $amount; | |
217 | $costkg = floatval($item['h_cost']); | |
218 | $time = floatval($item['h_time']); | |
219 | $alpha = floatval($item['h_alpha']); | |
220 | ||
221 | $cost = ($amount * $costkg) / 1000; | |
222 | $cost_hops += $cost; | |
223 | $total_hops += $amount; | |
224 | ||
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
225 | $moment = $hopuse[$item['h_useat']]; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
226 | if ($item['h_useat'] == 2) { // Boil |
165 | 227 | $moment = "Kook@".$time; |
228 | } | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
229 | $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); |
165 | 230 | $total_ibus += $ibu; |
231 | ||
232 | $this->Cell($vul,5,$name,0,0,'L',true); | |
233 | $this->Cell(35,5,$origin,0,0,'L',true); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
234 | $this->Cell(15,5,$hopform[$item['h_form']],0,0,'L',true); |
165 | 235 | $this->Cell(20,5,$moment,0,0,'L',true); |
236 | $this->Cell(15,5,sprintf("%.1f%%",$alpha),0,0,'R',true); | |
237 | $this->Cell(12,5,sprintf("%.1f",$ibu),0,0,'R',true); | |
238 | $this->Cell(18,5,sprintf("%.1f",$amount),0,0,'R',true); | |
239 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
240 | $this->Ln(); | |
241 | } | |
242 | ||
243 | $this->SetFillColor(210,245,255); | |
244 | $this->Cell($vul+85,5,'',0,0,'L',false); | |
245 | $this->Cell(12,5,sprintf("%.1f",$total_ibus),0,0,'R',true); | |
246 | $this->Cell(18,5,sprintf("%.1f",$total_hops),0,0,'R',true); | |
247 | $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true); | |
248 | $this->Ln(10); | |
249 | $this->ProcessingTable=false; | |
250 | $this->cMargin=$cMargin; | |
251 | $this->aCols=array(); | |
252 | } | |
253 | ||
254 | function TableYeasts($row) { | |
255 | global $cost_yeasts; | |
256 | global $svg; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
257 | $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
258 | $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); |
165 | 259 | $vul = $this->w - $this->rMargin - $this->lMargin - 140; |
260 | $this->AddCol(27,'Laboratorium','L'); | |
261 | $this->AddCol(18,'Product','L'); | |
262 | $this->AddCol($vul,'Gist','L'); | |
263 | $this->AddCol(20,'Gebruik','L'); | |
264 | $this->AddCol(15,'Attn','R'); | |
265 | $this->AddCol(22,'Vorm','L'); | |
266 | $this->AddCol(18,'Gram','R'); | |
267 | $this->AddCol(20,'Prijs','R'); | |
268 | ||
269 | $cMargin=$this->cMargin; | |
270 | $this->cMargin=2; | |
271 | $this->TableX=$this->lMargin; | |
272 | $this->TableHeader(); | |
273 | $this->ProcessingTable=true; | |
274 | ||
275 | $this->SetFont('Helvetica','',9); | |
276 | $this->SetFillColor(175, 175, 255); | |
277 | ||
278 | $arr = json_decode($row['json_yeasts'], true); | |
279 | foreach($arr as $item) { //foreach element in $arr | |
280 | $name = iconv('UTF-8','windows-1252',$item['y_name']); | |
281 | $laboratory = iconv('UTF-8','windows-1252',$item['y_laboratory']); | |
282 | $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']); | |
283 | $attenuation = floatval($item['y_attenuation']); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
284 | $cost = floatval($item['y_amount']) * floatval($item['y_cost']); |
165 | 285 | $cost_yeasts += $cost; |
286 | ||
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
287 | if ($item['y_use'] == 0) // Primary |
165 | 288 | $svg = $attenuation; |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
289 | if ($item['y_form'] == 0) // Liquid |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
290 | $amount = sprintf("%.0f",floatval($item['y_amount']))." pak"; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
291 | else if ($item['y_form'] == 1) // Dry |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
292 | $amount = sprintf("%.1f",floatval($item['y_amount'])*1000)." gr"; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
293 | else |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
294 | $amount = sprintf("%.0f",floatval($item['y_amount'])*1000)." ml"; |
165 | 295 | |
296 | $this->Cell(27,5,$laboratory,0,0,'L',true); | |
297 | $this->Cell(18,5,$product_id,0,0,'L',true); | |
298 | $this->Cell($vul,5,$name,0,0,'L',true); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
299 | $this->Cell(20,5,$yeastuse[$item['y_use']],0,0,'L',true); |
165 | 300 | $this->Cell(15,5,sprintf("%.1f%%",$attenuation),0,0,'R',true); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
301 | $this->Cell(22,5,$yeastform[$item['y_form']],0,0,'L',true); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
302 | $this->Cell(18,5,$amount,0,0,'R',true); |
165 | 303 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
304 | $this->Ln(); | |
305 | } | |
306 | ||
307 | $this->SetFillColor(210,245,255); | |
308 | $this->Cell($vul+120,5,'',0,0,'L',false); | |
309 | $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true); | |
310 | $this->Ln(10); | |
311 | $this->ProcessingTable=false; | |
312 | $this->cMargin=$cMargin; | |
313 | $this->aCols=array(); | |
314 | } | |
315 | ||
316 | function TableMiscs($row) { | |
317 | global $cost_miscs; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
318 | $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
319 | $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
320 | $vul = $this->w - $this->rMargin - $this->lMargin - 100; |
165 | 321 | $this->AddCol($vul,'Naam','L'); |
322 | $this->AddCol(30,'Soort','L'); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
323 | $this->AddCol(30,'Gebruik','L'); |
165 | 324 | $this->AddCol(20,'Hoeveel','R'); |
325 | $this->AddCol(20,'Prijs','R'); | |
326 | ||
327 | $cMargin=$this->cMargin; | |
328 | $this->cMargin=2; | |
329 | $this->TableX=$this->lMargin; | |
330 | $this->TableHeader(); | |
331 | $this->ProcessingTable=true; | |
332 | ||
333 | $this->SetFont('Helvetica','',9); | |
334 | $this->SetFillColor(175, 175, 255); | |
335 | ||
336 | $arr = json_decode($row['json_miscs'], true); | |
337 | foreach($arr as $item) { | |
338 | $name = iconv('UTF-8','windows-1252',$item['m_name']); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
339 | $type = $item['m_type']; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
340 | $use_use = $item['m_use_use']; |
165 | 341 | $amount = floatval($item['m_amount']) * 1000; |
342 | $costg = floatval($item['m_cost']) / 1000; | |
343 | $time = floatval($item['m_time']); | |
344 | $aiw = $item['m_amount_is_weight']; | |
345 | $cost = $amount * $costg; | |
346 | $cost_miscs += $cost; | |
347 | ||
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
348 | if ($type == 4) // Water agent |
165 | 349 | $this->SetFillColor(240,140,130); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
350 | else if ($type == 3) // Fining |
165 | 351 | $this->SetFillColor(95,180,25); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
352 | else if (($type == 0) || ($type == 1) || ($type == 2) || ($type == 5)) // Spice, Herb, Flavour, Yeast nutrient |
165 | 353 | $this->SetFillColor(240,250,65); |
354 | else | |
355 | $this->SetFillColor(210,245,255); | |
356 | ||
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
357 | if ($use_use == 2) // Boil |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
358 | $gebruik = sprintf("%s %d min",$miscuse[$use_use],$time); |
165 | 359 | else |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
360 | $gebruik = $miscuse[$use_use]; |
165 | 361 | |
362 | $hoeveel = sprintf("%.1f %s",$amount,$aiw ? "gr":"ml"); | |
363 | $this->Cell($vul,5,$name,0,0,'L',true); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
364 | $this->Cell(30,5,$misctype[$type],0,0,'L',true); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
365 | $this->Cell(30,5,$gebruik,0,0,'L',true); |
165 | 366 | $this->Cell(20,5,$hoeveel,0,0,'R',true); |
367 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
368 | $this->Ln(); | |
369 | } | |
370 | ||
371 | $this->SetFillColor(210,245,255); | |
372 | $this->Cell($vul+75,5,'',0,0,'L',false); | |
373 | $this->Cell(20,5,sprintf("%8.3f",$cost_miscs).EURO,0,0,'R',true); | |
374 | $this->Ln(10); | |
375 | ||
376 | $this->ProcessingTable=false; | |
377 | $this->cMargin=$cMargin; | |
378 | $this->aCols=array(); | |
379 | } | |
380 | ||
381 | // Watercolor $this->SetFillColor(120,255,250); | |
382 | ||
383 | function TableSummary($row) { | |
384 | global $pSugar; | |
385 | global $pCara; | |
386 | global $svg; | |
387 | global $colorw; | |
388 | global $cost_fermentables; | |
389 | global $cost_hops; | |
390 | global $cost_miscs; | |
391 | global $cost_yeasts; | |
392 | /* 2 Columns */ | |
393 | $vul = $this->w - $this->rMargin - $this->lMargin - 170; | |
394 | $cMargin=$this->cMargin; | |
395 | $this->cMargin=2; | |
396 | $this->TableX=$this->lMargin; | |
397 | $this->SetFont('Helvetica','B',9); | |
398 | $this->SetX($this->TableX); | |
399 | $this->SetFillColor(255,150,100); | |
400 | $this->Cell(0, 5, 'Recept samenvatting',0,0,'C',true); | |
401 | $this->Ln(); | |
402 | ||
403 | $this->SetFont('Helvetica','',9); | |
404 | $this->SetFillColor(210,245,255); | |
405 | ||
406 | $row['est_fg'] = estimate_fg($pSugar, $pCara, 0, 0, 0, $svg, $row['est_og']); | |
407 | ||
408 | $this->SetX($this->TableX); | |
409 | $this->Cell(35,5,'Start SG',0,0,'L',true); | |
410 | $this->Cell(25,5,sprintf("%.3f",$row['est_og']),0,0,'L',true); | |
411 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_og_min']).' - '.sprintf("%.3f",$row['st_og_max']).')',0,0,'L',true); | |
412 | $this->Cell($vul,5,'',0,0,'L',false); | |
413 | $this->Cell(35,5,'Eind SG',0,0,'L',true); | |
414 | $this->Cell(25,5,sprintf("%.3f",$row['est_fg']),0,0,'L',true); | |
415 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_fg_min']).' - '.sprintf("%.3f",$row['st_fg_max']).')',0,0,'L',true); | |
416 | $this->Ln(); | |
417 | ||
418 | $row['est_abv'] = abvol($row['est_og'], $row['est_fg']); | |
419 | $this->SetX($this->TableX); | |
420 | $this->Cell(35,5,'Geschat alcohol',0,0,'L',true); | |
421 | $this->Cell(25,5,sprintf("%.1f",$row['est_abv']).'%',0,0,'L',true); | |
422 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_abv_min']).' - '.sprintf("%.1f",$row['st_abv_max']).'%)',0,0,'L',true); | |
423 | $this->Cell($vul,5,'',0,0,'L',false); | |
424 | $this->Cell(35,5,'CO2',0,0,'L',true); | |
425 | $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true); | |
426 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); | |
427 | $this->Ln(); | |
428 | ||
429 | $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); | |
430 | $this->SetX($this->TableX); | |
431 | $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); | |
432 | $beercolor = ebc_to_color($row['est_color']); | |
433 | if ($row['est_color'] > 30) | |
434 | $this->SetTextColor(250); | |
435 | $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); | |
436 | $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); | |
437 | $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); | |
438 | $this->SetTextColor(0); | |
439 | $this->SetFillColor(210,245,255); | |
440 | $this->Cell($vul,5,'',0,0,'L',false); | |
441 | $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); | |
442 | $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); | |
443 | $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); | |
444 | $this->Ln(); | |
445 | ||
446 | $this->SetX($this->TableX); | |
447 | $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts; | |
448 | $this->Cell(35,5,'Kosten',0,0,'L',true); | |
449 | $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true); | |
450 | $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true); | |
451 | $this->Ln(10); | |
452 | ||
453 | ||
454 | // Kostprijs per liter, calorieren | |
455 | $this->cMargin=$cMargin; | |
456 | } | |
457 | } | |
458 | ||
459 | ||
460 | ||
461 | class PDF extends PDF_MySQL_Table { | |
462 | function Header() { | |
463 | global $row; | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
464 | global $prdate; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
465 | $stage = array( 'Plan', 'Wacht', 'Brouwen', 'Hoofdgisting', 'Nagisting', 'Lagering', 'Afvullen', 'Hergisten', 'Rijpen', 'Proeven', 'Gereed', 'Afgesloten' ); |
165 | 466 | $this->Image('images/logo.png',10,6,30); |
467 | // Title | |
468 | $this->SetFont('Helvetica','B',18); | |
469 | $this->SetX(45); | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
470 | $this->Cell(0,8,$row['name'],0,1,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
471 | $this->Ln(1); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
472 | $this->SetFont('Helvetica','',10); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
473 | $this->SetX(45); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
474 | $this->Cell(17,5,'Datum:',0,0,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
475 | $this->Cell(0,5,$prdate,0,1,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
476 | $this->SetX(45); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
477 | $this->Cell(17,5,'Stijl:',0,0,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
478 | $this->Cell(0,5,$row['st_name'],0,1,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
479 | $this->SetX(45); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
480 | $this->Cell(17,5,'Fase:',0,0,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
481 | $this->Cell(0,5,$stage[$row['stage']],0,1,'L'); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
482 | $this->Ln(6); |
165 | 483 | // Ensure table header is printed |
484 | parent::Header(); | |
485 | } | |
486 | } | |
487 | ||
488 | ||
489 | /* | |
490 | * Generate PDF from recipe data | |
491 | */ | |
492 | $pdf = new PDF(); | |
493 | $pdf->AddPage(); | |
494 | $pdf->TableGlobal($row); | |
495 | $pdf->TableFermentables($row); | |
496 | $pdf->TableHops($row); | |
497 | $pdf->TableYeasts($row); | |
498 | $pdf->TableMiscs($row); | |
499 | $pdf->TableSummary($row); | |
500 | if (strlen($row['notes'])) { | |
501 | $pdf->SetFillColor(255,150,100); | |
502 | $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true); | |
503 | $pdf->Ln(); | |
504 | $pdf->SetFillColor(210,245,255); | |
505 | $pdf->MultiCell(0,4,$row['notes'],0,'L',true); | |
506 | } | |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
507 | |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
508 | if ($row['stage'] == 2) { |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
509 | // Checklist |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
510 | } |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
511 | if ($row['stage'] > 2) { |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
512 | // Brouw rapport |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
513 | } |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
514 | if ($row['stage'] > 3) { |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
515 | // Vergisting gegevens |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
516 | } |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
517 | if ($row['stage'] > 6) { |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
518 | // Package report |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
519 | } |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
520 | if ($row['stage'] > 9) { |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
521 | // Taste notes |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
522 | } |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
523 | |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
524 | |
165 | 525 | $pdf->Output(); |