Wed, 18 Mar 2020 19:46:15 +0100
Limit debug ProtoDeficit error messages. If the need for a yeast starter changes, make sure the screen is updated. Another set of extra debug logs. Fixed try yeast starter. Several dropdown lists changed the action from change to select. This should fix te too early calculations while the data was not yet loaded.
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
4 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/constants.php'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | if (! $link) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | if (! mysqli_set_charset($link, "utf8" )) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | echo "error"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | return 1; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | setlocale ( LC_ALL, 'nl_NL.UTF-8'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | $record = $_GET["record"]; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | $result = mysqli_query($link, "SELECT * FROM products WHERE record='".$record."'"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | $row = mysqli_fetch_array($result); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | date_default_timezone_set('Europe/Amsterdam'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | $prdate = date(DATE_RFC2822); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | class PDF_MySQL_Table extends FPDF |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | function Checkheader($text) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | $this->SetFont('Arial','B',10); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | $this->Cell(0, 4,$text,0,0,'L',true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | $this->SetFont('Arial','',10); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | $this->Ln(6); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | function Checkline($text) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | $this->Cell(2, 4,' ',0,0,'L',true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | $this->Cell(4, 4,' ',1,0,'L',true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | $this->Cell(0, 4,' '.$text,0,1,'L',true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | $this->Ln(1); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
42 | function Checksplit($moment, $row) { |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
43 | global $splitat; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
44 | if ($row['divide_type'] && $row['divide_type'] == $moment) { |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
45 | $this->Ln(2); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
46 | $this->SetFont('Helvetica','B',14); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
47 | $this->Cell(0, 4,$splitat[$row['divide_type']]." splits de batch hier!",0,0,'C',true); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
48 | $this->SetFont('Arial','',10); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
49 | $this->AddPage(); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
50 | return true; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
51 | } |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
52 | return false; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
53 | } |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
54 | |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | function Checklist($row) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | global $my_grain_absorbtion; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | global $my_brix_correction; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
59 | global $acidtype; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | $mashwater = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | $numsalts = 0; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
62 | $factor = 1 / $row['divide_factor']; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | $this->SetFillColor(255,255,255); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
67 | $ferms = json_decode($row['json_fermentables'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | $hops = json_decode($row['json_hops'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | $miscs = json_decode($row['json_miscs'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | $yeasts = json_decode($row['json_yeasts'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
71 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
72 | if ($row['starter_enable'] && $row['prop1_volume']) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
73 | $this->Checkheader('Giststarter maken'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | $days = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | $last = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | for ($i = 1; $i < 5; $i++) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
77 | $pt = "prop".$i."_type"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
78 | $pv = "prop".$i."_volume"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
79 | if (floatval($row[$pv])) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
80 | $last = $i; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
81 | if ($row[$pt] == 0) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | $days += 2; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | else if ($row[$pt] == 1) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
84 | $days += 4; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
86 | $days += 6; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
87 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
88 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
89 | $this->Checkline("begin ongeveer ".$days." dagen voor de brouwdag met de giststarter"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
90 | for ($i = 1; $i < 5; $i++) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
91 | $pt = "prop".$i."_type"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
92 | $pv = "prop".$i."_volume"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
93 | if (floatval($row[$pv])) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
94 | $s = "Starter stap ".$i.", van ".sprintf("%.3f",floatval($row[$pv])); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
95 | $s .= " liter maken met SG ".sprintf("%.3f",floatval($row['starter_sg'])); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
96 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
97 | if ($row[$pt] == 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
98 | $s = "ongeveer 24 uur op een magneetroerder"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
99 | } else if ($row[$pt] == 1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
100 | $s = "enkele dagen regelmatig schudden"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
101 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
102 | $s = "bijna een week rustig laten staan"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
103 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | $s .= " tot er voldoende gist is"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
105 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
106 | if ($i < $last) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
107 | $this->Checkline("starter minstens 24 uur in de koeling laten uitzakken"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
108 | $this->Checkline("starter uit de koelkast halen en afgieten"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
109 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
110 | $this->Checkline("starter in de koeling zetten tot de brouwdag"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
111 | $this->Checkline("starter op de brouwdag uit de koelkast halen en afgieten"); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
112 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
113 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
114 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
115 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
116 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
117 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
118 | $this->Checkheader('Water en -behandeling'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
119 | if ($row['w1_name']) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
120 | $this->Checkline(sprintf("%.1f",floatval($row['w1_amount'] * $factor)).' liter water '.$row['w1_name']); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
121 | $mashwater += floatval($row['w1_amount'] * $factor); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
122 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
123 | if ($row['w2_name']) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
124 | $this->Checkline(sprintf("%.1f",floatval($row['w2_amount'] * $factor)).' liter water '.$row['w2_name']); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
125 | $mashwater += floatval($row['w2_amount'] * $factor); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
126 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
127 | foreach($miscs as $item) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
128 | if ($item['m_type'] == 4) { // Only the water agents |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
129 | $unit = ($item['m_amount_is_weight']) ? " gr ":" ml "; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
130 | $this->Checkline(sprintf("%.2f",floatval($item['m_amount'] * 1000 * $factor)).$unit.$item['m_name']); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
131 | $numsalts++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
132 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
133 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
134 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
135 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
136 | $this->Checkheader('Mout afwegen en schroten'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
137 | foreach($ferms as $item) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
138 | if ($item['f_added'] == 0) { // to mash |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
139 | $s = sprintf("%.3f",floatval($item['f_amount'] * $factor)).' kg `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
140 | $s .= iconv('UTF-8','windows-1252',$item['f_name']); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
141 | $s .= '` ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
142 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
143 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
144 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
145 | $this->Checkline('mout schroten'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
146 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
147 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
148 | $this->Checkheader('Maischen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
149 | $mvol = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
150 | $msugars = 0; // mash sugars |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
151 | $grainabsorbtion = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
152 | $arr = json_decode($row['json_mashs'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
153 | if (count($arr) > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
154 | $loop = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
155 | foreach($arr as $item) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
156 | if ($item['step_type'] == 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
157 | $mvol += $item['step_infuse_amount'] * $factor; // We need this later. |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
158 | if ($loop == 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
159 | if ($item['step_type'] == 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
160 | $l = $item['step_infuse_amount'] * $factor; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
161 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
162 | $l = $mashwater; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
163 | $s = sprintf("%.1f",$l).' liter water opwarmen tot '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
164 | $s .= sprintf("%.1f",$item['step_temp']).' '.DEG.'C ('; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
165 | $s .= sprintf("%.1f",kettle_cm($l,$row['eq_tun_volume'],$row['eq_tun_height'])); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
166 | $s .= ' cm onder de rand)'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
167 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
168 | if ($numsalts > 0) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
169 | $this->Checkline('brouwzouten en -zuren toevoegen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
170 | $this->Checkline('mout storten en inmaischen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
171 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
172 | if ($item2['h_useat'] == 0) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
173 | $s = sprintf("%.1f",$item2['h_amount']*1000 * $factor).' gr `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
174 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
175 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
176 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
177 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
178 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
179 | if ($item3['m_use_use'] == 1 && $item3['m_type'] != 4) { // Only if not a water agent |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
180 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
181 | $s = sprintf("%.2f",$item3['m_amount']*1000 * $factor).$unit.'`'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
182 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
183 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
184 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
185 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
186 | $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
187 | $this->Checkline('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
188 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
189 | if ($item['step_type'] == 0) { // Infusion |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
190 | $s = 'toevoegen '.($item['step_infuse_amount'] * $factor).' liter water van xx '.DEG.'C'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
191 | } else if ($item['step_type'] == 1) { // Direct heat |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
192 | $s = 'opwarmen tot '.$item['step_temp'].' '.DEG.'C'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
193 | } else { // Decoction |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
194 | $s = 'uitnemen, opwarmen, koken en terugstorten van '.($item['step_infuse_amount']*$factor).' liter deelbeslag'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
195 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
196 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
197 | $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
198 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
199 | $loop++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
200 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
201 | $est_mash_sg = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
202 | foreach($ferms as $item) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
203 | if ($item['f_added'] == 0) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
204 | $d = $item['f_amount'] * $factor * ($item['f_yield'] / 100) * (1 - $item['f_moisture'] / 100); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
205 | $mvol += $item['f_amount'] * $factor * $item['f_moisture'] / 100; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
206 | $grainabsorbtion += $my_grain_absorbtion * $item['f_amount'] * $factor; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
207 | $msugars += $d; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
208 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
209 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
210 | $sugardensity = 1.611; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
211 | $v = $msugars / $sugardensity + $mvol; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
212 | $plato = 1000 * $msugars / ($v * 10); // deg. Plato |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
213 | $mash_sg = plato_to_sg($plato); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
214 | $this->Checkline('doel SG eind maischen: '.density_str($mash_sg)); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
215 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
216 | if ($this->GetY() > 200) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
217 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
218 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
219 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
220 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
221 | $this->Checkheader('Filteren en spoelen'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
222 | $s = sprintf("%.1f",$row['sparge_volume'] * $factor).' liter spoelwater opwarmen tot '.sprintf("%.1f",$row['sparge_temp']).' '.DEG.'C'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
223 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
224 | $s = 'spoelwater aanzuren tot pH <= '.sprintf("%.1f",$row['sparge_ph']).' met '; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
225 | $s .= sprintf("%.2f",$row['sparge_acid_amount']*1000*$factor).' ml. '.$acidtype[$row['sparge_acid_type']]; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
226 | $this->Checkline($s); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
227 | $spoelw = (($row['boil_size']*$factor) - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
228 | $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
229 | $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * $factor * 1.04).' liter ('; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
230 | $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * $factor * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
231 | $this->Checkline($s); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
232 | $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'] * $factor)); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
233 | $this->Checkline('doel SG in kookketel: '.density_str($pre_sg)); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
234 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
235 | if ($item2['h_useat'] == 1) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
236 | $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
237 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen na het spoelen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
238 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
239 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
240 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
241 | if ($this->Checksplit(1, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
242 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
243 | if ($this->GetY() > 200) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
244 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
245 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
246 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
247 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
248 | $this->Checkheader('Koken'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
249 | $this->Checkline('totale kooktijd: '.$row['boil_time'].' min.'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
250 | for ($i = $row['boil_time']; $i >= 0; $i--) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
251 | if ($i == 10) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
252 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
253 | if ($item1['f_added'] == 1) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
254 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
255 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` bij 10 minuten voor einde koken'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
256 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
257 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
258 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
259 | if ($row['brew_cooling_method'] == 1) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
260 | $this->Checkline('Plaats dompelkoeler bij 10 minuten voor einde koken'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
261 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
262 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
263 | if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { |
622
39902353b159
Workaround for hang during startup. Changed order of displayed fields on the yeast tab. Tooltip text changes. More decimals on the checklist for misc ingredients. More decimals for the starter on product print.
Michiel Broek <mbroek@mbse.eu>
parents:
616
diff
changeset
|
264 | $s = sprintf("%.2f",$item2['h_amount']*1000*$factor).' gr `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
265 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` bij '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
266 | if ($i > 0) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
267 | $s .= $i.' minuten voor einde koken'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
268 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
269 | $s .= 'vlamuit'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
270 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
271 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
272 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
273 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
274 | if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
275 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
622
39902353b159
Workaround for hang during startup. Changed order of displayed fields on the yeast tab. Tooltip text changes. More decimals on the checklist for misc ingredients. More decimals for the starter on product print.
Michiel Broek <mbroek@mbse.eu>
parents:
616
diff
changeset
|
276 | $s = sprintf("%.2f",$item3['m_amount']*1000*$factor).$unit.'`'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
277 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
278 | if ($i > 0) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
279 | $s .= $i.' minuten voor einde koken'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
280 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
281 | $s .= 'vlamuit'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
282 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
283 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
284 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
285 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
286 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
287 | $s = 'doelvolume einde koken: '.sprintf("%.1f",$row['batch_size']*$factor*1.04).' liter ('; |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
288 | $s .= sprintf("%.1f",kettle_cm($row['batch_size']*$factor*1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
289 | $s .= ' cm onder de rand)'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
290 | $this->Checkline($s); |
616
2cbf21bb9bdc
Added est_og3 field in the products database so that the checklist can use it.
Michiel Broek <mbroek@mbse.eu>
parents:
599
diff
changeset
|
291 | $this->Checkline('doel SG einde koken: '.density_str($row['est_og3'])); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
292 | if ($this->Checksplit(2, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
293 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
294 | if ($this->GetY() > 200) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
295 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
296 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
297 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
298 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
299 | if (($row['brew_whirlpool9'] + $row['brew_whirlpool7'] + $row['brew_whirlpool6'] + $row['brew_whirlpool2']) > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
300 | $this->Checkheader('Whirlpool en koelen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
301 | if ($row['brew_whirlpool9'] > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
302 | $s = 'Whirlpool voor '.$row['brew_whirlpool9'].' min. Temperatuur boven 85 '.DEG.'C houden'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
303 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
304 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
305 | if ($row['brew_whirlpool7'] > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
306 | $this->Checkline('koelen tot 79 '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
307 | $s = 'Whirlpool voor '.$row['brew_whirlpool7'].' min. Temperatuur tussen 72 en 79 '.DEG.'C houden'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
308 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
309 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
310 | if ($row['brew_whirlpool6'] > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
311 | $this->Checkline('koelen tot 66 '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
312 | $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
313 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
314 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
315 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
316 | if ($item2['h_useat'] == 4) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
317 | $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
318 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
319 | $s .= $item2['h_time'].' minuten in de whirlpool'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
320 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
321 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
322 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
323 | $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
324 | if ($row['brew_whirlpool2'] > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
325 | $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
326 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
327 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
328 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
329 | $this->Checkheader('Koelen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
330 | $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
331 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
332 | $this->Checkline('gistvat ontsmetten en evt. pomp en slangen ontsmetten'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
333 | $this->Checkline('wort naar gistvat overbrengen'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
334 | if ($this->Checksplit(3, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
335 | $factor = 1; |
404
39a688b8d069
Version 0.3.6. Fixed undefined variable.
Michiel Broek <mbroek@mbse.eu>
parents:
399
diff
changeset
|
336 | if ($this->GetY() > 240) |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
337 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
338 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
339 | $this->Ln(5); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
340 | |
554
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
341 | $climate = $row['brew_cooling_to']; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
342 | $this->Checkheader('Gist enten'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
343 | $dry = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
344 | foreach ($yeasts as $item) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
345 | $name = iconv('UTF-8','windows-1252',$item['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
346 | $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
347 | if ($item['y_use'] == 0) { // primary |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
348 | if ($item['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
349 | $this->Checkline(($item['y_amount']*$factor).' pak '.$product_id.', '.$name.' gist'); |
624
7509f9ed5686
Fixed checklist for dried Kveik
Michiel Broek <mbroek@mbse.eu>
parents:
622
diff
changeset
|
350 | } else if ($item['y_form'] == 1 || $item['y_form'] == 6) { // Dry or dried Kveik |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
351 | $s = sprintf("%.1f",$item['y_amount']*$factor*1000).' gram '.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
352 | $s .= ' gist'; |
624
7509f9ed5686
Fixed checklist for dried Kveik
Michiel Broek <mbroek@mbse.eu>
parents:
622
diff
changeset
|
353 | if ($item['y_form'] == 1) |
7509f9ed5686
Fixed checklist for dried Kveik
Michiel Broek <mbroek@mbse.eu>
parents:
622
diff
changeset
|
354 | $dry += $item['y_amount']*$factor*10000; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
355 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
356 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
357 | $s = sprintf("%.0f",$item['y_amount']*$factor*1000).' ml '.$product_id.', '.$name.' gist'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
358 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
359 | } |
554
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
360 | if ($item['y_type'] == 6 && floatval($item['y_pitch_temperature']) > 0) { |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
361 | $s = 'Gist enten bij ' . sprintf("%.1f",floatval($item['y_pitch_temperature'])) . DEG . 'C'; |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
362 | $this->Checkline($s); |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
363 | $climate = $item['y_pitch_temperature']; |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
364 | } |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
365 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
366 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
367 | if ($dry > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
368 | $this->Checkline(' gist hydrateren in '.$dry.' ml gedesinfecteerd water van 32 '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
369 | $this->Checkline(' 15 minuten laten staan bij 32 '.DEG.'C'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
370 | $this->Checkline(' gistmengsel voorzichtig roeren en laten afkoelen tot temperatuur wort'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
371 | $this->Checkline(' gist toevoegen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
372 | $this->Checkline('Of'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
373 | $this->Checkline(' gist rechtstreeks over het wort strooien'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
374 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
375 | if ($row['starter_enable'] && $row['prop1_volume']) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
376 | $this->Checkline('giststarter toevoegen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
377 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
378 | $this->Checkline('gist toevoegen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
379 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
380 | if ($row['brew_fermenter_extrawater'] > 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
381 | $this->Checkline(sprintf("%.1f", $row['brew_fermenter_extrawater']*$factor).' liter water toevoegen in gistvat'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
382 | if ($row['brew_aeration_type'] > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
383 | $s = 'wort '.$row['brew_aeration_time'].' minuten beluchten met '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
384 | $s .= ($row['brew_aeration_type'] == 1) ? "lucht":"zuurstof"; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
385 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
386 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
387 | if ($this->GetY() > 200) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
389 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
390 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
391 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
392 | $this->Checkheader('Vergisting starten'); |
554
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
393 | $this->Checkline('klimaatkast instellen op '.sprintf("%.1f",$climate).' '.DEG.'C'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
394 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
395 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
396 | * During primary fermentation: fermentables, misc |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
397 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
398 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
399 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
400 | if ($item1['f_added'] == 2) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
401 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
402 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
403 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
404 | if ($item3['m_use_use'] == 3) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
405 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
406 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
407 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
408 | if ($this->GetY() > (270 - (5 * $lines))) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
409 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
410 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
411 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
412 | $this->Checkheader('Hoofdgisting'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
413 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
414 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
415 | if ($item1['f_added'] == 2) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
416 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
417 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` op dag 3 of 4 toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
418 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
419 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
420 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
421 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
422 | if ($item3['m_use_use'] == 3) { |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
423 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
424 | $s = sprintf("%.1f",$item3['m_amount']*$factor*1000).$unit.'`'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
425 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` op dag 3 of 4 toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
426 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
427 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
428 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
429 | if ($this->Checksplit(4, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
430 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
431 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
432 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
433 | * During secondary fermentation: yeast |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
434 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
435 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
436 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
437 | if ($item4['y_use'] == 1) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
438 | $lines++; |
554
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
439 | if ($item4['y_harvest_time'] > 0) |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
440 | $lines++; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
441 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
442 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
443 | if ($this->GetY() > (270 - (5 * $lines))) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
444 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
445 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
446 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
447 | $this->Checkheader('Nagisting'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
448 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
449 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
450 | if ($item4['y_use'] == 1) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
451 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
452 | $product_id = iconv('UTF-8','windows-1252',$item4['y_product_id']); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
453 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
454 | $this->Checkline(($item4['y_amount']*$factor).' pak '.$product_id.', '.$name.' gist (eventueel met starter)'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
455 | } else if ($item['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
456 | $s = sprintf("%.1f",$item4['y_amount']*$factor*1000).' gram '.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
457 | $s .= ' gist'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
458 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
459 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
460 | $s = sprintf("%.0f",$item4['y_amount']*$factor*1000).' ml '.$product_id.', '.$name.' gist (eventueel met starter)'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
461 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
462 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
463 | } |
554
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
464 | if ($item4['y_harvest_time'] > 0) { |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
465 | $s = 'Na ' . $item4['y_harvest_time'] . ' uur gist oogsten vanaf de '; |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
466 | if ($item4['y_harvest_top'] > 0) |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
467 | $s .= 'bovenzijde'; |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
468 | else |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
469 | $s .= 'bodem'; |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
470 | $this->Checkline($s); |
c62ff53cfc3d
Added the new Kveik yeast fields to the product editor. Added auto update when a product is loaded. Added extra lines to the checklist about harvest yeast and pitch temperature.
Michiel Broek <mbroek@mbse.eu>
parents:
535
diff
changeset
|
471 | } |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
472 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
473 | if ($this->Checksplit(5, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
474 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
475 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
476 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
477 | * During tertiary fermentation: fermentables, hop, yeast, misc |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
478 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
479 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
480 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
481 | if ($item1['f_added'] == 3) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
482 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
483 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
484 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
485 | if ($item2['h_useat'] == 5) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
486 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
487 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
488 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
489 | if ($item4['y_use'] == 2) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
490 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
491 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
492 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
493 | if ($item3['m_use_use'] == 4) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
494 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
495 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
496 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
497 | if ($this->GetY() > (270 - (5 * $lines))) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
498 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
499 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
500 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
501 | $this->Checkheader('Lagering'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
502 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
503 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
504 | if ($item1['f_added'] == 3) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
505 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
506 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
507 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
508 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
509 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
510 | foreach($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
511 | if ($item2['h_useat'] == 5) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
512 | $s = sprintf("%.1f",$item2['h_amount']*$factor*1000).' gr `'; |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
513 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor '; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
514 | $s .= sprintf("%.0f",$item2['h_time']/1440).' dagen toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
515 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
516 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
517 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
518 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
519 | if ($item4['y_use'] == 2) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
520 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
521 | $product_id = iconv('UTF-8','windows-1252',$item4['y_product_id']); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
522 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
523 | $s = ($item4['y_amount']*$factor).' pak '.$product_id.', '.$name.' gist (eventueel met starter)'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
524 | } else if ($item4['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
525 | $s = sprintf("%.1f",$item4['y_amount']*$factor*1000).' gram '.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
526 | $s .= ' gist'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
527 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
528 | $s = sprintf("%.0f",$item4['y_amount']*$factor*1000).' ml '.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
529 | $s .= ' gist (eventueel met starter)'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
530 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
531 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
532 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
533 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
534 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
535 | if ($item3['m_use_use'] == 4) { |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
536 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
537 | $s = sprintf("%.1f",$item3['m_amount']*$factor*1000).$unit.'`'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
538 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` voor '; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
539 | $s .= sprintf("%.0f",$item3['m_time']/1440).' dagen toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
540 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
541 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
542 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
543 | if ($this->Checksplit(6, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
544 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
545 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
546 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
547 | * During packaging: fermentables, yeast, misc |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
548 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
549 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
550 | foreach($ferms as $item1) { |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
551 | if ($item1['f_added'] >= 4) |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
552 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
553 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
554 | $yeasts = json_decode($row['json_yeasts'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
555 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
556 | if ($item4['y_use'] == 3) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
557 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
558 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
559 | $miscs = json_decode($row['json_miscs'], true); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
560 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
561 | if ($item3['m_use_use'] == 5) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
562 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
563 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
564 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
565 | if ($this->GetY() > (270 - (5 * $lines))) |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
566 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
567 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
568 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
569 | $this->Checkheader('Verpakken'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
570 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
571 | foreach($ferms as $item1) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
572 | if ($item1['f_added'] == 4) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
573 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
574 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'`'; |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
575 | if ($row['bottle_priming_water'] > 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
576 | $s .= ' met '.sprintf("%.3f",$row['bottle_priming_water']*$factor).' liter water'; |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
577 | $s .= ' bij bottelen'; |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
578 | $this->Checkline($s); |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
579 | } |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
580 | if ($item1['f_added'] == 5) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
581 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
582 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'`'; |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
583 | if ($row['keg_priming_water'] > 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
584 | $s .= ' met '.sprintf("%.3f",$row['keg_priming_water']*$factor).' liter water'; |
423
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
585 | $s .= ' bij op fust zetten'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
586 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
587 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
588 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
589 | foreach ($yeasts as $item4) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
590 | if ($item4['y_use'] == 3) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
591 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
592 | $product_id = iconv('UTF-8','windows-1252',$item4['y_product_id']); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
593 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
594 | $s = '`'.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
595 | } else if ($item4['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
596 | $s = sprintf("%.1f",$item4['y_amount']*$factor*1000).' gram `'.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
597 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
598 | $s = sprintf("%.0f",$item4['y_amount']*$factor*1000).' ml `'.$product_id.', '.$name; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
599 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
600 | $s .= '` als bottelgist'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
601 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
602 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
603 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
604 | foreach($miscs as $item3) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
605 | if ($item3['m_use_use'] == 5) { |
399
6f1cde4215d3
In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
398
diff
changeset
|
606 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
607 | $s = sprintf("%.1f",$item3['m_amount']*$factor*1000).$unit.'`'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
608 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij bottelen toevoegen'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
609 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
610 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
611 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
612 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
613 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
614 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
615 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
616 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
617 | class PDF extends PDF_MySQL_Table { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
618 | function Header() { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
619 | global $row; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
620 | global $prdate; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
621 | global $stage; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
622 | $this->Image('images/logo.png',10,10,30); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
623 | // Title |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
624 | $this->SetFont('Helvetica','B',18); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
625 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
626 | $this->Cell(0,8,$row['code'].' '.$row['name'],0,1,'L'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
627 | $this->Ln(1); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
628 | $this->SetFont('Helvetica','',10); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
629 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
630 | $this->Cell(17,5,'Datum:',0,0,'L'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
631 | $this->Cell(0,5,$prdate,0,1,'L'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
632 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
633 | $this->Cell(17,5,'Stijl:',0,0,'L'); |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
634 | $st_name = iconv('UTF-8','windows-1252',$row['st_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
635 | $this->Cell(0,5,$st_name,0,1,'L'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
636 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
637 | $this->Cell(17,5,'Fase:',0,0,'L'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
638 | $this->Cell(0,5,$stage[$row['stage']],0,1,'L'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
639 | $this->SetX(45); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
640 | $this->Cell(17,5,'Batch:',0,0,'L'); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
641 | if ($row['divide_parts'] == 0) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
642 | $this->Cell(0,5,"Niet gespitst",0,1,'L'); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
643 | else |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
644 | $this->Cell(0,5,"Split batch ".($row['divide_part'] + 1)." van ".($row['divide_parts'] + 1),0,1,'L'); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
645 | $this->Ln(2); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
646 | // Ensure table header is printed |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
647 | parent::Header(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
648 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
649 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
650 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
651 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
652 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
653 | * Generate checklist PDF from recipe data |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
654 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
655 | $pdf = new PDF(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
656 | $pdf->Checklist($row); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
657 | $pdf->Output(); |