Sat, 23 May 2020 22:40:18 +0200
Tooltips translations.
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 '; |
667
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
658
diff
changeset
|
164 | $s .= sprintf("%.1f",$item['step_infuse_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
|
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 |
667
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
658
diff
changeset
|
190 | $s = 'toevoegen '.sprintf("%.1f",$item['step_infuse_amount'] * $factor).' liter water van '; |
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
658
diff
changeset
|
191 | $s .= $item['step_infuse_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
|
192 | } 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
|
193 | $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
|
194 | } else { // Decoction |
667
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
658
diff
changeset
|
195 | $s = 'uitnemen, opwarmen, koken en terugstorten van '.sprintf("%.1f",$item['step_infuse_amount']*$factor); |
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
658
diff
changeset
|
196 | $s .= ' liter deelbeslag'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
197 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
198 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
199 | $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
|
200 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
201 | $loop++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
202 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
203 | $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
|
204 | 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
|
205 | if ($item['f_added'] == 0) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
206 | $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
|
207 | $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
|
208 | $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
|
209 | $msugars += $d; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
210 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
211 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
212 | $sugardensity = 1.611; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
213 | $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
|
214 | $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
|
215 | $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
|
216 | $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
|
217 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
218 | 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
|
219 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
220 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
221 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
222 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
223 | $this->Checkheader('Filteren en spoelen'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
224 | $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
|
225 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
226 | $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
|
227 | $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
|
228 | $this->Checkline($s); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
229 | $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
|
230 | $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
|
231 | $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
|
232 | $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
|
233 | $this->Checkline($s); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
234 | $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
|
235 | $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
|
236 | 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
|
237 | if ($item2['h_useat'] == 1) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
238 | $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
|
239 | $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
|
240 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
241 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
242 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
243 | if ($this->Checksplit(1, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
244 | $factor = 1; |
658
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
245 | if ($this->GetY() > 200 && $row['boil_time'] > 0) |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
246 | $this->AddPage(); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
247 | else if ($this->GetY() > 270 && $row['boil_time'] == 0) |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
248 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
249 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
250 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
251 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
252 | $this->Checkheader('Koken'); |
658
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
253 | if ($row['boil_time'] > 0) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
254 | $this->Checkline('totale kooktijd: '.$row['boil_time'].' min.'); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
255 | for ($i = $row['boil_time']; $i >= 0; $i--) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
256 | if ($i == 10) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
257 | foreach($ferms as $item1) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
258 | if ($item1['f_added'] == 1) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
259 | $s = sprintf("%.3f",$item1['f_amount']*$factor).' kg `'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
260 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` bij 10 minuten voor einde koken'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
261 | $this->Checkline($s); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
262 | } |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
263 | } |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
264 | if ($row['brew_cooling_method'] == 1) |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
265 | $this->Checkline('Plaats dompelkoeler bij 10 minuten voor einde koken'); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
266 | } |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
267 | foreach($hops as $item2) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
268 | if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
269 | $s = sprintf("%.2f",$item2['h_amount']*1000*$factor).' gr `'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
270 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` bij '; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
271 | if ($i > 0) |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
272 | $s .= $i.' minuten voor einde koken'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
273 | else |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
274 | $s .= 'vlamuit'; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
275 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
276 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
277 | } |
658
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
278 | foreach($miscs as $item3) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
279 | if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
280 | $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
281 | $s = sprintf("%.2f",$item3['m_amount']*1000*$factor).$unit.'`'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
282 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij '; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
283 | if ($i > 0) |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
284 | $s .= $i.' minuten voor einde koken'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
285 | else |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
286 | $s .= 'vlamuit'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
287 | $this->Checkline($s); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
288 | } |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
289 | } |
658
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
290 | |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
291 | } |
658
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
292 | $s = 'doelvolume einde koken: '.sprintf("%.1f",$row['batch_size']*$factor*1.04).' liter ('; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
293 | $s .= sprintf("%.1f",kettle_cm($row['batch_size']*$factor*1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
294 | $s .= ' cm onder de rand)'; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
295 | $this->Checkline($s); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
296 | $this->Checkline('doel SG einde koken: '.density_str($row['est_og3'])); |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
297 | if ($this->Checksplit(2, $row)) |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
298 | $factor = 1; |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
299 | } else { |
945d5eba869a
Implemented no-boil products.
Michiel Broek <mbroek@mbse.eu>
parents:
624
diff
changeset
|
300 | $this->Checkline('Dit is een `no-boil\' recept'); |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
301 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
302 | 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
|
303 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
304 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
305 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
306 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
307 | 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
|
308 | $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
|
309 | 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
|
310 | $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
|
311 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
312 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
313 | 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
|
314 | $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
|
315 | $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
|
316 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
317 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
318 | 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
|
319 | $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
|
320 | $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
|
321 | $this->Checkline($s); |
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 | 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
|
324 | if ($item2['h_useat'] == 4) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
325 | $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
|
326 | $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
|
327 | $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
|
328 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
329 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
330 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
331 | $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
|
332 | 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
|
333 | $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
|
334 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
335 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
336 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
337 | $this->Checkheader('Koelen'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
338 | $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
|
339 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
340 | $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
|
341 | $this->Checkline('wort naar gistvat overbrengen'); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
342 | if ($this->Checksplit(3, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
343 | $factor = 1; |
404
39a688b8d069
Version 0.3.6. Fixed undefined variable.
Michiel Broek <mbroek@mbse.eu>
parents:
399
diff
changeset
|
344 | 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
|
345 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
346 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
347 | $this->Ln(5); |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
348 | |
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
|
349 | $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
|
350 | $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
|
351 | $dry = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
352 | foreach ($yeasts as $item) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
353 | $name = iconv('UTF-8','windows-1252',$item['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
354 | $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
|
355 | 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
|
356 | if ($item['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
357 | $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
|
358 | } 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
|
359 | $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
|
360 | $s .= ' gist'; |
624
7509f9ed5686
Fixed checklist for dried Kveik
Michiel Broek <mbroek@mbse.eu>
parents:
622
diff
changeset
|
361 | if ($item['y_form'] == 1) |
7509f9ed5686
Fixed checklist for dried Kveik
Michiel Broek <mbroek@mbse.eu>
parents:
622
diff
changeset
|
362 | $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
|
363 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
364 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
365 | $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
|
366 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
367 | } |
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
|
368 | 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
|
369 | $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
|
370 | $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
|
371 | $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
|
372 | } |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
373 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
374 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
375 | if ($dry > 0) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
376 | $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
|
377 | $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
|
378 | $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
|
379 | $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
|
380 | $this->Checkline('Of'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
381 | $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
|
382 | } else { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
383 | 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
|
384 | $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
|
385 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
386 | $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
|
387 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | if ($row['brew_fermenter_extrawater'] > 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
389 | $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
|
390 | 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
|
391 | $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
|
392 | $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
|
393 | $this->Checkline($s); |
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 | 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
|
396 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
397 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
398 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
399 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
400 | $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
|
401 | $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
|
402 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
403 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
404 | * 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
|
405 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
406 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
407 | 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
|
408 | 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
|
409 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
410 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
411 | 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
|
412 | 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
|
413 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
414 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
415 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
416 | 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
|
417 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
418 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
419 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
420 | $this->Checkheader('Hoofdgisting'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
421 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
422 | 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
|
423 | if ($item1['f_added'] == 2) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
424 | $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
|
425 | $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
|
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 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
429 | 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
|
430 | 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
|
431 | $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
|
432 | $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
|
433 | $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
|
434 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
435 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
436 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
437 | if ($this->Checksplit(4, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
438 | $factor = 1; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
439 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
440 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
441 | * 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
|
442 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
443 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
444 | 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
|
445 | 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
|
446 | $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
|
447 | 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
|
448 | $lines++; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
449 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
450 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
451 | 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
|
452 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
453 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
454 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
455 | $this->Checkheader('Nagisting'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
456 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
457 | 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
|
458 | if ($item4['y_use'] == 1) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
459 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
460 | $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
|
461 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
462 | $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
|
463 | } else if ($item['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
464 | $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
|
465 | $s .= ' gist'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
466 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
467 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
468 | $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
|
469 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
470 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
471 | } |
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
|
472 | 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
|
473 | $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
|
474 | 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
|
475 | $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
|
476 | 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
|
477 | $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
|
478 | $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
|
479 | } |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
480 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
481 | if ($this->Checksplit(5, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
482 | $factor = 1; |
398
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 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
485 | * 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
|
486 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
487 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
488 | 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
|
489 | 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
|
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($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
493 | 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
|
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 | 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
|
497 | 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
|
498 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
499 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
500 | 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
|
501 | 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
|
502 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
503 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
504 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
505 | 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
|
506 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
507 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
508 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
509 | $this->Checkheader('Lagering'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
510 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
511 | 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
|
512 | if ($item1['f_added'] == 3) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
513 | $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
|
514 | $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
|
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($hops as $item2) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
519 | if ($item2['h_useat'] == 5) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
520 | $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
|
521 | $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
|
522 | $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
|
523 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
524 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
525 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
526 | 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
|
527 | if ($item4['y_use'] == 2) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
528 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
529 | $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
|
530 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
531 | $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
|
532 | } else if ($item4['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
533 | $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
|
534 | $s .= ' gist'; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
535 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
536 | $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
|
537 | $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
|
538 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
539 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
540 | } |
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 | 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
|
543 | 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
|
544 | $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
|
545 | $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
|
546 | $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
|
547 | $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
|
548 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
549 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
550 | } |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
551 | if ($this->Checksplit(6, $row)) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
552 | $factor = 1; |
398
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 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
555 | * 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
|
556 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
557 | $lines = 0; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
558 | 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
|
559 | 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
|
560 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
561 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
562 | $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
|
563 | 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
|
564 | 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
|
565 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
566 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
567 | $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
|
568 | 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
|
569 | 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
|
570 | $lines++; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
571 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
572 | if ($lines) { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
573 | 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
|
574 | $this->AddPage(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
575 | else |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
576 | $this->Ln(5); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
577 | $this->Checkheader('Verpakken'); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
578 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
579 | 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
|
580 | if ($item1['f_added'] == 4) { |
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['bottle_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['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
|
585 | $s .= ' bij bottelen'; |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
586 | $this->Checkline($s); |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
587 | } |
2230d3faeed9
Added priming water to the checklist. Fixed a missing space character.
Michiel Broek <mbroek@mbse.eu>
parents:
404
diff
changeset
|
588 | if ($item1['f_added'] == 5) { |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
589 | $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
|
590 | $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
|
591 | if ($row['keg_priming_water'] > 0) |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
592 | $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
|
593 | $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
|
594 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
595 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
596 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
597 | 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
|
598 | if ($item4['y_use'] == 3) { |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
599 | $name = iconv('UTF-8','windows-1252',$item4['y_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
600 | $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
|
601 | if ($item4['y_form'] == 0) { // Liquid |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
602 | $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
|
603 | } else if ($item4['y_form'] == 1) { // Dry |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
604 | $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
|
605 | } else { // Slant/Culture/Frozen/Bottle |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
606 | $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
|
607 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
608 | $s .= '` als bottelgist'; |
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 | 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
|
613 | 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
|
614 | $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
|
615 | $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
|
616 | $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
|
617 | $this->Checkline($s); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
618 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
619 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
620 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
621 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
622 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
623 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
624 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
625 | 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
|
626 | function Header() { |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
627 | global $row; |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
628 | global $prdate; |
535
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
629 | global $stage; |
398
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
630 | $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
|
631 | // Title |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
632 | $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
|
633 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
634 | $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
|
635 | $this->Ln(1); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
636 | $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
|
637 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
638 | $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
|
639 | $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
|
640 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
641 | $this->Cell(17,5,'Stijl:',0,0,'L'); |
599
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
642 | $st_name = iconv('UTF-8','windows-1252',$row['st_name']); |
1460c92927b2
Checklist character encoding fixes.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
643 | $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
|
644 | $this->SetX(45); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
645 | $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
|
646 | $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
|
647 | $this->SetX(45); |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
648 | $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
|
649 | if ($row['divide_parts'] == 0) |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
650 | $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
|
651 | else |
1f0059cfb6fe
The product checklist can handle splitted batches.
Michiel Broek <mbroek@mbse.eu>
parents:
516
diff
changeset
|
652 | $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
|
653 | $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
|
654 | // 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
|
655 | parent::Header(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
656 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
657 | } |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
658 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
659 | |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
660 | /* |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
661 | * 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
|
662 | */ |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
663 | $pdf = new PDF(); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
664 | $pdf->Checklist($row); |
7e8f1a7ddeeb
Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
665 | $pdf->Output(); |