102 lines
3.1 KiB
PHP
Executable file
102 lines
3.1 KiB
PHP
Executable file
<div class="customers view">
|
|
<h2><?php __('Customer: '.$customer['Customer']['name']);?></h2>
|
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $customer['Customer']['name']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('ABN'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $customer['Customer']['abn']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Record Created'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $time->nice($customer['Customer']['created']); ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('Edit Customer', true), array('action'=>'edit', $customer['Customer']['id'])); ?> </li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="related">
|
|
<h3><?php __('Contacts from this Customer');?></h3>
|
|
<?php if (!empty($customer['Contact'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Name'); ?></th>
|
|
<th><?php __('Email Address'); ?></th>
|
|
<th><?php __('Phone Number'); ?></th>
|
|
<th><?php __('Fax Number'); ?></th>
|
|
<th><?php __('Notes'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($customer['Contact'] as $contact):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $contact['name'];?></td>
|
|
<td><?php echo $html->link($contact['email'], 'mailto:'.$contact['email']);?></td>
|
|
<td><?php echo $contact['phone'];?></td>
|
|
<td><?php echo $contact['fax'];?></td>
|
|
<td><?php echo $contact['notes'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'contacts', 'action'=>'view', $contact['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'contacts', 'action'=>'edit', $contact['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Contact for this Customer', true), array('controller'=> 'contacts', 'action'=>'add_to_customer/customerid:'.$customer['Customer']['id']));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="related">
|
|
<h3><?php __('Addresses for this Customer');?></h3>
|
|
<?php if (!empty($customer['Address'])) {
|
|
echo $this->element('address_table', $addresses);
|
|
}
|
|
else {
|
|
echo 'No Addresses for this Customer Yet';
|
|
}
|
|
?>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Address for this Customer', true), array('controller'=> 'addresses', 'action'=>'add/customerid:'.$customer['Customer']['id']));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php __('Enquiries from this Customer');?></h3>
|
|
<?php if (!empty($customer['Enquiry'])) {
|
|
echo $this->element('enquiry_table', $enquiries);
|
|
}
|
|
else {
|
|
echo "No Enquiries from this Customer";
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|