www/prod_print.php

changeset 396
804800d8e885
parent 392
544d7d0183b2
child 398
7e8f1a7ddeeb
equal deleted inserted replaced
395:463d64cce768 396:804800d8e885
235 $cost = ($amount * $costkg); 235 $cost = ($amount * $costkg);
236 $cost_hops += $cost; 236 $cost_hops += $cost;
237 $total_hops += $amount; 237 $total_hops += $amount;
238 238
239 $moment = $hopuse[$item['h_useat']]; 239 $moment = $hopuse[$item['h_useat']];
240 if ($item['h_useat'] == 2) { // Boil 240 if (($item['h_useat'] == 2) || ($item['h_useat'] == 4)) { // Boil or Whirlpool
241 $moment = "Koken ".$time." min"; 241 $moment = $hopuse[$item['h_useat']].' '.$time." min";
242 } else if ($item['h_useat'] == 5) { // Dryhop 242 } else if ($item['h_useat'] == 5) { // Dryhop
243 $moment = 'Koudhop '.sprintf("%.0f", $time / 1440).' dagen'; 243 $moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen';
244 } 244 }
245 $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); 245 $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']);
246 $total_ibus += $ibu; 246 $total_ibus += $ibu;
247 247
248 if ($amount > 1) 248 if ($amount > 1)
732 732
733 $this->Checkheader('Mout afwegen en schroten'); 733 $this->Checkheader('Mout afwegen en schroten');
734 $arr = json_decode($row['json_fermentables'], true); 734 $arr = json_decode($row['json_fermentables'], true);
735 foreach($arr as $item) { 735 foreach($arr as $item) {
736 if ($item['f_added'] == 0) { // to mash 736 if ($item['f_added'] == 0) { // to mash
737 $s = sprintf("%.3f",floatval($item['f_amount'])).' kg '; 737 $s = sprintf("%.3f",floatval($item['f_amount'])).' kg `';
738 $s .= iconv('UTF-8','windows-1252',$item['f_name']); 738 $s .= iconv('UTF-8','windows-1252',$item['f_name']);
739 $s .= ' ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')'; 739 $s .= '` ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')';
740 $this->Checkline($s); 740 $this->Checkline($s);
741 } 741 }
742 } 742 }
743 $this->Checkline('mout schroten'); 743 $this->Checkline('mout schroten');
744 $this->Ln(5); 744 $this->Ln(5);
767 $this->Checkline('brouwzouten en -zuren toevoegen'); 767 $this->Checkline('brouwzouten en -zuren toevoegen');
768 $this->Checkline('mout storten en inmaischen'); 768 $this->Checkline('mout storten en inmaischen');
769 $hops = json_decode($row['json_hops'], true); 769 $hops = json_decode($row['json_hops'], true);
770 foreach($hops as $item2) { 770 foreach($hops as $item2) {
771 if ($item2['h_useat'] == 0) { 771 if ($item2['h_useat'] == 0) {
772 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; 772 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `';
773 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen'; 773 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen';
774 $this->Checkline($s);
775 }
776 }
777 $miscs = json_decode($row['json_miscs'], true);
778 foreach($miscs as $item3) {
779 if ($item3['m_use_use'] == 1 && $item3['m_type'] != 4) { // Only if not a water agent
780 $s = sprintf("%.2f",$item3['m_amount']*1000).' gr `';
781 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen';
774 $this->Checkline($s); 782 $this->Checkline($s);
775 } 783 }
776 } 784 }
777 $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); 785 $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C');
778 $this->Checkline('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)'); 786 $this->Checkline('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)');
825 $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'])); 833 $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size']));
826 $this->Checkline('doel SG in kookketel: '.density_str($pre_sg)); 834 $this->Checkline('doel SG in kookketel: '.density_str($pre_sg));
827 $hops = json_decode($row['json_hops'], true); 835 $hops = json_decode($row['json_hops'], true);
828 foreach($hops as $item2) { 836 foreach($hops as $item2) {
829 if ($item2['h_useat'] == 1) { 837 if ($item2['h_useat'] == 1) {
830 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; 838 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `';
831 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen na het spoelen'; 839 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen na het spoelen';
832 $this->Checkline($s); 840 $this->Checkline($s);
833 } 841 }
834 } 842 }
835 if ($this->GetY() > 200) 843 if ($this->GetY() > 200)
836 $this->AddPage(); 844 $this->AddPage();
842 for ($i = $row['boil_time']; $i >= 0; $i--) { 850 for ($i = $row['boil_time']; $i >= 0; $i--) {
843 if ($i == 10) { 851 if ($i == 10) {
844 $ferms = json_decode($row['json_fermentables'], true); 852 $ferms = json_decode($row['json_fermentables'], true);
845 foreach($ferms as $item1) { 853 foreach($ferms as $item1) {
846 if ($item1['f_added'] == 1) { 854 if ($item1['f_added'] == 1) {
847 $s = sprintf("%.3f",$item1['f_amount']).' kg '; 855 $s = sprintf("%.3f",$item1['f_amount']).' kg `';
848 $s .= iconv('UTF-8','windows-1252',$item1['f_name']).' bij 10 minuten voor einde koken'; 856 $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` bij 10 minuten voor einde koken';
849 $this->Checkline($s); 857 $this->Checkline($s);
850 } 858 }
851 } 859 }
852 if ($row['brew_cooling_method'] == 1) 860 if ($row['brew_cooling_method'] == 1)
853 $this->Checkline('Plaats dompelkoeler bij 10 minuten voor einde koken'); 861 $this->Checkline('Plaats dompelkoeler bij 10 minuten voor einde koken');
854 } 862 }
855 $hops = json_decode($row['json_hops'], true); 863 $hops = json_decode($row['json_hops'], true);
856 foreach($hops as $item2) { 864 foreach($hops as $item2) {
857 if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { 865 if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) {
858 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; 866 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `';
859 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' bij '; 867 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` bij ';
860 if ($i > 0) 868 if ($i > 0)
861 $s .= $i.' minuten voor einde koken'; 869 $s .= $i.' minuten voor einde koken';
862 else 870 else
863 $s .= 'vlamuit'; 871 $s .= 'vlamuit';
864 $this->Checkline($s); 872 $this->Checkline($s);
865 } 873 }
866 } 874 }
867 $miscs = json_decode($row['json_miscs'], true); 875 $miscs = json_decode($row['json_miscs'], true);
868 foreach($miscs as $item3) { 876 foreach($miscs as $item3) {
869 if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { 877 if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) {
870 $s = sprintf("%.1f",$item3['m_amount']*1000).' gr '; 878 $s = sprintf("%.1f",$item3['m_amount']*1000).' gr `';
871 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).' bij '; 879 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij ';
872 if ($i > 0) 880 if ($i > 0)
873 $s .= $i.' minuten voor einde koken'; 881 $s .= $i.' minuten voor einde koken';
874 else 882 else
875 $s .= 'vlamuit'; 883 $s .= 'vlamuit';
876 $this->Checkline($s); 884 $this->Checkline($s);
901 } 909 }
902 if ($row['brew_whirlpool6'] > 0) { 910 if ($row['brew_whirlpool6'] > 0) {
903 $this->Checkline('koelen tot 66 '.DEG.'C'); 911 $this->Checkline('koelen tot 66 '.DEG.'C');
904 $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden'; 912 $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden';
905 $this->Checkline($s); 913 $this->Checkline($s);
914 }
915 $hops = json_decode($row['json_hops'], true);
916 foreach($hops as $item2) {
917 if ($item2['h_useat'] == 4) {
918 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `';
919 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor ';
920 $s .= $item2['h_time'].' minuten in de whirlpool';
921 $this->Checkline($s);
922 }
906 } 923 }
907 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); 924 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C');
908 if ($row['brew_whirlpool2'] > 0) { 925 if ($row['brew_whirlpool2'] > 0) {
909 $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.'; 926 $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.';
910 $this->Checkline($s); 927 $this->Checkline($s);

mercurial