Exemplo n.º 1
0
 if (isset($_POST['emidqid'])) {
     $emidqid = $_POST['emidqid'];
 } else {
     $emidqid = '';
 }
 //material inward ids for updation
 $mi->setCustID($_POST['Customer_ID']);
 $mi->saveMaterialInward();
 $partid = $mi->getInwardID();
 $partlist = json_decode($partlist);
 if ($partlist != '') {
     $l = count($partlist);
     $i = 0;
     while ($i < $l) {
         $mi->setPartID($partlist[$i][0]);
         $mi->setQuantity($partlist[$i][1]);
         $mi->setMaterialCode($partlist[$i][2]);
         $mi->setRackno($partlist[$i][3]);
         $mi->savePartMaterial();
         $i += 1;
     }
 }
 if ($emidqid != '') {
     $l = count($emidqid);
     $i = 0;
     while ($i < $l) {
         $mi->setMIDQID($emidqid[$i]);
         $mi->setQuantity($eqty[$i]);
         $mi->setMaterialCode($emcode[$i]);
         $mi->setRackno($racknoe[$i]);
         $mi->savePartMaterial();