Example #1
0
 }
 ///if not manual then auto create batch description
 $bn->setMfgBatchNO($Batch_Desc);
 $cdates = $_POST['cddb'];
 ///commitmant dates
 $cqty = $_POST['cqty'];
 //commited quantites
 $cremark = $_POST['cremark'];
 //commitment remarks
 $miid = $_POST['MI_Drg_Qty_ID'];
 //inward challan ids
 $mqty = $_POST['mqty'];
 //challan vice quanties in batch
 $hcode = $_POST['hcode'];
 //heat codes
 $bn->saveBatch();
 $batchid = $bn->getBatchID();
 $i = 0;
 $j = count($cdates);
 while ($i < $j) {
     $bn->setBatchID($batchid);
     $bn->setCommitedDate($cdates[$i]);
     $bn->setCommitedQty($cqty[$i]);
     $bn->setCommitedRemarks($cremark[$i]);
     $bn->saveCommitment();
     $i++;
 }
 $i = 0;
 $j = count($miid);
 while ($i < $j) {
     $bn->setBatchID($batchid);