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

$Order_No='INO/00002';

 $condition="  Order_No='INO/00002' order by SLN";

                             //$Get_Dealers_Stock=$Mainclass->Challan_det_return('indent_details',$condition);
							 
							 $Get_Dealers_Stock=$Mainclass->Fetch_multiple_data('gold_indent_details','*',$condition);
							 
							 $C_Qty=0;
							 
							 foreach($Get_Dealers_Stock as $stock)
	                         {
							 
							 
                               
							
								/*$Get_Last_Data="select Quantity from dealer_gold_stock_master where Dealer_Code='".$Get_Indent_Details['Dealer_Code']."' and Product_Code='".$stock['Product_Code']."' order by SLN desc";
								$Qry_Data=mysqli_query($Mainclass->dbh,$Get_Last_Data);
								$Ft_Last_Balance=mysqli_fetch_assoc($Qry_Data);*/
								
								
							   echo $UpdateOrder="update gold_challan_details set Total_Cost_Price='".$stock['Total']."' where  Product_Code='".$stock['Product_Code']."'";
		                        mysqli_query($Mainclass->dbh,$UpdateOrder);				
		
							
							}
							
							
	 echo "Updated";						
?>