X-Git-Url: http://git.iain.cx/?p=readifood.git;a=blobdiff_plain;f=lib%2Fcontact.php;h=a5bceee8f906d0ff57c5aaab45c8f389042799dd;hp=d83e10116302281e4c960acaf29d39389a0533b8;hb=2cce3a10f172ca1ee7150d80d80d98ecb7527d3b;hpb=48175505d7f95be28b778fbca3826e34ba505cde diff --git a/lib/contact.php b/lib/contact.php index d83e101..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";