X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Forder.php;h=9c9e1c97b60d45f272050207d8a1a070da5a0bb0;hb=0fd77b357d1868a57756e91f9e71dfa3b3db26b8;hp=426606b7889d18c4934c72e75cbbead9bf82b12d;hpb=1bfe6a5fb5a274f0d17845f0c6358f1980f89121;p=readifood.git diff --git a/lib/order.php b/lib/order.php index 426606b..9c9e1c9 100644 --- a/lib/order.php +++ b/lib/order.php @@ -303,9 +303,9 @@ echo "\n"; echo " Parcel size\n"; echo " \n"; echo "\n"; @@ -385,7 +385,13 @@ $order->setBeneficiaryId($contact->getId()); echo "
\n"; - echo "

Place an order:

\n"; + echo "

Placing order for " . $contact->getStrongLink() . "."; + $parcel = $contact->getParcel(); + if ($parcel) { + echo " Suggested parcel type is " . get_contact_parcel_string($contact) . ""; + $order->setParcel($parcel); + } + echo "

\n"; echo "\n"; show_order_form($order, $area_id); @@ -426,7 +432,6 @@ $requester_id = $_POST['requester_id']; $beneficiary_id = $_POST['beneficiary_id']; $hub_id = $_POST['hub_id']; - $quantity = $_POST['quantity']; $driver_id = $_POST['driver_id']; if (! $driver_id) $driver_id = null; $state = $_POST['state']; @@ -464,11 +469,6 @@ } else $hub_id = null; - if (! is_numeric($quantity)) { - echo "

Invalid quantity!

\n"; - return false; - } - if ($new && isset($_POST['recurrence'])) $recurrence = $_POST['recurrence']; if (! $recurrence) $recurrence = 0;