<?php
session_start();
ob_start();
require "../model/configuration.php";
$prd_code = $_POST['product'];
$date = date("Y-m-d");
$quantity=$_POST['qty'];
$db->execute("INSERT INTO ink_transfer(product_code,quantity,date) VALUES('$prd_code','$quantity','$date')");
$sqry=$db->execute("select * from stock_master where delet='0' and product_code='$prd_code'");
$stval=$sqry->fetch_assoc();

$mins_stock=$stval['quantity']-$quantity;

$db->execute("UPDATE stock_master set quantity= '$mins_stock' where delet='0' and product_code='$prd_code'");

header("location:../Pages/ink_transfer.php");
?>