www/prod_print.php

Sat, 23 May 2020 20:53:48 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 23 May 2020 20:53:48 +0200
changeset 691
9c21125f584e
parent 670
638e7dd1d560
child 737
3f823bc205ca
permissions
-rw-r--r--

Added clone command to the equipment inventory.

165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 <?php
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php');
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
4 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/constants.php');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 if (! $link) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 if (! mysqli_set_charset($link, "utf8" )) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 echo "error";
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 return 1;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 setlocale ( LC_ALL, 'nl_NL.UTF-8');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 $record = $_GET["record"];
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 $result = mysqli_query($link, "SELECT * FROM products WHERE record='".$record."'");
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 $row = mysqli_fetch_array($result);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 $total_fermentables = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 $cost_fermentables = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 $total_hops = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 $cost_hops = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 $cost_yeasts = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 $cost_miscs = 0.0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 $pSugar = 0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 $pCara = 0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 $svg = 77;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 $colorw = 0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 $total_ibus = 0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 $preboil_sg = 0;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
34 $mashkg = 0;
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
35 date_default_timezone_set('Europe/Amsterdam');
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
36 $prdate = date(DATE_RFC2822);
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
37 $bottle_sugar = '';
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
38 $keg_sugar = '';
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
39 $bottle_sugar_amount = 0;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
40 $keg_sugar_amount = 0;
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
41
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
42 $divide_parts = $row['divide_parts'];
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
43 $divide_part = $row['divide_part'];
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
44 $divide_factor = floatval($row['divide_factor']);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 class PDF_MySQL_Table extends FPDF
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 protected $ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 protected $aCols=array();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 protected $TableX;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 function Header() {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53 // Print the table header if necessary
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 if ($this->ProcessingTable)
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58 function TableHeader() {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59 $this->SetFont('Helvetica','B',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 $this->SetFillColor(255,150,100);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62 foreach($this->aCols as $col)
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
65 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67 function AddCol($width=-1, $caption='', $align='L') {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71 function TableGlobal($row) {
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
72 global $recipetype;
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
73 global $divide_parts;
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
74 global $divide_part;
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
75 global $divide_factor;
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
76 global $splitat;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 /* 2 Columns */
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 $vul = $this->w - $this->rMargin - $this->lMargin - 160;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 $this->SetFont('Helvetica','B',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 $this->SetFillColor(255,150,100);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 $this->Cell(0, 5, 'Recept overzicht',0,0,'C',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91 $this->SetX($this->TableX);
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
92 $this->Cell(35,5,'Brouw type',0,0,'L',true);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
93 $this->Cell(45,5,$recipetype[$row['type']],0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 $this->Cell(35,5,'Batch grootte',0,0,'L',true);
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
96 if ($divide_parts == 0)
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
97 $this->Cell(45,5,$row['batch_size'].' liter',0,0,'L',true);
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
98 else
543
c062eb0dd7ce Round total batch volume to 2 ddecimals.
Michiel Broek <mbroek@mbse.eu>
parents: 542
diff changeset
99 $this->Cell(45,5,$row['batch_size'].' van '.sprintf("%.2f", ($row['batch_size'] * (1 / $divide_factor))).' liter',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 $this->Cell(35,5,'Kooktijd',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 $this->Cell(45,5,$row['boil_time'].' minuten',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107 $this->Cell(45,5,$row['efficiency'].' %',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 $this->Cell(35,5,'Bierstijl',0,0,'L',true);
589
b6a73022abe7 Fix encoding of the beerstyle name.
Michiel Broek <mbroek@mbse.eu>
parents: 543
diff changeset
112 $st_name = iconv('UTF-8','windows-1252',$row['st_name']);
b6a73022abe7 Fix encoding of the beerstyle name.
Michiel Broek <mbroek@mbse.eu>
parents: 543
diff changeset
113 $this->Cell(45,5,$st_name,0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 $this->Cell(35,5,'Installatie',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 $this->Cell(45,5,$row['eq_name'],0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
117 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
119 if ($divide_parts) {
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
120 $this->SetX($this->TableX);
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
121 $this->Cell(35,5,'Batch splits moment',0,0,'L',true);
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
122 $this->Cell(45,5,$splitat[$row['divide_type']],0,0,'L',true);
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
123 $this->Ln();
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
124 }
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
125
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 function TableFermentables($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 global $cost_fermentables;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 global $total_fermentables;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 global $pSugar;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 global $pCara;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 global $colorw;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135 global $preboil_sg;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
136 global $mashkg;
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
137 global $bottle_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
138 global $bottle_sugar_amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
139 global $keg_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
140 global $keg_sugar_amount;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
141 global $added;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
142 global $fermentabletype;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
143 global $graintype;
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
144 $vul = $this->w - $this->rMargin - $this->lMargin - 125;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
145 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
146 $this->AddCol($vul,'Mout, granen en suikers','L');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147 $this->AddCol(15,'Procent','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
148 $this->AddCol(15,'Opbr.','R');
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
149 $this->AddCol(25,'Soort', 'L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
150 $this->AddCol(30,'Gebruik moment','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
151 $this->AddCol(20,'Hoeveel','R');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
153
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
154 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
155 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
157 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
160 $sugarsf = 0;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
161 $sugarsm = 0;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
162 $mashkg = 0;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
163 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
164 $this->SetFillColor(250, 195, 65);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
165 $arr = json_decode($row['json_fermentables'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
166 foreach($arr as $item) { //foreach element in $arr
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
167 $name = iconv('UTF-8','windows-1252',$item['f_name']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
168 $supplier = iconv('UTF-8','windows-1252',$item['f_supplier']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
169 $amount = floatval($item['f_amount']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
170 $costkg = floatval($item['f_cost']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
171 $yield = floatval($item['f_yield']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
172 $moisture = floatval($item['f_moisture']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
173 $color = floatval($item['f_color']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174 $percent = floatval($item['f_percentage']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
175
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
176 if ($item['f_type'] == 1) // Sugar
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
177 $pSugar += $percent;
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
178 if ($item['f_graintype'] == 2) // Crystal
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
179 $pCara += $percent;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
180
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
181 if ($item['f_type'] == 0)
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
182 $soort = iconv('UTF-8','windows-1252',$graintype[$item['f_graintype']]);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
183 else
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
184 $soort = iconv('UTF-8','windows-1252',$fermentabletype[$item['f_type']]);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
185
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
186 if ($item['f_added'] == 4) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
187 $bottle_sugar = $name;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
188 $bottle_sugar_amount = $amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
189 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
190 if ($item['f_added'] == 5) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
191 $keg_sugar = $name;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
192 $keg_sugar_amount = $amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
193 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
194
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
195 $cost = $amount * $costkg;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
196 $cost_fermentables += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
197 $total_fermentables += $amount;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
198 /* Calculate the amount of sugars */
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
199 $d = $amount * ($yield / 100) * (1 - $moisture / 100);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
200 if ($item['f_added'] == 0) {
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
201 $d = floatval($row['efficiency']) / 100 * $d;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
202 $sugarsm += $d;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
203 $mashkg += $amount;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
205 $sugarsf += $d;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
206 $colorw += ($amount * ebc_to_srm($color) / $row['batch_size']) * 8.34436;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
207
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
208 if ($amount > 100)
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
209 $amount = sprintf("%.1f",$amount).' kg';
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
210 else if ($amount > 10)
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
211 $amount = sprintf("%.2f",$amount).' kg';
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
212 else
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
213 $amount = sprintf("%.0f",$amount * 1000).' gr';
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
214 $this->Cell($vul,5,$name.' ('.$supplier.') '.sprintf("%.0f",$color).' EBC',0,0,'L',true);
670
638e7dd1d560 Don't print percentage for priming sugars.
Michiel Broek <mbroek@mbse.eu>
parents: 667
diff changeset
215 if ($item['f_added'] < 4)
638e7dd1d560 Don't print percentage for priming sugars.
Michiel Broek <mbroek@mbse.eu>
parents: 667
diff changeset
216 $this->Cell(15,5,sprintf("%.1f%%",$percent),0,0,'R',true);
638e7dd1d560 Don't print percentage for priming sugars.
Michiel Broek <mbroek@mbse.eu>
parents: 667
diff changeset
217 else
638e7dd1d560 Don't print percentage for priming sugars.
Michiel Broek <mbroek@mbse.eu>
parents: 667
diff changeset
218 $this->Cell(15,5,' ',0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 $this->Cell(15,5,sprintf("%.1f%%",$yield),0,0,'R',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
220 $this->Cell(25,5,$soort,0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
221 $this->Cell(30,5,$added[$item['f_added']],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
222 $this->Cell(20,5,$amount,0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
223 $this->Cell(20,5,sprintf("%.3f",$cost).EURO,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
224 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
225 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
227 $row['est_og'] = estimate_sg($sugarsf, floatval($row['batch_size']));
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
228 $preboil_sg = estimate_sg($sugarsm, floatval($row['boil_size']));
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
229 $this->SetFillColor(210,245,255);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
230 $this->Cell($vul+105,5,'',0,0,'L',false);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
231 $this->Cell(20,5,sprintf("%.3f",$cost_fermentables).EURO,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
232 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 $this->aCols=array();
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
235 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238 function TableHops($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 global $total_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
240 global $total_ibus;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 global $cost_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
242 global $preboil_sg;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
243 global $hopform;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
244 global $hopuse;
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
245 $vul = $this->w - $this->rMargin - $this->lMargin - 122;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
246 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247 $this->AddCol($vul,'Hop','L');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
248 $this->AddCol(15,'Alpha','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
249 $this->AddCol(12,'IBU','R');
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
250 $this->AddCol(25,'Soort','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
251 $this->AddCol(30,'Gebruik moment','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
252 $this->AddCol(20,'Hoeveel','R');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
255 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 $this->SetFillColor(100, 250, 65);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
263
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
264 $arr = json_decode($row['json_hops'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
265 foreach($arr as $item) { //foreach element in $arr
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
266 $name = iconv('UTF-8','windows-1252',$item['h_name']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
267 $origin = iconv('UTF-8','windows-1252',$item['h_origin']);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
268 $amount = floatval($item['h_amount']);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
269 $mass = $amount * 1000;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
270 $costkg = floatval($item['h_cost']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
271 $time = floatval($item['h_time']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
272 $alpha = floatval($item['h_alpha']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
273
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
274 $cost = ($amount * $costkg);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
275 $cost_hops += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
276 $total_hops += $amount;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
277
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
278 $moment = $hopuse[$item['h_useat']];
396
804800d8e885 Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents: 392
diff changeset
279 if (($item['h_useat'] == 2) || ($item['h_useat'] == 4)) { // Boil or Whirlpool
804800d8e885 Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents: 392
diff changeset
280 $moment = $hopuse[$item['h_useat']].' '.$time." min";
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
281 } else if ($item['h_useat'] == 5) { // Dryhop
396
804800d8e885 Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents: 392
diff changeset
282 $moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen';
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
283 }
539
fe9ac6d49c4f Printed outputs have IBUs for whirlpool hops. Removed some debug console logs.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
284 $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha,
fe9ac6d49c4f Printed outputs have IBUs for whirlpool hops. Removed some debug console logs.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
285 $row['ibu_method'], $row['brew_whirlpool9'], $row['brew_whirlpool7'], $row['brew_whirlpool6']);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
286 $total_ibus += $ibu;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
287
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
288 if ($amount > 1)
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
289 $amount = sprintf("%.3f",$amount).' kg';
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
290 else
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
291 $amount = sprintf("%.1f",$amount * 1000).' gr';
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
292
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
293 $this->Cell($vul,5,$name.' ('.$origin.')',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 $this->Cell(15,5,sprintf("%.1f%%",$alpha),0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
295 $this->Cell(12,5,sprintf("%.1f",$ibu),0,0,'R',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
296 $this->Cell(25,5,$hopform[$item['h_form']],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
297 $this->Cell(30,5,$moment,0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
298 $this->Cell(20,5,$amount,0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
299 $this->Cell(20,5,sprintf("%.3f",$cost).EURO,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303 $this->SetFillColor(210,245,255);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
304 $this->Cell($vul+102,5,'',0,0,'L',false);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
305 $this->Cell(20,5,sprintf("%.3f",$cost_hops).EURO,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
306 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308 $this->aCols=array();
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
309 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
311
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
312 function TableYeasts($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
313 global $cost_yeasts;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
314 global $svg;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
315 global $yeastform;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
316 global $yeastuse;
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
317 $vul = $this->w - $this->rMargin - $this->lMargin - 110;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
318 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
319 $this->AddCol($vul,'Gist','L');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 $this->AddCol(15,'Attn','R');
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
321 $this->AddCol(25,'Soort','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
322 $this->AddCol(30,'Gebruik moment','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
323 $this->AddCol(20,'Hoeveel','R');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
324 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
328 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
329 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
331
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 $this->SetFillColor(175, 175, 255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 $arr = json_decode($row['json_yeasts'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
336 foreach($arr as $item) { //foreach element in $arr
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
337 $name = iconv('UTF-8','windows-1252',$item['y_name']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
338 $laboratory = iconv('UTF-8','windows-1252',$item['y_laboratory']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
339 $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
340 $attenuation = floatval($item['y_attenuation']);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
341 $cost = floatval($item['y_amount']) * floatval($item['y_cost']);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
342 $cost_yeasts += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
343
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
344 if ($item['y_use'] == 0) // Primary
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
345 $svg = $attenuation;
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
346 if ($item['y_form'] == 0) // Liquid
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
347 $amount = sprintf("%.0f",floatval($item['y_amount']))." pak";
516
28670364bd0c Added dried yeast form.
Michiel Broek <mbroek@mbse.eu>
parents: 514
diff changeset
348 else if ($item['y_form'] == 1 || $item['y_form'] == 6) // Dry
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
349 $amount = sprintf("%.1f",floatval($item['y_amount'])*1000)." gr";
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
350 else
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
351 $amount = sprintf("%.0f",floatval($item['y_amount'])*1000)." ml";
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
352
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
353 $this->Cell($vul,5,$laboratory.' '.$product_id.' ('.$name.')',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
354 $this->Cell(15,5,sprintf("%.1f%%",$attenuation),0,0,'R',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
355 $this->Cell(25,5,$yeastform[$item['y_form']],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
356 $this->Cell(30,5,$yeastuse[$item['y_use']],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
357 $this->Cell(20,5,$amount,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
358 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
359 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
360 }
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
361 if ($row['starter_enable'] && $row['prop1_volume']) {
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
362 $sv = 0;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
363 $st = 0;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
364 for ($i = 1; $i < 5; $i++) {
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
365 $pv = "prop".$i."_volume";
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
366 if (floatval($row[$pv])) {
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
367 $st++;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
368 if (floatval($row[$pv]) > $sv)
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
369 $sv = floatval($row[$pv]);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
370 }
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
371 }
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
372 $this->Cell($vul,5,$st." staps giststarter",0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
373 $this->Cell(40,5,'',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
374 $this->Cell(30,5,"Vooraf",0,0,'L',true);
622
39902353b159 Workaround for hang during startup. Changed order of displayed fields on the yeast tab. Tooltip text changes. More decimals on the checklist for misc ingredients. More decimals for the starter on product print.
Michiel Broek <mbroek@mbse.eu>
parents: 589
diff changeset
375 $this->Cell(20,5,sprintf("%.3f",$sv)." L",0,0,'R',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
376 $this->Cell(20,5,'',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
377 $this->Ln();
293
db898ec73277 Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents: 289
diff changeset
378 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
379
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
380 $this->SetFillColor(210,245,255);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
381 $this->Cell($vul+90,5,'',0,0,'L',false);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
382 $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
383 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
384 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
385 $this->aCols=array();
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
386 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
387 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
388
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
389 function TableMiscs($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
390 global $cost_miscs;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
391 global $misctype;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
392 global $miscuse;
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
393 $vul = $this->w - $this->rMargin - $this->lMargin - 95;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
394 if ($this->GetY() > 200)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
395 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
396 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
397 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
398 $this->AddCol($vul,'Diversen naam','L');
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
399 $this->AddCol(25,'Soort','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
400 $this->AddCol(30,'Gebruik moment','L');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
401 $this->AddCol(20,'Hoeveel','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
402 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
403
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
404 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
405 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
406 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
407 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
408 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
409
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
410 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
411 $this->SetFillColor(175, 175, 255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
412
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
413 $arr = json_decode($row['json_miscs'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
414 foreach($arr as $item) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
415 $name = iconv('UTF-8','windows-1252',$item['m_name']);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
416 $type = $item['m_type'];
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
417 $use_use = $item['m_use_use'];
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
418 $amount = floatval($item['m_amount']) * 1000;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
419 $costg = floatval($item['m_cost']) / 1000;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
420 $time = floatval($item['m_time']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
421 $aiw = $item['m_amount_is_weight'];
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
422 $cost = $amount * $costg;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
423 $cost_miscs += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
424
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
425 if ($type == 4) // Water agent
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
426 $this->SetFillColor(240,140,130);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
427 else if ($type == 3) // Fining
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
428 $this->SetFillColor(95,180,25);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
429 else if (($type == 0) || ($type == 1) || ($type == 2) || ($type == 5)) // Spice, Herb, Flavour, Yeast nutrient
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
430 $this->SetFillColor(240,250,65);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
431 else
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
432 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
433
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
434 if ($use_use == 2) // Boil
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
435 $gebruik = sprintf("%s %d min",$miscuse[$use_use],$time);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
436 else
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
437 $gebruik = $miscuse[$use_use];
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
438
357
74d56bed75b9 One more decimal digit for misc ingredients. Updated the README.
Michiel Broek <mbroek@mbse.eu>
parents: 338
diff changeset
439 $hoeveel = sprintf("%.2f %s",$amount,$aiw ? "gr":"ml");
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
440 $this->Cell($vul,5,$name,0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
441 $this->Cell(25,5,$misctype[$type],0,0,'L',true);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
442 $this->Cell(30,5,$gebruik,0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
443 $this->Cell(20,5,$hoeveel,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
444 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
445 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
446 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
447
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
448 $this->SetFillColor(210,245,255);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
449 $this->Cell($vul+75,5,'',0,0,'L',false);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
450 $this->Cell(20,5,sprintf("%8.3f",$cost_miscs).EURO,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
451
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
452 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
453 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
454 $this->aCols=array();
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
455 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
456 }
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
457
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
458 function TableMashs($row) {
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
459 global $cost_yeasts;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
460 global $svg;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
461 global $mashkg;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
462 global $mashtype;
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: 655
diff changeset
463 $vul = $this->w - $this->rMargin - $this->lMargin - 138;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
464 if ($this->GetY() > 250)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
465 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
466 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
467 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
468 $this->AddCol($vul,'Maisch stap naam','L');
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
469 $this->AddCol(25,'Stap type','L');
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: 655
diff changeset
470 $this->AddCol(16,'Start '.DEG.'C','R');
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: 655
diff changeset
471 $this->AddCol(16,'Eind '.DEG.'C','R');
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: 655
diff changeset
472 $this->AddCol(15,'Rust min','R');
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: 655
diff changeset
473 $this->AddCol(15,'Stap min','R');
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: 655
diff changeset
474 $this->AddCol(15,'L/Kg','R');
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: 655
diff changeset
475 $this->AddCol(18,'Inf/dec L','R');
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: 655
diff changeset
476 $this->AddCol(18,'Inf/dec '.DEG.'C','R');
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
477
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
478 $cMargin=$this->cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
479 $this->cMargin=2;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
480 $this->TableX=$this->lMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
481 $this->TableHeader();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
482 $this->ProcessingTable=true;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
483
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
484 $this->SetFont('Helvetica','',9);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
485 $this->SetFillColor(175, 175, 255);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
486
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
487 $vol = 0;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
488 $arr = json_decode($row['json_mashs'], true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
489 foreach($arr as $item) { //foreach element in $arr
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
490
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
491 if ($item['step_type'] == 0)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
492 $vol += $item['step_infuse_amount'];
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
493 if ($mashkg > 0)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
494 $thick = $vol / $mashkg;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
495 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
496 $thick = 0;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
497 $this->Cell($vul,5,$item['step_name'],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
498 $this->Cell(25,5,$mashtype[$item['step_type']],0,0,'L',true);
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: 655
diff changeset
499 $this->Cell(16,5,sprintf("%.1f",$item['step_temp']),0,0,'R',true);
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: 655
diff changeset
500 $this->Cell(16,5,sprintf("%.1f",$item['end_temp']),0,0,'R',true);
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: 655
diff changeset
501 $this->Cell(15,5,sprintf("%.0f",$item['step_time']),0,0,'R',true);
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: 655
diff changeset
502 $this->Cell(15,5,sprintf("%.0f",$item['ramp_time']),0,0,'R',true);
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: 655
diff changeset
503 $this->Cell(15,5,sprintf("%.2f",$thick),0,0,'R',true);
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: 655
diff changeset
504 if ($item['step_type'] == 1) {
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: 655
diff changeset
505 $this->Cell(18,5,' ',0,0,'R',true);
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: 655
diff changeset
506 $this->Cell(18,5,' ',0,0,'R',true);
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: 655
diff changeset
507 } else {
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: 655
diff changeset
508 $this->Cell(18,5,sprintf("%.1f",$item['step_infuse_amount']),0,0,'R',true);
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: 655
diff changeset
509 $this->Cell(18,5,sprintf("%.1f",$item['step_infuse_temp']),0,0,'R',true);
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: 655
diff changeset
510 }
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
511 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
512 }
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
513 $this->ProcessingTable=false;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
514 $this->cMargin=$cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
515 $this->aCols=array();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
516 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
517 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
518
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
519 function TableWaters($row) {
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
520
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
521 $vul = $this->w - $this->rMargin - $this->lMargin - 137;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
522 if ($this->GetY() > 250)
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
523 $this->AddPage();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
524 else
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
525 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
526 $this->AddCol($vul,'Water bron','L');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
527 $this->AddCol(20,'Volume','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
528 $this->AddCol(15,'Ca','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
529 $this->AddCol(15,'Mg','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
530 $this->AddCol(15,'Na','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
531 $this->AddCol(15,'CaCO3','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
532 $this->AddCol(15,'Cl','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
533 $this->AddCol(15,'SO4','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
534 $this->AddCol(15,'pH','R');
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
535
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
536 $cMargin=$this->cMargin;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
537 $this->cMargin=2;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
538 $this->TableX=$this->lMargin;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
539 $this->TableHeader();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
540 $this->ProcessingTable=true;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
541
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
542 $this->SetFont('Helvetica','',9);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
543 $this->SetFillColor(120, 255, 250);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
544
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
545 $this->Cell($vul,5,$row['w1_name'],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
546 $this->Cell(20,5,sprintf("%.1f", $row['w1_amount']).' L',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
547 $this->Cell(15,5,sprintf("%.1f", $row['w1_calcium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
548 $this->Cell(15,5,sprintf("%.1f", $row['w1_magnesium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
549 $this->Cell(15,5,sprintf("%.1f", $row['w1_sodium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
550 $this->Cell(15,5,sprintf("%.1f", $row['w1_total_alkalinity']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
551 $this->Cell(15,5,sprintf("%.1f", $row['w1_chloride']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
552 $this->Cell(15,5,sprintf("%.1f", $row['w1_sulfate']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
553 $this->Cell(15,5,sprintf("%.1f", $row['w1_ph']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
554 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
555 $this->Cell($vul,5,$row['w2_name'],0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
556 $this->Cell(20,5,sprintf("%.1f", $row['w2_amount']).' L',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
557 $this->Cell(15,5,sprintf("%.1f", $row['w2_calcium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
558 $this->Cell(15,5,sprintf("%.1f", $row['w2_magnesium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
559 $this->Cell(15,5,sprintf("%.1f", $row['w2_sodium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
560 $this->Cell(15,5,sprintf("%.1f", $row['w2_total_alkalinity']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
561 $this->Cell(15,5,sprintf("%.1f", $row['w2_chloride']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
562 $this->Cell(15,5,sprintf("%.1f", $row['w2_sulfate']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
563 $this->Cell(15,5,sprintf("%.1f", $row['w2_ph']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
564 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
565 $this->Cell($vul,5,'Gemengd water',0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
566 $this->Cell(20,5,sprintf("%.1f", $row['wg_amount']).' L',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
567 $this->Cell(15,5,sprintf("%.1f", $row['wg_calcium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
568 $this->Cell(15,5,sprintf("%.1f", $row['wg_magnesium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
569 $this->Cell(15,5,sprintf("%.1f", $row['wg_sodium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
570 $this->Cell(15,5,sprintf("%.1f", $row['wg_total_alkalinity']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
571 $this->Cell(15,5,sprintf("%.1f", $row['wg_chloride']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
572 $this->Cell(15,5,sprintf("%.1f", $row['wg_sulfate']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
573 $this->Cell(15,5,sprintf("%.1f", $row['wg_ph']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
574 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
575 $this->Cell($vul,5,'Behandeld water',0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
576 $this->Cell(20,5,'',0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
577 $this->Cell(15,5,sprintf("%.1f", $row['wb_calcium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
578 $this->Cell(15,5,sprintf("%.1f", $row['wb_magnesium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
579 $this->Cell(15,5,sprintf("%.1f", $row['wb_sodium']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
580 $this->Cell(15,5,sprintf("%.1f", $row['wb_total_alkalinity']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
581 $this->Cell(15,5,sprintf("%.1f", $row['wb_chloride']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
582 $this->Cell(15,5,sprintf("%.1f", $row['wb_sulfate']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
583 $this->Cell(15,5,sprintf("%.1f", $row['wb_ph']),0,0,'R',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
584 $this->ProcessingTable=false;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
585 $this->cMargin=$cMargin;
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
586 $this->aCols=array();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
587 $this->Ln();
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
588 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
589
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
590 function TableSummary($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
591 global $pSugar;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
592 global $pCara;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
593 global $svg;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
594 global $colorw;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
595 global $cost_fermentables;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
596 global $cost_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
597 global $cost_miscs;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
598 global $cost_yeasts;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
599 global $mashkg;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
600 global $colormethod;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
601 global $ibumethod;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
602 /* 2 Columns */
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
603 if ($this->GetY() > 200)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
604 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
605 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
606 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
607 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
608 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
609 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
610 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
611 $this->SetFont('Helvetica','B',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
612 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
613 $this->SetFillColor(255,150,100);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
614 $this->Cell(0, 5, 'Recept samenvatting',0,0,'C',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
615 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
616
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
617 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
618 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
619
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
620 $mashtime = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
621 $mashtemp = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
622 $mash_infuse = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
623 $arr = json_decode($row['json_mashs'], true);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
624 foreach($arr as $item) {
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
625 if ($item['step_type'] == 0) { // infusion
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
626 $mash_infuse += floatval($item['step_infuse_amount']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
627 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
628 if ($item['step_temp'] < 75) { // ignore mashout temps
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
629 $mashtime += floatval($item['step_time']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
630 $mashtemp += floatval($item['step_time']) * floatval($item['step_temp']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
631 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
632 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
633 $mashtemp = $mashtemp / $mashtime;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
634 if (($mashkg > 0) && ($mash_infuse > 0) && ($mashtime > 0) && ($mashtemp > 0)) {
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
635 $row['est_fg'] = estimate_fg($pSugar, $pCara, $mash_infuse / $mashkg, $mashtime, $mashtemp, $svg, $row['est_og']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
636 } else {
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
637 $row['est_fg'] = estimate_fg($pSugar, $pCara, 0, 0, 0, $svg, $row['est_og']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
638 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
639
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
640 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
641 $this->Cell(35,5,'Start SG',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
642 $this->Cell(25,5,sprintf("%.3f",$row['est_og']),0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
643 $this->Cell(25,5,'('.sprintf("%.3f",$row['st_og_min']).' - '.sprintf("%.3f",$row['st_og_max']).')',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
644 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
645 $this->Cell(35,5,'Eind SG',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
646 $this->Cell(25,5,sprintf("%.3f",$row['est_fg']),0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
647 $this->Cell(25,5,'('.sprintf("%.3f",$row['st_fg_min']).' - '.sprintf("%.3f",$row['st_fg_max']).')',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
648 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
649
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
650 $row['est_abv'] = abvol($row['est_og'], $row['est_fg']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
651 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
652 $this->Cell(35,5,'Geschat alcohol',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
653 $this->Cell(25,5,sprintf("%.1f",$row['est_abv']).'%',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
654 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_abv_min']).' - '.sprintf("%.1f",$row['st_abv_max']).'%)',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
655 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
656 $this->Cell(35,5,'CO2',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
657 $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
658 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
659 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
660
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
661 $row['est_color'] = kw_to_ebc($row['color_method'], $colorw);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
662 $this->SetX($this->TableX);
338
a51b858aacca Fixed color and IBU method display in recipe and product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 319
diff changeset
663 $this->Cell(35,5,'Kleur ('.$colormethod[$row['color_method']].')',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
664 $beercolor = ebc_to_color($row['est_color']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
665 if ($row['est_color'] > 30)
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
666 $this->SetTextColor(250);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
667 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
668 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
669 $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
670 $this->SetTextColor(0);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
671 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
672 $this->Cell($vul,5,'',0,0,'L',false);
338
a51b858aacca Fixed color and IBU method display in recipe and product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 319
diff changeset
673 $this->Cell(35,5,'Bitterheid ('.$ibumethod[$row['ibu_method']].')',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
674 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
675 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
676 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
677
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
678 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
679 $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
680 $this->Cell(35,5,'Kosten',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
681 $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
682 $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
683
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
684 // calorieen
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
685 $this->ProcessingTable=false;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
686 $this->cMargin=$cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
687 $this->aCols=array();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
688 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
689 }
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
690
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
691 function Brewday($row) {
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
692
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
693 global $my_brix_correction;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
694 global $my_grain_absorbtion;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
695 global $coolingtype;
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
696 global $aerationtype;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
697
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
698 if ($this->GetY() > 180)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
699 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
700 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
701 $this->Ln(10);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
702
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
703 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
704 $cMargin=$this->cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
705 $this->cMargin=2;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
706 $this->TableX=$this->lMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
707 $this->SetFont('Helvetica','B',9);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
708 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
709 $this->SetFillColor(255,150,100);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
710 $this->Cell(0, 5, 'Brouwdag gegevens',0,0,'C',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
711 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
712
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
713 $this->SetFont('Helvetica','',9);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
714 $this->SetFillColor(210,245,255);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
715
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
716 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
717 $this->Cell(35,5,'Datum start',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
718 $this->Cell(50,5,$row['brew_date_start'],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
719 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
720 $this->Cell(35,5,'Maisch zuurgraad',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
721 $this->Cell(50,5,sprintf("%.1f", $row['brew_mash_ph']).' pH',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
722 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
723
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
724 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
725 $this->Cell(35,5,'Datum eind',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
726 $this->Cell(50,5,$row['brew_date_end'],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
727 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
728 $this->Cell(35,5,'Maisch densiteit',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
729 $this->Cell(50,5,density_str(floatval($row['brew_mash_sg'])),0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
730 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
731
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
732 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
733 $this->Cell(85+$vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
734 $this->Cell(35,5,'Maisch rendement',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
735 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_mash_efficiency']))."%",0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
736 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
737
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
738 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
739 $this->Cell(35,5,'Voor koken zuurgraad',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
740 $this->Cell(50,5,sprintf("%.1f", $row['brew_preboil_ph'])." pH",0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
741 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
742 $this->Cell(35,5,'Na koken zuurgraad',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
743 $this->Cell(50,5,sprintf("%.1f", $row['brew_aboil_ph'])." pH",0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
744 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
745
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
746 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
747 $this->Cell(35,5,'Voor koken densiteit',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
748 $this->Cell(50,5,density_str(floatval($row['brew_preboil_sg'])),0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
749 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
750 $this->Cell(35,5,'Na koken densiteit',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
751 $this->Cell(50,5,density_str(floatval($row['brew_aboil_sg'])),0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
752 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
753
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
754 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
755 $this->Cell(35,5,'Voor koken volume',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
756 $this->Cell(50,5,sprintf("%.1f", $row['brew_preboil_volume'])." liter",0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
757 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
758 $this->Cell(35,5,'Na koken volume',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
759 $this->Cell(50,5,sprintf("%.1f", $row['brew_aboil_volume'])." liter",0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
760 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
761
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
762 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
763 $this->Cell(35,5,'Voor koken rendement',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
764 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_preboil_efficiency']))."%",0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
765 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
766 $this->Cell(35,5,'Na koken rendement',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
767 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_aboil_efficiency']))."%",0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
768 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
769
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
770 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
771 $this->Cell(35,5,'Spoelwater temperatuur',0,0,'L',true);
432
99dcd8488b62 Merged brew_sparge_temperature with sparge_temp and brew_sparge_volume with sparge_volume.
Michiel Broek <mbroek@mbse.eu>
parents: 424
diff changeset
772 $this->Cell(50,5,sprintf("%.1f", $row['sparge_temp']).DEG.'C',0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
773 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
774 $this->Cell(35,5,'Koel methode',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
775 $this->Cell(50,5,$coolingtype[$row['brew_cooling_method']],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
776 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
777
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
778 $this->SetX($this->TableX);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
779 $this->Cell(35,5,'Spoelwater geschat',0,0,'L',true);
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
780 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_sparge_est'])).' liter',0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
781 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
782 $this->Cell(35,5,'Koel temperatuur',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
783 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_cooling_to'])).DEG.'C',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
784 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
785
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
786 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
787 $this->Cell(35,5,'Spoelwater zuurgraad',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
788 $this->Cell(50,5,sprintf("%.1f", $row['brew_sparge_ph']).' pH',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
789 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
790 $this->Cell(35,5,'Koel tijdsduur',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
791 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_cooling_time'])).' minuten',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
792 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
793
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
794 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
795 $this->Cell(35,5,'Whirlpool +85'.DEG.'C',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
796 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool9']).' minuten',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
797 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
798 $this->Cell(35,5,'Koeler & trub verlies',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
799 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_tcloss'])).' liter',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
800 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
801
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
802 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
803 $this->Cell(35,5,'Whirlpool 72..79'.DEG.'C',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
804 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool7']).' minuten',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
805 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
806 $this->Cell(35,5,'Extra water in gistvat',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
807 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_extrawater'])).' liter',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
808 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
809
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
810 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
811 $this->Cell(35,5,'Whirlpool 60..66'.DEG.'C',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
812 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool6']).' minuten',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
813 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
814 $this->Cell(35,5,'Volume naar gistvat',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
815 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_volume'])).' liter',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
816 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
817
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
818 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
819 $this->Cell(35,5,'Whirlpool koud',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
820 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool2']).' minuten',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
821 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
822 $this->Cell(35,5,'Densiteit in gistvat',0,0,'L',true);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
823 $this->Cell(50,5,density_str(floatval($row['brew_fermenter_sg'])),0,0,'L',true);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
824 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
825
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
826 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
827 $this->Cell(35,5,'Beluchten met',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
828 $this->Cell(50,5,$aerationtype[$row['brew_aeration_type']],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
829 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
830 $this->Cell(35,5,'Kleur in gistvat',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
831 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_color'])).' EBC',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
832 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
833
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
834 $this->SetX($this->TableX);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
835 $this->Cell(35,5,'Beluchten snelheid/tijd',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
836 $this->Cell(50,5,$row['brew_aeration_speed'].'/'.$row['brew_aeration_time'],0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
837 $this->Cell($vul,5,'',0,0,'L',false);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
838 $this->Cell(35,5,'Bitterheid in gistvat',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
839 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_ibu'])).' IBU',0,0,'L',true);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
840 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
841 }
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
842
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
843 function Fermentation($row) {
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
844
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
845 if ($this->GetY() > 230)
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
846 $this->AddPage();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
847 else
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
848 $this->Ln(10);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
849
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
850 $vul = $this->w - $this->rMargin - $this->lMargin - 180;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
851 $cMargin=$this->cMargin;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
852 $this->cMargin=2;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
853 $this->TableX=$this->lMargin;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
854 $this->SetFont('Helvetica','B',9);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
855 $this->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
856 $this->SetFillColor(255,150,100);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
857 $this->Cell(0, 5, 'Vergisting gegevens',0,0,'C',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
858 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
859
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
860 $this->SetFont('Helvetica','',9);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
861 $this->SetFillColor(210,245,255);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
862
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
863 $this->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
864 $this->Cell(45,5,'Hoofdvergisting start temp.',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
865 $this->Cell(45,5,sprintf("%.1f",$row['primary_start_temp']).DEG.'C',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
866 $this->Cell($vul,5,'',0,0,'L',false);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
867 $this->Cell(45,5,'Hoofdvergisting piek temp.',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
868 $this->Cell(45,5,sprintf("%.1f",$row['primary_max_temp']).DEG.'C',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
869 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
870
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
871 $this->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
872 $this->Cell(45,5,'Hoofdvergisting eind temp.',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
873 $this->Cell(45,5,sprintf("%.1f",$row['primary_end_temp']).DEG.'C',0,0,'L',true);
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
874 $this->Cell($vul,5,'',0,0,'L',false);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
875 $this->Cell(45,5,'Hoofdvergisting densiteit',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
876 $this->Cell(45,5,sprintf("%.3f",floatval($row['primary_end_sg'])).' SG',0,0,'L',true);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
877 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
878
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
879 $this->SetX($this->TableX);
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
880 $this->Cell(45,5,'Hoofdvergisting einde',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
881 $this->Cell(45,5,$row['primary_end_date'],0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
882 $this->Ln();
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
883
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
884 $this->SetX($this->TableX);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
885 $this->Cell(45,5,'Navergisting tempertuur',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
886 $this->Cell(45,5,sprintf("%.1f", $row['secondary_temp']).DEG.'C',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
887 $this->Cell($vul,5,'',0,0,'L',false);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
888 $this->Cell(45,5,'Nagisten densiteit',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
889 $this->Cell(45,5,sprintf("%.3f",floatval($row['secondary_end_sg'])).' SG',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
890 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
891
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
892 $this->SetX($this->TableX);
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
893 $this->Cell(45,5,'Nagisten einde',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
894 $this->Cell(45,5,$row['secondary_end_date'],0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
895 $this->Ln();
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
896
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
897 $this->SetX($this->TableX);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
898 $this->Cell(45,5,'Lageren temperatuur',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
899 $this->Cell(45,5,sprintf("%.1f",$row['tertiary_temp']).DEG.'C',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
900 $this->Cell($vul,5,'',0,0,'L',false);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
901 $this->Cell(45,5,'Lageren densiteit',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
902 $this->Cell(45,5,sprintf("%.3f",floatval($row['fg'])).' SG',0,0,'L',true);
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
903 $this->Ln();
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
904
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
905 $this->SetX($this->TableX);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
906 $this->Cell(45,5,'Lageren einde',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
907 $this->Cell(45,5,$row['package_date'],0,0,'L',true);
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
908 $this->Cell($vul,5,'',0,0,'L',false);
655
f4e00869f39f Calculate the svg using Brew by the Numbers, Micahel L. Hall.
Michiel Broek <mbroek@mbse.eu>
parents: 622
diff changeset
909 $svg = calc_svg(floatval($row['brew_fermenter_sg']), floatval($row['fg']));
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 449
diff changeset
910 $this->Cell(45,5,'Schijnbare vergistingsgraad',0,0,'L',true);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
911 $this->Cell(45,5,sprintf("%.1f",$svg).'%',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
912 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
913 }
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
914
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
915 function Packaging($row) {
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
916
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
917 global $bottle_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
918 global $bottle_sugar_amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
919 global $keg_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
920 global $keg_sugar_amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
921
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
922 if ($this->GetY() > 230)
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
923 $this->AddPage();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
924 else
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
925 $this->Ln(10);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
926
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
927 $vul = $this->w - $this->rMargin - $this->lMargin - 180;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
928 $cMargin=$this->cMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
929 $this->cMargin=2;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
930 $this->TableX=$this->lMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
931 $this->SetFont('Helvetica','B',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
932 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
933 $this->SetFillColor(255,150,100);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
934 $this->Cell(0, 5, 'Verpakken',0,0,'C',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
935 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
936
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
937 $this->SetFont('Helvetica','',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
938 $this->SetFillColor(210,245,255);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
939
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
940 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
941 $this->Cell(45,5,'Datum verpakken',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
942 $this->Cell(45,5,$row['package_date'],0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
943 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
944 $this->Cell(45,5,'Hoeveelheid',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
945 $this->Cell(45,5,sprintf("%.1f", $row['package_volume']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
946 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
947
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
948 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
949 $this->Cell(45,5,'Alcohol volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
950 $this->Cell(45,5,sprintf("%.1f",$row['package_abv']).'%',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
951 if (($row['package_infuse_amount'] > 0) && ($row['package_infuse_abv'] == 0)) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
952 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
953 $this->Cell(45,5,'Water toevoegen',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
954 $this->Cell(45,5,sprintf("%.1f", $row['package_infuse_amount']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
955 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
956 $this->Ln(7);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
957
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
958 if (($row['package_infuse_amount'] > 0) && ($row['package_infuse_abv'] > 0)) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
959 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
960 $this->Cell(45,5,'Drank toevoegen',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
961 $this->Cell(45,5,sprintf("%.1f",$row['package_infuse_amount']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
962 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
963 $this->Cell(45,5,'Bevat alcohol volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
964 $this->Cell(45,5,sprintf("%.1f", $row['package_infuse_abv']).'%',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
965 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
966
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
967 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
968 $this->Cell(180,5,iconv('UTF-8','windows-1252',$row['package_infuse_notes']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
969 $this->Ln(7);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
970 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
971
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
972 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
973 $this->Cell(45,5,'Flessen volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
974 $this->Cell(45,5,sprintf("%.1f",$row['bottle_amount']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
975 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
976 $this->Cell(45,5,'Fusten volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
977 $this->Cell(45,5,sprintf("%.1f", $row['keg_amount']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
978 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
979
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
980 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
981 $this->Cell(45,5,'CO2 volumes',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
982 $this->Cell(45,5,sprintf("%.2f",$row['bottle_carbonation']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
983 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
984 $this->Cell(45,5,'CO2 volumes',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
985 $this->Cell(45,5,sprintf("%.2f", $row['keg_carbonation']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
986 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
987
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
988 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
989 $this->Cell(45,5,'Suiker',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
990 $this->Cell(45,5,$bottle_sugar,0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
991 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
992 $this->Cell(45,5,'Suiker',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
993 $this->Cell(45,5,$keg_sugar,0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
994 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
995
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
996 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
997 $this->Cell(45,5,'Hoeveelheid',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
998 $this->Cell(45,5,sprintf("%.1f",$row['bottle_priming_amount']).' gram/liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
999 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1000 if ($row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1001 $this->Cell(45,5,'Geforceerd op druk zetten',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1002 $this->Cell(45,5,'Ja',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1003 } else {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1004 $this->Cell(45,5,'Hoeveelheid',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1005 $this->Cell(45,5,sprintf("%.1f", $row['keg_priming_amount']).' gram/liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1006 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1007 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1008
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1009 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1010 $this->Cell(45,5,'Totaal suiker',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1011 $this->Cell(45,5,sprintf("%.3f",$bottle_sugar_amount).' kg',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1012 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1013 if ($row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1014 $this->Cell(45,5,'Druk op fust',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1015 $this->Cell(45,5,sprintf("%.1f",$row['keg_pressure']).' bar',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1016 } else {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1017 $this->Cell(45,5,'Totaal suiker',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1018 $this->Cell(45,5,sprintf("%.3f",$keg_sugar_amount).' kg',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1019 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1020 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1021
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1022 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1023 $this->Cell(45,5,'Water oplossen',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1024 $this->Cell(45,5,sprintf("%.3f",$row['bottle_priming_water']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1025 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1026 if (! $row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1027 $this->Cell(45,5,'Water oplossen',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1028 $this->Cell(45,5,sprintf("%.3f",$row['keg_priming_water']).' liter',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1029 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1030 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1031
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1032 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1033 $this->Cell(45,5,'Alcohol volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1034 $this->Cell(45,5,sprintf("%.1f",$row['package_abv'] + $row['bottle_priming_amount'] * 0.47 / 7.907).'%',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1035 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1036 $this->Cell(45,5,'Alcohol volume',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1037 $this->Cell(45,5,sprintf("%.1f",$row['package_abv'] + $row['keg_priming_amount'] * 0.47 / 7.907).'%',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1038 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1039
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1040 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1041 $this->Cell(45,5,'Hergisting temperatuur',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1042 $this->Cell(45,5,sprintf("%.1f",$row['bottle_carbonation_temp']).DEG.'C',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1043 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1044 $this->Cell(45,5,'Hergisting temperatuur',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1045 $this->Cell(45,5,sprintf("%.1f", $row['keg_carbonation_temp']).DEG.'C',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1046 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1047 }
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1048
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1049 function Tasting($row) {
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1050
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1051 if ($this->GetY() > 200)
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1052 $this->AddPage();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1053 else
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1054 $this->Ln(10);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1055
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1056 $vul = $this->w - $this->rMargin - $this->lMargin - 180;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1057 $cMargin=$this->cMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1058 $this->cMargin=2;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1059 $this->TableX=$this->lMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1060 $this->SetFont('Helvetica','B',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1061 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1062 $this->SetFillColor(255,150,100);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1063 $this->Cell(0, 5, 'Proef notities',0,0,'C',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1064 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1065
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1066 $this->SetFont('Helvetica','',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1067 $this->SetFillColor(210,245,255);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1068
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1069 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1070 $this->Cell(45,5,'Proeven datum',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1071 $this->Cell(45,5,$row['taste_date'],0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1072 $this->Cell($vul,5,'',0,0,'L',false);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1073 $this->Cell(45,5,'Waardering',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1074 $this->Cell(45,5,sprintf("%.1f", $row['taste_rate']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1075 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1076
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1077 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1078 $this->Cell(45,5,'Kleur',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1079 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_color']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1080 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1081
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1082 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1083 $this->Cell(45,5,'Helderheid',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1084 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_transparency']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1085 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1086
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1087 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1088 $this->Cell(45,5,'Schuim',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1089 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_head']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1090 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1091
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1092 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1093 $this->Cell(45,5,'Aroma',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1094 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_aroma']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1095 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1096
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1097 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1098 $this->Cell(45,5,'Smaak',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1099 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_taste']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1100 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1101
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1102 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1103 $this->Cell(45,5,'Mondgevoel',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1104 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_mouthfeel']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1105 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1106
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1107 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1108 $this->Cell(45,5,'Nasmaak',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1109 $this->Cell($vul+135,5,iconv('UTF-8','windows-1252',$row['taste_aftertaste']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1110 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1111
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1112 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1113 $this->Cell(45,5,'Notities',0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1114 $this->MultiCell(0,5,iconv('UTF-8','windows-1252',$row['taste_notes']),0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1115 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1116 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1117 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1118
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1119
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1120
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1121 class PDF extends PDF_MySQL_Table {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1122 function Header() {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1123 global $row;
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1124 global $prdate;
514
3c680d1dea35 Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
1125 global $stage;
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1126 global $divide_parts;
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1127 global $divide_part;
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
1128 $this->Image('images/logo.png',10,10,30);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1129 // Title
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1130 $this->SetFont('Helvetica','B',18);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1131 $this->SetX(45);
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
1132 $this->Cell(0,8,$row['code'].' '.$row['name'],0,1,'L');
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1133 $this->Ln(1);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1134 $this->SetFont('Helvetica','',10);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1135 $this->SetX(45);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1136 $this->Cell(17,5,'Datum:',0,0,'L');
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1137 $this->Cell(0,5,$prdate,0,1,'L');
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1138 $this->SetX(45);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1139 $this->Cell(17,5,'Stijl:',0,0,'L');
589
b6a73022abe7 Fix encoding of the beerstyle name.
Michiel Broek <mbroek@mbse.eu>
parents: 543
diff changeset
1140 $st_name = iconv('UTF-8','windows-1252',$row['st_name']);
b6a73022abe7 Fix encoding of the beerstyle name.
Michiel Broek <mbroek@mbse.eu>
parents: 543
diff changeset
1141 $this->Cell(0,5,$st_name,0,1,'L');
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1142 $this->SetX(45);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1143 $this->Cell(17,5,'Fase:',0,0,'L');
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1144 $this->Cell(0,5,$stage[$row['stage']],0,1,'L');
534
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1145 $this->SetX(45);
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1146 $this->Cell(17,5,'Batch:',0,0,'L');
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1147 if ($divide_parts == 0)
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1148 $this->Cell(0,5,"Niet gespitst",0,1,'L');
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1149 else
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1150 $this->Cell(0,5,"Split batch ".($divide_part + 1)." van ".($divide_parts + 1),0,1,'L');
01fa81a33b70 Product print shows split batch information. All calculations are done on the split batch data, not the whole batch.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
1151 $this->Ln(2);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1152 // Ensure table header is printed
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1153 parent::Header();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1154 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1155 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1156
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1157
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1158 /*
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1159 * Generate PDF from recipe data
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1160 */
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1161 $pdf = new PDF();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1162 $pdf->AddPage();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1163 $pdf->TableGlobal($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1164 $pdf->TableFermentables($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1165 $pdf->TableHops($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1166 $pdf->TableYeasts($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1167 $pdf->TableMiscs($row);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1168 $pdf->TableMashs($row);
392
544d7d0183b2 Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents: 391
diff changeset
1169 $pdf->TableWaters($row);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1170 $pdf->TableSummary($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1171 if (strlen($row['notes'])) {
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1172 if ($pdf->GetY() > 200)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1173 $pdf->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1174 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1175 $pdf->Ln(10);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1176 $pdf->SetFillColor(255,150,100);
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1177 $pdf->SetFont('Helvetica','B',9);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1178 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1179 $pdf->Ln();
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1180 $pdf->SetFont('Helvetica','',9);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1181 $pdf->SetFillColor(210,245,255);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1182 $pdf->MultiCell(0,4,iconv('UTF-8','windows-1252',$row['notes']),0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1183 }
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1184
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1185 if ($row['stage'] > 2) {
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1186 $pdf->Brewday($row);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1187 }
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1188
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1189 if ($row['stage'] > 3) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1190 $pdf->Fermentation($row);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1191 }
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1192 if ($row['stage'] > 6) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1193 $pdf->Packaging($row);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1194 }
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1195 if ($row['stage'] > 9) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1196 $pdf->Tasting($row);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1197 }
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 165
diff changeset
1198
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1199 $pdf->Output();

mercurial