<?php error_reporting(0);
/***************************** PREVIOUS NEXT CODING ****************************************/
include("../../include/db.php");
 
 $batch_no=$_POST['batch_no'];
 $particulars=$_POST['particulars'];
  
 $ink_part=mysql_fetch_array(mysql_query("select * from ink_sublist where prod_size='$particulars' and `batch_no`='$batch_no' "));
 $ink_qty=$ink_part['total_qty'];
 //echo $ink_part; 
// echo $ink_part['uom'].$ink_part['nos'];
 $empty_part=mysql_fetch_array(mysql_query("select sum(packing) as qty from empty_can_dc_sublist where particulars='$particulars' and `batch_no`='$batch_no' "));
 $empty_qty=$empty_part['qty'];
 $total_qty1=$ink_qty-$empty_qty;
 if($total_qty1>0){ $total_qty=$total_qty1;}else{ $total_qty='0';}
    $data = array(
        'uom' => $ink_part['uom'],
        'nos' => $ink_part['nos'],
        'qty' => $total_qty,
        'hide_qty' => $total_qty
    );
 echo json_encode($data);
?>