<?php

require_once("config/configDB.php"); 

$edit_id        = stripslashes($_POST['edit_id']);
$productcode    = stripslashes($_POST['productcode']);
$productname    = stripslashes($_POST['productname']);
$qty_type    = stripslashes($_POST['qty_type']);
$purchase_rate  = stripslashes($_POST['purchase_rate']);
$gst   = stripslashes($_POST['gst']);
$hsn    = stripslashes($_POST['hsn_code']);

$adjustment_qty    = stripslashes($_POST['adjustment_qty']);

//productcode, productname, purchase_rate, gst, hsn_code,description, create_date, flag FROM `product_master`


$sql_update = "UPDATE purchase_product_master SET ";
$sql_update .= "productcode='$productcode',";
$sql_update .= "productname='$productname',";
$sql_update .= "qty_type='$qty_type',";
$sql_update .= "purchase_rate='$purchase_rate',";
$sql_update .= "gst='$gst',";
$sql_update .= "hsn='$hsn',";
$sql_update .= "prodct_description='$description'";

$sql_update .= "WHERE id='$edit_id' ";

mysqli_query($conn,$sql_update);

/*$sql_update_mapping = "UPDATE product_mapping_supplier SET ";
$sql_update_mapping .= "productcode='$productcode',";
$sql_update_mapping .= "productname='$productname',";
$sql_update_mapping .= "purchase_rate='$purchase_rate',";
$sql_update_mapping .= "qty_type='$qty_type',";
$sql_update_mapping .= "quantity='$quantity',";
$sql_update_mapping .= "adjustment_qty='$adjustment_qty',";
$sql_update_mapping .= "prodct_description='$description'";

$sql_update_mapping .= "WHERE productID='$edit_id' ";

mysqli_query($conn,$sql_update_mapping);
*/


header("Location:purchase_productMasterDashboard.php");


?>
