Jump to content

Fatal error: Unsupported operand types


alin_1817

Recommended Posts

Fatal error: Unsupported operand types in /mnt/maindisk/var/opt/cvs/ytlhpcps.ytlhotels.com/html/training/ytlhpcps/reports/total_purchase_stock_item.qty.supp.php on line 1096

 

 

This the code..

 

 

                    $rpt_filter_by_html_rec .= "";

 

 

 

 

                foreach($description_arr as $key_d=>$val_d){

                        if ($tmp_total[$key0][$val1][$val_d]['val']['qty']){

                            $rpt_filter_by_html_rec .= "<br>";

                            $rpt_filter_by_html_rec .= "<table cellpadding='0' cellspacing='0' border='1' width='100%' class='description_row'>"; //echo "$description_arr<br /> ";

             

                  foreach($measurement_tbl_title as $key_h=>$val_h){

                                $rpt_filter_by_html_rec .= "<tr>";

                                $rpt_filter_by_html_rec .= "<td>$val_h</td>"; //print "<pre>"; print_r($val_h);print "</pre>";       

             

                        if ($key_h == 'Item'){

                          $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:left;'>$val_d</td>";

                                //print "<pre>"; print_r($val_d);print "</pre>";

                                }

                       

                        elseif ($key_h == 'Measurement'){

                        foreach($measurement_arr as $key_m=>$val_m){ 

                              if ($key_m == $key_d){

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:center;'>$val_m</td>";

                          //print "<pre>"; print_r($val_m);print "</pre>";

                                }}}

                       

                        elseif ($key_h == 'Avg'){

                                    $tmp_amt = $tmp_total[$key0][$val1][$val_d]['val']['amt'];

                                    $tmp_qty = $tmp_total[$key0][$val1][$val_d]['val']['qty'];

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format(round($tmp_amt/$tmp_qty,2), 2, ".", ",")."</td>";-----LINE 1096

                                }

                       

                        else{

                                    $tmp_field = $tmp_total[$key0][$val1][$val_d]['val'][strtolower($key_h)];

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format($tmp_field, 2, ".", ",")."</td>"; //print "<pre>"; print_r($tmp_field);print "</pre>";

                                }

                                $rpt_filter_by_html_rec .= "</tr>";

                       

                        }  //close measurement_tbl_title

                            $rpt_filter_by_html_rec .= "</table>";

              } // close if tmp_total

                         

                }  //close measurement_arr

//}}}

                } // close description_arr

            //}}

            //if(empty ($key_h)) {

            //$rpt_filter_by_html_rec .= "<td>   </td>";}

 

 

                $rpt_filter_by_html_rec .= "</td>";

            } // close foreach property_arr

        }[/s]

 

do help me please............. ;)

Link to comment
https://forums.phpfreaks.com/topic/134301-fatal-error-unsupported-operand-types/
Share on other sites

Fatal error: Unsupported operand types in /mnt/maindisk/var/opt/cvs/ytlhpcps.ytlhotels.com/html/training/ytlhpcps/reports/total_purchase_stock_item.qty.supp.php on line 1096

 

 

This the code..

 

 

                    $rpt_filter_by_html_rec .= "";

 

 

 

 

                foreach($description_arr as $key_d=>$val_d){

                        if ($tmp_total[$key0][$val1][$val_d]['val']['qty']){

                            $rpt_filter_by_html_rec .= "<br>";

                            $rpt_filter_by_html_rec .= "<table cellpadding='0' cellspacing='0' border='1' width='100%' class='description_row'>"; //echo "$description_arr<br /> ";

             

                  foreach($measurement_tbl_title as $key_h=>$val_h){

                                $rpt_filter_by_html_rec .= "<tr>";

                                $rpt_filter_by_html_rec .= "<td>$val_h</td>"; //print "<pre>"; print_r($val_h);print "</pre>";       

             

                        if ($key_h == 'Item'){

                          $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:left;'>$val_d</td>";

                                //print "<pre>"; print_r($val_d);print "</pre>";

                                }

                       

                        elseif ($key_h == 'Measurement'){

                        foreach($measurement_arr as $key_m=>$val_m){ 

                              if ($key_m == $key_d){

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:center;'>$val_m</td>";

                          //print "<pre>"; print_r($val_m);print "</pre>";

                                }}}

                       

                        elseif ($key_h == 'Avg'){

                                    $tmp_amt = $tmp_total[$key0][$val1][$val_d]['val']['amt'];

                                    $tmp_qty = $tmp_total[$key0][$val1][$val_d]['val']['qty'];

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format(round($tmp_amt/$tmp_qty,2), 2, ".", ",")."</td>";-----LINE 1096

                                }

                       

                        else{

                                    $tmp_field = $tmp_total[$key0][$val1][$val_d]['val'][strtolower($key_h)];

                                    $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format($tmp_field, 2, ".", ",")."</td>"; //print "<pre>"; print_r($tmp_field);print "</pre>";

                                }

                                $rpt_filter_by_html_rec .= "</tr>";

                       

                        }  //close measurement_tbl_title

                            $rpt_filter_by_html_rec .= "</table>";

              } // close if tmp_total

                         

                }  //close measurement_arr

//}}}

                } // close description_arr

            //}}

            //if(empty ($key_h)) {

            //$rpt_filter_by_html_rec .= "<td>   </td>";}

 

 

                $rpt_filter_by_html_rec .= "</td>";

            } // close foreach property_arr

        }[/s]

 

do help me please............. ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.