790 $this->Cell($vul,5,'',0,0,'L',false); |
790 $this->Cell($vul,5,'',0,0,'L',false); |
791 $this->Cell(35,5,'Bitterheid in gistvat',0,0,'L',true); |
791 $this->Cell(35,5,'Bitterheid in gistvat',0,0,'L',true); |
792 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_ibu'])).' IBU',0,0,'L',true); |
792 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_ibu'])).' IBU',0,0,'L',true); |
793 $this->Ln(); |
793 $this->Ln(); |
794 } |
794 } |
|
795 |
|
796 function Fermentation($row) { |
|
797 /* |
|
798 * primary_start_temp primary_max_temp primary_end_temp primary_end_sg primary_end_date |
|
799 * secondary_temp secondary_end_date |
|
800 * tertiary_temp package_date |
|
801 */ |
|
802 if ($this->GetY() > 180) |
|
803 $this->AddPage(); |
|
804 else |
|
805 $this->Ln(10); |
|
806 |
|
807 $vul = $this->w - $this->rMargin - $this->lMargin - 180; |
|
808 $cMargin=$this->cMargin; |
|
809 $this->cMargin=2; |
|
810 $this->TableX=$this->lMargin; |
|
811 $this->SetFont('Helvetica','B',9); |
|
812 $this->SetX($this->TableX); |
|
813 $this->SetFillColor(255,150,100); |
|
814 $this->Cell(0, 5, 'Vergisting gegevens',0,0,'C',true); |
|
815 $this->Ln(); |
|
816 |
|
817 $this->SetFont('Helvetica','',9); |
|
818 $this->SetFillColor(210,245,255); |
|
819 |
|
820 $this->SetX($this->TableX); |
|
821 $this->Cell(45,5,'Hoofdvergisting start temp.',0,0,'L',true); |
|
822 $this->Cell(45,5,sprintf("%.1f",$row['primary_start_temp']).DEG.'C',0,0,'L',true); |
|
823 $this->Cell($vul,5,'',0,0,'L',false); |
|
824 $this->Cell(45,5,'Navergisting tempertuur',0,0,'L',true); |
|
825 $this->Cell(45,5,sprintf("%.1f", $row['secondary_temp']).DEG.'C',0,0,'L',true); |
|
826 $this->Ln(); |
|
827 |
|
828 $this->SetX($this->TableX); |
|
829 $this->Cell(45,5,'Hoofdvergisting piek temp.',0,0,'L',true); |
|
830 $this->Cell(45,5,sprintf("%.1f",$row['primary_max_temp']).DEG.'C',0,0,'L',true); |
|
831 $this->Cell($vul,5,'',0,0,'L',false); |
|
832 $this->Cell(45,5,'Navergisting einde',0,0,'L',true); |
|
833 $this->Cell(45,5,$row['secondary_end_date'],0,0,'L',true); |
|
834 $this->Ln(); |
|
835 |
|
836 $this->SetX($this->TableX); |
|
837 $this->Cell(45,5,'Hoofdvergisting eind temp.',0,0,'L',true); |
|
838 $this->Cell(45,5,sprintf("%.1f",$row['primary_end_temp']).DEG.'C',0,0,'L',true); |
|
839 $this->Cell($vul,5,'',0,0,'L',false); |
|
840 $this->Cell(45,5,'Lageren temperatuur',0,0,'L',true); |
|
841 $this->Cell(45,5,sprintf("%.1f",$row['tertiary_temp']).DEG.'C',0,0,'L',true); |
|
842 $this->Ln(); |
|
843 |
|
844 $this->SetX($this->TableX); |
|
845 $this->Cell(45,5,'Hoofdvergisting densiteit',0,0,'L',true); |
|
846 $this->Cell(45,5,density_str(floatval($row['primary_end_sg'])),0,0,'L',true); |
|
847 $this->Cell($vul,5,'',0,0,'L',false); |
|
848 $this->Cell(45,5,'Lageren densiteit',0,0,'L',true); |
|
849 $this->Cell(45,5,density_str(floatval($row['fg'])),0,0,'L',true); |
|
850 $this->Ln(); |
|
851 |
|
852 $this->SetX($this->TableX); |
|
853 $this->Cell(45,5,'Hoofdvergisting einde',0,0,'L',true); |
|
854 $this->Cell(45,5,$row['primary_end_date'],0,0,'L',true); |
|
855 $this->Cell($vul,5,'',0,0,'L',false); |
|
856 $this->Cell(45,5,'Lageren einde',0,0,'L',true); |
|
857 $this->Cell(45,5,$row['package_date'],0,0,'L',true); |
|
858 $this->Ln(); |
|
859 |
|
860 $svg = 100 * (floatval($row['brew_fermenter_sg']) - floatval($row['fg'])) / (floatval($row['brew_fermenter_sg']) - 1); |
|
861 $this->SetX($this->TableX); |
|
862 $this->Cell($vul+90,5,'',0,0,'L',false); |
|
863 $this->Cell(45,5,'Schijnbare vergistingsgraad',0,0,'L',true); |
|
864 $this->Cell(45,5,sprintf("%.1f",$svg).'%',0,0,'L',true); |
|
865 $this->Ln(); |
|
866 } |
|
867 |
|
868 function Packaging($row) { |
|
869 |
|
870 } |
|
871 |
|
872 function Tasting($row) { |
|
873 |
|
874 } |
795 } |
875 } |
796 |
876 |
797 |
877 |
798 |
878 |
799 class PDF extends PDF_MySQL_Table { |
879 class PDF extends PDF_MySQL_Table { |
846 $pdf->SetFont('Helvetica','B',9); |
926 $pdf->SetFont('Helvetica','B',9); |
847 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true); |
927 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true); |
848 $pdf->Ln(); |
928 $pdf->Ln(); |
849 $pdf->SetFont('Helvetica','',9); |
929 $pdf->SetFont('Helvetica','',9); |
850 $pdf->SetFillColor(210,245,255); |
930 $pdf->SetFillColor(210,245,255); |
851 $pdf->MultiCell(0,4,$row['notes'],0,'L',true); |
931 $pdf->MultiCell(0,4,iconv('UTF-8','windows-1252',$row['notes']),0,'L',true); |
852 } |
932 } |
853 |
933 |
854 if ($row['stage'] > 2) { |
934 if ($row['stage'] > 2) { |
855 $pdf->Brewday($row); |
935 $pdf->Brewday($row); |
856 } |
936 } |
857 |
937 |
858 if ($row['stage'] > 3) { |
938 if ($row['stage'] > 3) { |
859 // Vergisting gegevens |
939 $pdf->Fermentation($row); |
860 } |
940 } |
861 if ($row['stage'] > 6) { |
941 if ($row['stage'] > 6) { |
862 // Package report |
942 $pdf->Packaging($row); |
863 } |
943 } |
864 if ($row['stage'] > 9) { |
944 if ($row['stage'] > 9) { |
865 // Taste notes |
945 $pdf->Tasting($row); |
866 } |
946 } |
867 |
947 |
868 $pdf->Output(); |
948 $pdf->Output(); |