www/prod_print.php

Wed, 06 May 2020 14:14:14 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 06 May 2020 14:14:14 +0200
changeset 667
1246550451ca
parent 655
f4e00869f39f
child 670
638e7dd1d560
permissions
-rw-r--r--

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.

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);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
215 $this->Cell(15,5,sprintf("%.1f%%",$percent),0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
216 $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
217 $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
218 $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
219 $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
220 $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
221 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
222 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
223
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
224 $row['est_og'] = estimate_sg($sugarsf, floatval($row['batch_size']));
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
225 $preboil_sg = estimate_sg($sugarsm, floatval($row['boil_size']));
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226 $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
227 $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
228 $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
229 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 $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
232 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 function TableHops($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 global $total_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237 global $total_ibus;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238 global $cost_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 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
240 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
241 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
242 $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
243 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
244 $this->AddCol($vul,'Hop','L');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 $this->AddCol(15,'Alpha','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246 $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
247 $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
248 $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
249 $this->AddCol(20,'Hoeveel','R');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
250 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
251
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
252 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
255 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259 $this->SetFillColor(100, 250, 65);
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 $arr = json_decode($row['json_hops'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 foreach($arr as $item) { //foreach element in $arr
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
263 $name = iconv('UTF-8','windows-1252',$item['h_name']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
264 $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
265 $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
266 $mass = $amount * 1000;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
267 $costkg = floatval($item['h_cost']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
268 $time = floatval($item['h_time']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
269 $alpha = floatval($item['h_alpha']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
270
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
271 $cost = ($amount * $costkg);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
272 $cost_hops += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
273 $total_hops += $amount;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
274
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
275 $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
276 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
277 $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
278 } 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
279 $moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen';
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
280 }
539
fe9ac6d49c4f Printed outputs have IBUs for whirlpool hops. Removed some debug console logs.
Michiel Broek <mbroek@mbse.eu>
parents: 516
diff changeset
281 $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
282 $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
283 $total_ibus += $ibu;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
284
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
285 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
286 $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
287 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
288 $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
289
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 $this->Cell($vul,5,$name.' ('.$origin.')',0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
291 $this->Cell(15,5,sprintf("%.1f%%",$alpha),0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
292 $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
293 $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
294 $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
295 $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
296 $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
297 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
299
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 $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
301 $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
302 $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
303 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
304 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
305 $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
306 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309 function TableYeasts($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310 global $cost_yeasts;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
311 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
312 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
313 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
314 $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
315 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
316 $this->AddCol($vul,'Gist','L');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
317 $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
318 $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
319 $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
320 $this->AddCol(20,'Hoeveel','R');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
321 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
322
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
323 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
324 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
328
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
329 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 $this->SetFillColor(175, 175, 255);
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 $arr = json_decode($row['json_yeasts'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 foreach($arr as $item) { //foreach element in $arr
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 $name = iconv('UTF-8','windows-1252',$item['y_name']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 $laboratory = iconv('UTF-8','windows-1252',$item['y_laboratory']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
336 $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
337 $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
338 $cost = floatval($item['y_amount']) * floatval($item['y_cost']);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
339 $cost_yeasts += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
340
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 if ($item['y_use'] == 0) // Primary
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
342 $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
343 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
344 $amount = sprintf("%.0f",floatval($item['y_amount']))." pak";
516
28670364bd0c Added dried yeast form.
Michiel Broek <mbroek@mbse.eu>
parents: 514
diff changeset
345 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
346 $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
347 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
348 $amount = sprintf("%.0f",floatval($item['y_amount'])*1000)." ml";
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
349
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
350 $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
351 $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
352 $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
353 $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
354 $this->Cell(20,5,$amount,0,0,'R',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
355 $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
356 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
357 }
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
358 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
359 $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
360 $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
361 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
362 $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
363 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
364 $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
365 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
366 $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
367 }
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 }
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 $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
370 $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
371 $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
372 $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
373 $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
374 $this->Ln();
293
db898ec73277 Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents: 289
diff changeset
375 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
376
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
377 $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
378 $this->Cell($vul+90,5,'',0,0,'L',false);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
379 $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
380 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
381 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
382 $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
383 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
384 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
385
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
386 function TableMiscs($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
387 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
388 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
389 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
390 $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
391 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
392 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
393 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
394 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
395 $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
396 $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
397 $this->AddCol(30,'Gebruik moment','L');
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
398 $this->AddCol(20,'Hoeveel','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
399 $this->AddCol(20,'Prijs','R');
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
400
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
401 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
402 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
403 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
404 $this->TableHeader();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
405 $this->ProcessingTable=true;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
406
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
407 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
408 $this->SetFillColor(175, 175, 255);
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 $arr = json_decode($row['json_miscs'], true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
411 foreach($arr as $item) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
412 $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
413 $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
414 $use_use = $item['m_use_use'];
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
415 $amount = floatval($item['m_amount']) * 1000;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
416 $costg = floatval($item['m_cost']) / 1000;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
417 $time = floatval($item['m_time']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
418 $aiw = $item['m_amount_is_weight'];
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
419 $cost = $amount * $costg;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
420 $cost_miscs += $cost;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
421
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
422 if ($type == 4) // Water agent
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
423 $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
424 else if ($type == 3) // Fining
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
425 $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
426 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
427 $this->SetFillColor(240,250,65);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
428 else
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
429 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
430
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
431 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
432 $gebruik = sprintf("%s %d min",$miscuse[$use_use],$time);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
433 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
434 $gebruik = $miscuse[$use_use];
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
435
357
74d56bed75b9 One more decimal digit for misc ingredients. Updated the README.
Michiel Broek <mbroek@mbse.eu>
parents: 338
diff changeset
436 $hoeveel = sprintf("%.2f %s",$amount,$aiw ? "gr":"ml");
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
437 $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
438 $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
439 $this->Cell(30,5,$gebruik,0,0,'L',true);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
440 $this->Cell(20,5,$hoeveel,0,0,'R',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
441 $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
442 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
443 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
444
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
445 $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
446 $this->Cell($vul+75,5,'',0,0,'L',false);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
447 $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
448
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
449 $this->ProcessingTable=false;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
450 $this->cMargin=$cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
451 $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
452 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
453 }
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
454
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
455 function TableMashs($row) {
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
456 global $cost_yeasts;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
457 global $svg;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
458 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
459 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
460 $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
461 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
462 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
463 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
464 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
465 $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
466 $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
467 $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
468 $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
469 $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
470 $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
471 $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
472 $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
473 $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
474
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
475 $cMargin=$this->cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
476 $this->cMargin=2;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
477 $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
478 $this->TableHeader();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
479 $this->ProcessingTable=true;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
480
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
481 $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
482 $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
483
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
484 $vol = 0;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
485 $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
486 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
487
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
488 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
489 $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
490 if ($mashkg > 0)
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
491 $thick = $vol / $mashkg;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
492 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
493 $thick = 0;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
494 $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
495 $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
496 $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
497 $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
498 $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
499 $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
500 $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
501 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
502 $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
503 $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
504 } 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
505 $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
506 $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
507 }
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
508 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
509 }
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
510 $this->ProcessingTable=false;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
511 $this->cMargin=$cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
512 $this->aCols=array();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
513 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
514 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
515
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
516 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
517
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
518 $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
519 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
520 $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
521 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
522 $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
523 $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
524 $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
525 $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
526 $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
527 $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
528 $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
529 $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
530 $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
531 $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
532
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 $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
534 $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
535 $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
536 $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
537 $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
538
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->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
540 $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
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->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
543 $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
544 $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
545 $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
546 $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
547 $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
548 $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
549 $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
550 $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
551 $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
552 $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
553 $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
554 $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
555 $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
556 $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
557 $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
558 $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
559 $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
560 $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
561 $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
562 $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
563 $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
564 $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
565 $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
566 $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
567 $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
568 $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
569 $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
570 $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
571 $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
572 $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
573 $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
574 $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
575 $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
576 $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
577 $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
578 $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
579 $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
580 $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
581 $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
582 $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
583 $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
584 $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
585 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
586
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
587 function TableSummary($row) {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
588 global $pSugar;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
589 global $pCara;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
590 global $svg;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
591 global $colorw;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
592 global $cost_fermentables;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
593 global $cost_hops;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
594 global $cost_miscs;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
595 global $cost_yeasts;
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
596 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
597 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
598 global $ibumethod;
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
599 /* 2 Columns */
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
600 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
601 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
602 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
603 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
604 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
605 $cMargin=$this->cMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
606 $this->cMargin=2;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
607 $this->TableX=$this->lMargin;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
608 $this->SetFont('Helvetica','B',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
609 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
610 $this->SetFillColor(255,150,100);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
611 $this->Cell(0, 5, 'Recept samenvatting',0,0,'C',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
612 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
613
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
614 $this->SetFont('Helvetica','',9);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
615 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
616
275
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
617 $mashtime = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
618 $mashtemp = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
619 $mash_infuse = 0;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
620 $arr = json_decode($row['json_mashs'], true);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
621 foreach($arr as $item) {
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
622 if ($item['step_type'] == 0) { // infusion
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
623 $mash_infuse += floatval($item['step_infuse_amount']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
624 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
625 if ($item['step_temp'] < 75) { // ignore mashout temps
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
626 $mashtime += floatval($item['step_time']);
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
627 $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
628 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
629 }
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
630 $mashtemp = $mashtemp / $mashtime;
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
631 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
632 $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
633 } else {
fb1e88f1c643 Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents: 247
diff changeset
634 $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
635 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
636
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
637 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
638 $this->Cell(35,5,'Start SG',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
639 $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
640 $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
641 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
642 $this->Cell(35,5,'Eind SG',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
643 $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
644 $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
645 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
646
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
647 $row['est_abv'] = abvol($row['est_og'], $row['est_fg']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
648 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
649 $this->Cell(35,5,'Geschat alcohol',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
650 $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
651 $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
652 $this->Cell($vul,5,'',0,0,'L',false);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
653 $this->Cell(35,5,'CO2',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
654 $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
655 $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
656 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
657
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
658 $row['est_color'] = kw_to_ebc($row['color_method'], $colorw);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
659 $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
660 $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
661 $beercolor = ebc_to_color($row['est_color']);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
662 if ($row['est_color'] > 30)
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
663 $this->SetTextColor(250);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
664 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
665 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
666 $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
667 $this->SetTextColor(0);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
668 $this->SetFillColor(210,245,255);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
669 $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
670 $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
671 $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
672 $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
673 $this->Ln();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
674
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
675 $this->SetX($this->TableX);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
676 $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts;
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
677 $this->Cell(35,5,'Kosten',0,0,'L',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
678 $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
679 $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
680
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
681 // calorieen
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
682 $this->ProcessingTable=false;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
683 $this->cMargin=$cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
684 $this->aCols=array();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
685 $this->Ln();
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
686 }
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
687
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
688 function Brewday($row) {
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
689
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
690 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
691 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
692 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
693 global $aerationtype;
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
694
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
695 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
696 $this->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
697 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
698 $this->Ln(10);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
699
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
700 $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
701 $cMargin=$this->cMargin;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
702 $this->cMargin=2;
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
703 $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
704 $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
705 $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
706 $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
707 $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
708 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
709
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
710 $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
711 $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
712
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
713 $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
714 $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
715 $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
716 $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
717 $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
718 $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
719 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
720
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
721 $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
722 $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
723 $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
724 $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
725 $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
726 $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
727 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
728
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
729 $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
730 $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
731 $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
732 $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
733 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
734
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
735 $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
736 $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
737 $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
738 $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
739 $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
740 $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
741 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
742
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
743 $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
744 $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
745 $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
746 $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
747 $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
748 $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
749 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
750
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
751 $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
752 $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
753 $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
754 $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
755 $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
756 $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
757 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
758
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
759 $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
760 $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
761 $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
762 $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
763 $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
764 $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
765 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
766
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
767 $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
768 $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
769 $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
770 $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
771 $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
772 $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
773 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
774
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
775 $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
776 $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
777 $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
778 $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
779 $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
780 $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
781 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
782
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
783 $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
784 $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
785 $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
786 $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
787 $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
788 $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
789 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
790
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
791 $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
792 $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
793 $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
794 $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
795 $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
796 $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
797 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
798
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
799 $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
800 $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
801 $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
802 $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
803 $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
804 $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
805 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
806
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
807 $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
808 $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
809 $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
810 $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
811 $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
812 $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
813 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
814
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
815 $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
816 $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
817 $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
818 $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
819 $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
820 $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
821 $this->Ln(7);
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
822
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
823 $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
824 $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
825 $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
826 $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
827 $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
828 $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
829 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
830
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
831 $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
832 $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
833 $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
834 $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
835 $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
836 $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
837 $this->Ln();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
838 }
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
839
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
840 function Fermentation($row) {
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
841
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
842 if ($this->GetY() > 230)
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
843 $this->AddPage();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
844 else
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
845 $this->Ln(10);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
846
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
847 $vul = $this->w - $this->rMargin - $this->lMargin - 180;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
848 $cMargin=$this->cMargin;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
849 $this->cMargin=2;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
850 $this->TableX=$this->lMargin;
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
851 $this->SetFont('Helvetica','B',9);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
852 $this->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
853 $this->SetFillColor(255,150,100);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
854 $this->Cell(0, 5, 'Vergisting gegevens',0,0,'C',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
855 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
856
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
857 $this->SetFont('Helvetica','',9);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
858 $this->SetFillColor(210,245,255);
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->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
861 $this->Cell(45,5,'Hoofdvergisting start temp.',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
862 $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
863 $this->Cell($vul,5,'',0,0,'L',false);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
864 $this->Cell(45,5,'Hoofdvergisting piek 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_max_temp']).DEG.'C',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
866 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
867
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
868 $this->SetX($this->TableX);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
869 $this->Cell(45,5,'Hoofdvergisting eind temp.',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
870 $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
871 $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
872 $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
873 $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
874 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
875
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
876 $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
877 $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
878 $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
879 $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
880
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->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
882 $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
883 $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
884 $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
885 $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
886 $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
887 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
888
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
889 $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
890 $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
891 $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
892 $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
893
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->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
895 $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
896 $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
897 $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
898 $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
899 $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
900 $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
901
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->SetX($this->TableX);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
903 $this->Cell(45,5,'Lageren einde',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
904 $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
905 $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
906 $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
907 $this->Cell(45,5,'Schijnbare vergistingsgraad',0,0,'L',true);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
908 $this->Cell(45,5,sprintf("%.1f",$svg).'%',0,0,'L',true);
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
909 $this->Ln();
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
910 }
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
911
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
912 function Packaging($row) {
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
913
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
914 global $bottle_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
915 global $bottle_sugar_amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
916 global $keg_sugar;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
917 global $keg_sugar_amount;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
918
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
919 if ($this->GetY() > 230)
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
920 $this->AddPage();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
921 else
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
922 $this->Ln(10);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
923
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
924 $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
925 $cMargin=$this->cMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
926 $this->cMargin=2;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
927 $this->TableX=$this->lMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
928 $this->SetFont('Helvetica','B',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
929 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
930 $this->SetFillColor(255,150,100);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
931 $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
932 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
933
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
934 $this->SetFont('Helvetica','',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
935 $this->SetFillColor(210,245,255);
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->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
938 $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
939 $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
940 $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
941 $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
942 $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
943 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
944
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
945 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
946 $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
947 $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
948 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
949 $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
950 $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
951 $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
952 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
953 $this->Ln(7);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
954
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
955 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
956 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
957 $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
958 $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
959 $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
960 $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
961 $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
962 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
963
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
964 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
965 $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
966 $this->Ln(7);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
967 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
968
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
969 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
970 $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
971 $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
972 $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
973 $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
974 $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
975 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
976
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
977 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
978 $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
979 $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
980 $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
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['keg_carbonation']),0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
983 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
984
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
985 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
986 $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
987 $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
988 $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
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,$keg_sugar,0,0,'L',true);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
991 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
992
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
993 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
994 $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
995 $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
996 $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
997 if ($row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
998 $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
999 $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
1000 } else {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1001 $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
1002 $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
1003 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1004 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1005
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1006 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1007 $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
1008 $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
1009 $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
1010 if ($row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1011 $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
1012 $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
1013 } else {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1014 $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
1015 $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
1016 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1017 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1018
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1019 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1020 $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
1021 $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
1022 $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
1023 if (! $row['keg_forced_carb']) {
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1024 $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
1025 $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
1026 }
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1027 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1028
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1029 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1030 $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
1031 $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
1032 $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
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['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
1035 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1036
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1037 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1038 $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
1039 $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
1040 $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
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['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
1043 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1044 }
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1045
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1046 function Tasting($row) {
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1047
424
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1048 if ($this->GetY() > 200)
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1049 $this->AddPage();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1050 else
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1051 $this->Ln(10);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1052
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1053 $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
1054 $cMargin=$this->cMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1055 $this->cMargin=2;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1056 $this->TableX=$this->lMargin;
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1057 $this->SetFont('Helvetica','B',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1058 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1059 $this->SetFillColor(255,150,100);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1060 $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
1061 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1062
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1063 $this->SetFont('Helvetica','',9);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1064 $this->SetFillColor(210,245,255);
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->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1067 $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
1068 $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
1069 $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
1070 $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
1071 $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
1072 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1073
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1074 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1075 $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
1076 $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
1077 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1078
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1079 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1080 $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
1081 $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
1082 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1083
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1084 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1085 $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
1086 $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
1087 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1088
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1089 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1090 $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
1091 $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
1092 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1093
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1094 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1095 $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
1096 $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
1097 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1098
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1099 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1100 $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
1101 $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
1102 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1103
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1104 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1105 $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
1106 $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
1107 $this->Ln();
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1108
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1109 $this->SetX($this->TableX);
7d231014b301 Added packaging and tasting to print product.
Michiel Broek <mbroek@mbse.eu>
parents: 421
diff changeset
1110 $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
1111 $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
1112 $this->Ln();
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1113 }
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1114 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1115
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1116
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 class PDF extends PDF_MySQL_Table {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1119 function Header() {
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1120 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
1121 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
1122 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
1123 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
1124 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
1125 $this->Image('images/logo.png',10,10,30);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1126 // Title
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1127 $this->SetFont('Helvetica','B',18);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1128 $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
1129 $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
1130 $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
1131 $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
1132 $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
1133 $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
1134 $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
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,'Stijl:',0,0,'L');
589
b6a73022abe7 Fix encoding of the beerstyle name.
Michiel Broek <mbroek@mbse.eu>
parents: 543
diff changeset
1137 $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
1138 $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
1139 $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
1140 $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
1141 $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
1142 $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
1143 $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
1144 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
1145 $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
1146 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
1147 $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
1148 $this->Ln(2);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1149 // Ensure table header is printed
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1150 parent::Header();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1151 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1152 }
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1153
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 * Generate PDF from recipe data
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 $pdf = new PDF();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1159 $pdf->AddPage();
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1160 $pdf->TableGlobal($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1161 $pdf->TableFermentables($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1162 $pdf->TableHops($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1163 $pdf->TableYeasts($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1164 $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
1165 $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
1166 $pdf->TableWaters($row);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1167 $pdf->TableSummary($row);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1168 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
1169 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
1170 $pdf->AddPage();
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1171 else
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1172 $pdf->Ln(10);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1173 $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
1174 $pdf->SetFont('Helvetica','B',9);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1175 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true);
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1176 $pdf->Ln();
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','',9);
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1178 $pdf->SetFillColor(210,245,255);
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1179 $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
1180 }
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
1181
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1182 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
1183 $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
1184 }
391
a1bcebc61ddd Added mash schedule and brewday data to the product print pages.
Michiel Broek <mbroek@mbse.eu>
parents: 357
diff changeset
1185
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
1186 if ($row['stage'] > 3) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1187 $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
1188 }
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'] > 6) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1190 $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
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'] > 9) {
421
0bc45502144b Print fermentation summary
Michiel Broek <mbroek@mbse.eu>
parents: 407
diff changeset
1193 $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
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
165
5970c8377b89 Added product print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1196 $pdf->Output();

mercurial