80 |
80 |
81 function TableYeasts($link,$prop) { |
81 function TableYeasts($link,$prop) { |
82 global $yeasttype; |
82 global $yeasttype; |
83 global $yeastform; |
83 global $yeastform; |
84 global $my_lab; |
84 global $my_lab; |
85 $this->AddCol( 20,'Product','L'); |
85 $this->AddCol( 60,'Gist','L'); |
86 $this->AddCol( 70,'Gist','L'); |
86 $this->AddCol( 50,'Omschrijving','L'); |
87 $this->AddCol( 18,'Soort','L'); |
87 $this->AddCol( 18,'Soort','L'); |
88 $this->AddCol( 18,'Vorm','L'); |
88 $this->AddCol( 18,'Vorm','L'); |
89 $this->AddCol( 20,'Voorraad','R'); |
89 $this->AddCol( 20,'Voorraad','R'); |
90 $this->AddCol( 25,'Datum','L'); |
90 $this->AddCol( 25,'Datum','L'); |
91 $prop['width']=$this->w-$this->lMargin-$this->rMargin; |
91 $prop['width']=$this->w-$this->lMargin-$this->rMargin; |
99 $this->TableHeader(); |
99 $this->TableHeader(); |
100 $this->SetFont('Helvetica','',9); |
100 $this->SetFont('Helvetica','',9); |
101 $this->ColorIndex=0; |
101 $this->ColorIndex=0; |
102 $this->ProcessingTable=true; |
102 $this->ProcessingTable=true; |
103 |
103 |
104 $sql = "SELECT name,product_id,type,form,inventory,production_date FROM inventory_yeasts "; |
104 $sql = "SELECT name,type,form,inventory,production_date,short_desc FROM inventory_yeasts "; |
105 $sql .= "WHERE inventory > 0 AND laboratory = '".$my_lab."' ORDER BY product_id"; |
105 $sql .= "WHERE inventory > 0 AND laboratory = '".$my_lab."' ORDER BY product_id"; |
106 $result = mysqli_query($link, $sql); |
106 $result = mysqli_query($link, $sql); |
107 |
107 |
108 while ($row=mysqli_fetch_array($result)) { |
108 while ($row=mysqli_fetch_array($result)) { |
109 if ($row['form'] == 0) |
109 if ($row['form'] == 0) |
113 $form = array( 'pak', 'gr', 'ml', 'ml', 'ml', 'ml', 'gr' ); |
113 $form = array( 'pak', 'gr', 'ml', 'ml', 'ml', 'ml', 'gr' ); |
114 |
114 |
115 $this->SetX($this->TableX); |
115 $this->SetX($this->TableX); |
116 $ci=$this->ColorIndex; |
116 $ci=$this->ColorIndex; |
117 $this->SetFillColor($this->RowColors[$ci][0],$this->RowColors[$ci][1],$this->RowColors[$ci][2]); |
117 $this->SetFillColor($this->RowColors[$ci][0],$this->RowColors[$ci][1],$this->RowColors[$ci][2]); |
118 $this->Cell(20,5,iconv('UTF-8','windows-1252',$row['product_id']),0,0,'L',true); |
118 $this->Cell(60,5,iconv('UTF-8','windows-1252',$row['name']),0,0,'L',true); |
119 $this->Cell(70,5,iconv('UTF-8','windows-1252',$row['name']),0,0,'L',true); |
119 $this->Cell(50,5,iconv('UTF-8','windows-1252',$row['short_desc']),0,0,'L',true); |
120 $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeasttype[$row['type']]),0,0,'L',true); |
120 $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeasttype[$row['type']]),0,0,'L',true); |
121 $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeastform[$row['form']]),0,0,'L',true); |
121 $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeastform[$row['form']]),0,0,'L',true); |
122 $this->Cell(20,5,sprintf("%10.1f ",$stock).$form[$row['form']],0,0,'R',true); |
122 $this->Cell(20,5,sprintf("%10.1f ",$stock).$form[$row['form']],0,0,'R',true); |
123 $this->Cell(25,5,$row['production_date'],0,0,'L',true); |
123 $this->Cell(25,5,$row['production_date'],0,0,'L',true); |
124 $this->Ln(); |
124 $this->Ln(); |