<?php
include('db_connection.php');
$Mainclass=new DB_Controller();

$Get_Product=$Mainclass->Fetch_individual_data('gold_billing_order_details',"*","SLN='".$_REQUEST['per']."'");

$Price_Bf_Making_Charge=$Get_Product['Total_Gold_Value']+$Get_Product['diamond_price']+$Get_Product['stone_price']+$Get_Product['solitaire_price'];

if($Get_Product['Product_Discount']>0 || $Get_Product['Sale_Discount']>0)
	     {
	       $Ind_Disc=$Get_Product['Product_Discount']+$Get_Product['Sale_Discount'];
	
	     }
		  else
		 {
			$Ind_Disc="0.00"; 
		 }

?>


<!--         <table class="table ">
  <thead>
    <tr>
      <th scope="col" class="border-0 text-uppercase text-info"><?php echo $Get_Product['Product_Name'] ?></th>
  </thead>
  <tbody>

</tbody>
</table>
 -->


        
        <table class="table ">
  <thead>
    <tr>
      <th scope="col" class="border-0 text-uppercase text-info">Component</th>
      <th scope="col" class="border-0 text-uppercase text-info">Rate</th>
      <th scope="col" class="border-0 text-uppercase text-info">Weight</th>
      <th scope="col" class="border-0 text-uppercase text-info text-right">Final Value</th>
    </tr>
  </thead>
  <tbody>

    <tr>
      <td class="border-0"><?php echo $Get_Product['gold_purity'] ?> </td>
      <td class="border-0">₹ <?php echo $Get_Product['gold_rate'] ?> / gm</td>
      <td class="border-0"><?php echo $Get_Product['gold_wt'] ?> g</td>
      <td class="border-0 text-right">₹ <?php echo number_format($Get_Product['Total_Gold_Value'],2) ?> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>

    <tr>
      <th class="border-0">Total Gold Value</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Get_Product['Total_Gold_Value'],2) ?></b> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>


    <tr>
      <td class="border-0"><?php echo $Get_Product['StoneName'] ?> ( <?php echo $Get_Product['No_Stone'];?> ) </td>
      <td class="border-0">₹ <?php echo $Get_Product['StoneValue'] ?> </td>
      <td class="border-0">-</td>
      <td class="border-0 text-right">₹ <?php echo number_format($Get_Product['stone_price'],2) ?> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>
    
<?php  


if($Get_Product['has_stone']=="Yes"){

?>



    <tr>
      <th class="border-0">Total Stone Value</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Get_Product['stone_price'],2) ?></b> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>



<?php } ?>



<?php  


if($Get_Product['has_diamond']=="Yes"){

?>
    <tr>

      <td class="border-0"><b>Diamond Type :</b> <?php echo $Get_Product['Diamond_Creation_Type'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>


    <tr>
      
      <td class="border-0"> <b>Diamond Quality :</b> <?php echo $Get_Product['DiamondQuality'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>


    <tr>
      
      <td class="border-0"> <b>Diamond Color :</b> <?php echo $Get_Product['DiamondColor'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>

     <tr>
      
      <td class="border-0"> <b>Diamond Qty :</b> <?php echo $Get_Product['No_Diamond'];?> </td>

      <td class="border-0"> ₹ <?php echo $Get_Product['DiamondValue'] ?> / CT</td>

      <td class="border-0"> <?php echo $Get_Product['Diamond_Carat'] ?>  CT</td>

      <td class="border-0 text-right">₹ <?php echo number_format($Get_Product['diamond_price'],2) ?> <!--<s class="text-secondary">₹12,995</s>--></td>

    </tr>
    
    <tr>
      <th class="border-0">Total Diamond Value</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Get_Product['diamond_price'],2) ?></b> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>

<?php } ?>


<?php  


if($Get_Product['has_solitaire']=="Yes"){

?>

 <tr>

      <td class="border-0"><b>Solitaire Type :</b> <?php echo $Get_Product['Solitaire_Creation_Type'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>


    <tr>
      
      <td class="border-0"> <b>Solitaire Quality :</b> <?php echo $Get_Product['SolitaireQuality'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>


        <tr>
      
      <td class="border-0"> <b>Solitaire Color :</b> <?php echo $Get_Product['SolitaireColor'];?> </td>

      <td class="border-0"> </td>

      <td class="border-0"> </td>

    </tr>

     <tr>
      
      <td class="border-0"> <b>Solitaire Qty :</b> <?php echo $Get_Product['No_Solitaire'];?> </td>

      <td class="border-0"> ₹ <?php echo $Get_Product['Solitaire_Value'] ?> / CT</td>

      <td class="border-0"> <?php echo $Get_Product['sollitaire_Carat'] ?>  CT</td>

      <td class="border-0 text-right">₹ <?php echo number_format($Get_Product['solitaire_price'],2) ?> <!--<s class="text-secondary">₹12,995</s>--></td>

    </tr>
    
    <tr>
      <th class="border-0">Total Solitaire Value</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Get_Product['solitaire_price'],2) ?></b> <!--<s class="text-secondary">₹12,995</s>--></td>
    </tr>




<?php } ?>
    
    <tr>
      <th class="border-0">Subtotal</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Price_Bf_Making_Charge,2);?></b> <!--<s class="text-secondary">₹35,492</s>--></td>
    </tr>
    

    <tr>
      <td scope="row">Making Charge</td>
      <td>-</td>
      <td>-</td>
      <td class="text-right">₹ <?php echo number_format($Get_Product['total_making_charge'],2);?> <!--<s class="text-secondary">₹1,065</s>--></td>
    </tr>

      <tr>
      <td scope="row">Discount</td>
      <td>-</td>
      <td>-</td>
      <td class="text-right">₹ <?php echo $Ind_Disc;?> <!--<s class="text-secondary">₹1,065</s>--></td>
    </tr>



    <tr>
      <td scope="row">Tax</td>
      <td>-</td>
      <td>-</td>
      <td class="text-right">₹ <?php echo number_format($Get_Product['GST'],2);?> <!--<s class="text-secondary">₹1,065</s>--></td>
    </tr>
    
    <tr>
      <th class="border-0">Grand Total</th>
      <td class="border-0">-</td>
      <td class="border-0">-</td>
      <td class="border-0 text-right"><b>₹ <?php echo number_format($Get_Product['Total_Price'],2);?></b> </td>
    </tr>
    
    <tr>
      <td scope="row" ></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    
  </tbody>
</table>


