Incorrect bitshift caused $PARCEL_SINGLE to be ignored.
To fix in the database, run
update Contact set parcel=parcel|1 where parcel>0 and not (parcel & 7);
update FoodOrder set parcel=parcel|1 where parcel>0 and not (parcel & 7);
echo "<tr>\n";
echo " <td>Family unit</td>\n";
echo " <td><select name=\"parcel_size\">\n";
- $mask = 1 << (count($parcel_sizes) + 1);
+ $mask = 1 << count($parcel_sizes);
for ($i = 0; $i < count($parcel_sizes); $i++) {
- option("parcel_size", $i << 1, $parcel_sizes[$i], $contact->getParcel() % $mask);
+ option("parcel_size", 1 << $i, $parcel_sizes[$i], $contact->getParcel() % $mask);
}
echo "</select></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td>Parcel size</td>\n";
echo " <td><select name=\"parcel_size\">\n";
- $mask = 1 << (count($parcel_sizes) + 1);
+ $mask = 1 << count($parcel_sizes);
for ($i = 0; $i < count($parcel_sizes); $i++) {
- option("parcel_size", $i << 1, $parcel_sizes[$i], $order->getParcel() % $mask);
+ option("parcel_size", 1 << $i, $parcel_sizes[$i], $order->getParcel() % $mask);
}
echo "</select></td>\n";
echo "</tr>\n";