<div class="row">

        <div class="col-xl-6 col-lg-6 col-xxl-6 col-md-6">
            <span class="badge badge-primary" style=" font-size: 14px;"><strong><u>Raw Materials</u>:</strong></span>
                        <div class="">

                            <ul class="list-group list-group-flush">
                                <li class="list-group-item d-flex justify-content-between"><span class="mb-0"><?php echo bom_fsg_pro($get_all_boms_details[0]['main_product']); ?> :</span>Qty:<strong><?php $qty = $get_all_boms_details[0]['quantity']; echo $qty; ?></strong></li>
                                
                                <?php
                                if(!empty($get_materials_boms)){
                                foreach ($get_materials_boms as $get_materials_boms) {
                                 ?>
                                <li class="list-group-item d-flex justify-content-between" style="font-size: 12px;">
                                    <span class="mb-0"><?php echo material_codess($get_materials_boms['material_id']); ?>:</span>
                                    <span class="mb-0"><?php echo material_name($get_materials_boms['material_id']); ?>:</span>
                                    <strong><?php 
                                 	$names = material_name($get_materials_boms['material_id']);

                                    $type = material_type_po($get_materials_boms['material_id']);

                                       
                                        $condition =  $get_materials_boms['weight']*$qty;
                                        //if($names != 'PIGMENT')
                                        //{
                                         if($condition >= 1000)
                                        
                                        {
                                            if($get_materials_boms['unit']== 10){
                                            $total = $condition/1000;
                                            //$res = $total/1000;
                                           echo round($total,2); echo  " Kg";
                                            }else if($get_materials_boms['unit']== 4 ){
                                                 $total = $condition/1000/25;
                                                 // $res = $total/1000;
                                                 if($total < 1){
                                                   // echo round($condition,1); echo " GM";
                                                    $tot = $condition/1000;



                                                    echo round($tot,1); echo " KG";

                                                 }else{
                                                    if($type == 1){
                                                         echo round($total,0); echo " Bag";
                                                    }else if($type = 3){

                                                        $tot = $condition/1000;



                                                    echo round($tot,1); echo " KG";
                                                    }
                                             }
                                            } else{
                                                 echo $condition; echo "/";
                                                 echo get_unit_name($get_materials_boms['unit']);
                                       }
                                       // }
                                    }else //else if($names == 'PIGMENT'){
                                    	 //if($condition)

                                    	{
                                    	     
                                    	   if($get_materials_boms['unit']== 10){
                                             $total = $condition/1000;
                                            $res =  $total/1000;
                                            //$res = $total/1000;
                                             echo round($res,2); echo "Kg";
                                            }else if($get_materials_boms['unit']== 4 ){
                                                     $total = $condition/1000;
                                                     // $res = $total/1000;
                                                    echo round($total,2); echo "Kg";
                                            }


                                    	 }
                                   
                                        /*if($condition >= 1000)
                                        {
                                            
                                            
                                            echo $condition/1000/25;
                                        echo "/Bag";
                                       }else{
                                        echo $condition; echo "/";
                                        echo get_unit_name($get_materials_boms['unit']);
                                       }*/
                                    ?>

                                    </strong>
                                </li>
                                
                                <?php }  } ?>
                                
                            </ul>
                        </div>
                    </div>


        <div class="col-xl-6 col-lg-6 col-xxl-6 col-md-6">
             <span class="badge badge-info" style=" font-size: 14px;"><strong><u>Packing Materials</u>:</strong></span>
                        <div class="">

                            <ul class="list-group list-group-flush" >
                                <li class="list-group-item d-flex justify-content-between">
                                    <span class="mb-0"><?php echo bom_fsg_pro($get_all_boms_details[0]['main_product']); ?> :</span>Qty:<strong><?php echo $get_all_boms_details[0]['quantity']; ?></strong></li>
                                <?php
                                if(!empty($get_materials_packing_boms)){
                                foreach ($get_materials_packing_boms as $get_materials_packing_boms) {
                                 ?>
                                <li class="list-group-item d-flex justify-content-between" style="font-size: 12px;">
                                    <span class="mb-0"><?php echo material_codess($get_materials_packing_boms['material_id']); ?>:</span>
                                    <span class="mb-0"><?php echo material_name($get_materials_packing_boms['material_id']); ?>:</span>
                                    <strong>
                                        <?php



                                         $condition =  $get_materials_packing_boms['weight']*$qty;
                                            $names = material_name($get_materials_packing_boms['material_id']);
                                        if($condition >= 1000)
                                        {
                                            if($get_materials_packing_boms['unit']== 10){
                                            $total = $condition/1000;
                                            $res = $total/1000;
                                           echo round($res,2); echo" Kg";
                                            }else if($get_materials_packing_boms['unit']== 4){
                                                 $total = $condition/1000;
                                                  //$res = $total/1000;
                                                 echo round($total,2); echo " Kg";
                                            

                                            }else if($get_materials_packing_boms['unit']==8){

                                                 $res = $condition/1000; echo " ";
                                                //echo get_unit_name($get_materials_packing_boms['unit']);POLY BAG 44'' X 40'' 
                                                 echo round($condition,1); echo" Pc";
                                            }
                                          }else if($get_materials_packing_boms['unit']==8){

                                                //print_r($get_materials_packing_boms['unit']);
                                                /* if($names != "POLY BAG 24'' X 36''" || $names !="1ml Bag 44*40" || $names = "POLY BAG 44 X 40"){
*/
                                                $res = $condition/1000; echo " ";
                                                //echo get_unit_name($get_materials_packing_boms['unit']);POLY BAG 44'' X 40'' 
                                                 echo round($condition,1); echo" Pc"; 

                                      // }

                             /* if($names == "POLY BAG 24'' X 36''" || $names == "1ml Bag 44*40"){

                                         $res = $condition/1000; echo " ";
                                        //echo get_unit_name($get_materials_packing_boms['unit']);
                                         echo round($condition,2); echo "GM";

                              }else*/
                              /*else{

                                             $res = $condition/1000; echo " ";
                                        //echo get_unit_name($get_materials_packing_boms['unit']);
                                           echo round($condition,2); echo"Mg";
                                       }*/
                                   }else if($get_materials_packing_boms['unit']==4){

                                    $total = $condition/1000;
                                                  //$res = $total/1000;
                                                 echo round($total,2); echo " Kg";



                                   }
                               /*if($names != "POLY BAG 24'' X 36''" || $names !="1ml Bag 44*40"){

                                        $res = $condition/1000; echo " ";
                                        //echo get_unit_name($get_materials_packing_boms['unit']);
                                         echo "$condition Pc";
                                       }else{

                                             $res = $condition/1000; echo " ";
                                        //echo get_unit_name($get_materials_packing_boms['unit']);
                                         echo "$condition Mg";
                                       }*/



                                       ?>
                                </strong>

                                </li>
                                
                                <?php } }?>
                                
                            </ul>
                        </div>
                    </div>


                    


    
              