X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fcontact.php;h=a5bceee8f906d0ff57c5aaab45c8f389042799dd;hb=068aa1997b31e7f46e66977693b751f5fbbcb2b7;hp=4e3b456c1995cc8c2d8d520440661e0371f3fb38;hpb=a2e796d4502f96c1ec0e85dd22c7eccf7d1d9ac3;p=readifood.git diff --git a/lib/contact.php b/lib/contact.php index 4e3b456..a5bceee 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -180,6 +180,27 @@ global $contact_roles, $parcel_sizes, $parcel_contents; if (! $contact) $contact = new Contact; + else if ($contact->getRole() & $GLOBALS['ROLE_BENEFICIARY']) { + $state_mask = $GLOBALS['STATE_ANY']; + $state_mask &= ~$GLOBALS['STATE_DELIVERED']; + $state_mask &= ~$GLOBALS['STATE_CANCELLED']; + + $orders = get_contact_orders($contact, $state_mask); + + if (count($orders)) { + echo "\n"; + echo " Outstanding orders:\n"; + echo "\n"; + + echo "\n"; + echo " \n"; + foreach ($orders as $order) { + echo " Order " . $order->getStrongLink($order->getId()) . ": " . get_order_displayname($order) . "
\n"; + } + echo " \n"; + echo "\n"; + } + } /* Role. */ echo "\n"; @@ -370,6 +391,7 @@ } /* Get address. */ + $area_id = $_POST['area_id']; $line = $_POST['address']; $postcode = $_POST['postcode']; $q = new AddressQuery;