Example #1
0
                    foreach ($binContents as $key => $contents) {
                        if ($contents->SupplyID == $SupplyID) {
                            $contents->Count = $count;
                            // if we manually set supply to zero remove it from the bin?
                            if ($count == -1) {
                                $contents->RemoveContents();
                            } else {
                                $contents->UpdateCount();
                            }
                            $ins = false;
                        }
                    }
                    if ($ins) {
                        $bc->SupplyID = $SupplyID;
                        $bc->Count = $count;
                        $bc->AddContents();
                    }
                }
            }
        }
    }
    // Bin contents could have changed above so pull them again
    $binContents = $bc->GetBinContents();
    $formpatch = "?binid={$_REQUEST['binid']}";
}
$binList = $bin->GetBinList();
?>
<!doctype html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">