$contact = get_contact_by_id($order->getBeneficiaryId());
if (! $contact) continue;
+ $phones = array();
$area = get_contact_area($contact);
echo "<p>Order of <em>" . get_order_parcel_string($order) . "</em> for <strong>" . htmlspecialchars($contact->getDisplayname()) . "</strong> in " . htmlspecialchars(get_area_displayname($area)) . ".</p>\n";
$hub = get_hub_by_id($order->getHubId(), false);
if ($hub) {
echo "<p>Deliver to hub <strong> " . htmlspecialchars($hub->getName()) . "</strong>";
$address = get_hub_address($hub);
+ $phone = $hub->getTelephone1();
+ if ($phone) $phones[] = $phone;
+ $phone = $hub->getTelephone2();
+ if ($phone) $phones[] = $phone;
}
else {
echo "<p>Deliver direct to beneficiary";
$address = get_contact_address($contact);
+ $phone = $contact->getTelephone1();
+ if ($phone) $phones[] = $phone;
+ $phone = $contact->getTelephone2();
+ if ($phone) $phones[] = $phone;
}
$area = get_address_area($address);
echo "\n<br>" . htmlspecialchars($address->getLine());
echo "\n<br>" . htmlspecialchars($city->getName());
echo "\n<br>" . htmlspecialchars($address->getPostcode());
+ if (count($phones)) echo "\n<br><br>Telephone <strong>" . implode(" or ", $phones) . "</strong>";
echo "</p>\n";
$notes = $order->getNotes();