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

$design_id=$_REQUEST['per'];



$GetData=$Mainclass->Fetch_individual_data("gold_products_master","*","ParentId='".$design_id."' ");

$cat  = $Mainclass->Fetch_individual_data("gold_product_category_master","Category","SLN='".$GetData['ProductCategory']."'");

?>


<!--<div class="col-lg-2"><img src="https://placehold.co/200x200" class="w-100" /></div>    -->

<style>
    
    td{

        font-size: 13px;

        
    }
    
    
</style>

    
<div class="col-lg-12" style="font-size: 13px;">
    
<div class="row m-0">

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Metal Type</b></br><?php echo $GetData['Metal_Type']; ?></lable></div>    

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Product Category</b></br><?php echo $cat['Category']; ?></lable></div>    
    
<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Design Code</b></br><?php echo $GetData['ParentId']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Product Name</b></br><?php echo $GetData['ProductName']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">HSN Code</b></br><?php echo $GetData['HSNCode']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Gold Purity </b></br><?php echo $GetData['GoldPurity']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Stone</b></br><?php echo $GetData['StoneName']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">No of Stones</b></br><?php echo $GetData['No_Stone']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Stone Value</b></br><?php echo $GetData['StoneValue']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Diamond Type</b></br><?php echo $GetData['Diamond_Creation_Type']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Diamond Quality</b></br><?php echo $GetData['DiamondQuality']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Diamond Color</b></br><?php echo $GetData['DiamondColor']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Diamond Size</b></br><?php echo $GetData['DiamondType']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">No of Diamonds</b></br><?php echo $GetData['No_Diamond']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Diamond Value</b></br><?php echo $GetData['DiamondValue']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Solitaire Type</b></br><?php echo $GetData['Solitaire_Creation_Type']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Solitaire Quality</b></br><?php echo $GetData['SolitaireQuality']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Solitaire Color</b></br><?php echo $GetData['SolitaireColor']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Solitaire Size</b></br><?php echo $GetData['SolitaireType']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">No of Solitaire</b></br><?php echo $GetData['No_Solitaire']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Solitaire Value</b></br><?php echo $GetData['Solitaire_Value']; ?></lable></div> 

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Making Charges Type</b></br><?php echo $GetData['MakingChargesType']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">Making Charges Value</b></br><?php echo $GetData['MakingChargesValue']; ?></lable></div>

<div class="col-lg-3 col-12 mb-1"><lable><b class="text-primary">MRP</b></br><?php echo $GetData['MRP']; ?></lable></div> 

<div class="col-lg-12 col-12 mb-1"><lable><b class="text-primary">Product Description</b></br><?php echo $GetData['Remark']; ?></lable></div> 
    
</div>    
    
    
</div>

<br>

<?php 


$table_name = "gold_products_master";
$fields = "*";
$condition = "ParentId='".$design_id."' and Active='Yes' ORDER BY SLN DESC"; // Modify as necessary

// Fetch data from the table
$products = $Mainclass->Fetch_multiple_data($table_name, $fields, $condition);




?>

<table id="example1" class="table table-bordered table-striped" >
    <thead >
        <tr >
            <th>SLN</th>
            <th>Product Id</th>
            <th>Barcode</th>
            <th>Gold Weight</th>
            <th>Diamond Carat</th>
            <th>Solitaire Carat</th>
            <th>IGI No</th>
            <th>Hallmark No</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $i = 1;
        foreach ($products as $product) {

        ?>
    
        <tr>
            <td><?php echo $i; ?></td>
            <td><?php echo $product['Productid']; ?></td>
            <td><?php echo $product['Barcode']; ?></td>
            <td><?php echo $product['GoldWeight']; ?></td>
            <td><?php echo $product['Diamond_Carat']; ?></td>
            <td><?php echo $product['sollitaire_Carat']; ?></td>
            <td><?php echo $product['IGINo']; ?></td>
            <td><?php echo $product['HMNo']; ?></td>

        </tr>
        <?php
            $i++;
        }
        ?>
    </tbody>
</table>