2009-01-12 21:13:18 -08:00
|
|
|
<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;?>>
|
2009-07-12 23:55:17 -07:00
|
|
|
<?php echo $html->link($this->element('abn', array('abn'=>$customer['Customer']['abn'])), 'http://www.abr.business.gov.au/abnDetails.aspx?ABN='.$customer['Customer']['abn'],
|
|
|
|
|
array('target'=>'_blank')); ?>
|
2009-01-12 21:13:18 -08:00
|
|
|
|
|
|
|
|
</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>
|
2010-03-11 15:02:33 -08:00
|
|
|
|
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Country (headquarters)'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $html->link($customer['Country']['name'], array('controller'=>'countries', 'action'=>'view', $customer['Country']['id'])); ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
2009-02-03 21:28:46 -08:00
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Discount and Pricing Policies'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $customer['Customer']['discount_pricing_policies']; ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Payment Terms'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $customer['Customer']['payment_terms']; ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
2009-07-12 23:55:17 -07:00
|
|
|
|
2009-02-02 19:01:34 -08:00
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Notes'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $customer['Customer']['notes']; ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
2009-07-12 23:55:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('URL'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $html->link($customer['Customer']['url'], $customer['Customer']['url'], array('target'=>'_blank'));; ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
2009-02-11 20:02:05 -08:00
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Category'); ?></dt>
|
|
|
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
|
|
|
<?php echo $customer['CustomerCategory']['name']; ?>
|
|
|
|
|
|
|
|
|
|
</dd>
|
2009-02-02 19:01:34 -08:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="actions">
|
|
|
|
|
<ul>
|
|
|
|
|
<li><?php echo $html->link(__('Edit Customer', true), array('action'=>'edit', $customer['Customer']['id'])); ?> </li>
|
2009-02-09 14:25:49 -08:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
2009-07-15 22:51:40 -07:00
|
|
|
<div class="related">
|
|
|
|
|
<h3><?php __('Industries that this Customer has been tagged in'); ?></h3>
|
|
|
|
|
<?php if(!empty($customer['Industry'])): ?>
|
|
|
|
|
<ul id="industrytaglist">
|
|
|
|
|
<?php foreach ($customer['Industry'] as $industry) {
|
|
|
|
|
echo "<li>".$html->link(__($industry['name'],true), array('action'=>'view', 'controller'=>'industries', $industry['id']))."</li>";
|
|
|
|
|
}
|
|
|
|
|
echo "</ul>";
|
|
|
|
|
endif;
|
|
|
|
|
echo "<br>";
|
|
|
|
|
echo "<div class=\"actions\">".$html->link("Tag Industries for this Customer", array('action'=>'tagindustries',$customer['Customer']['id']))."</div>";
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
<div class="related">
|
2009-01-19 20:15:37 -08:00
|
|
|
<h3><?php __('Contacts');?><?php echo $html->image('system-users.png'); ?></h3>
|
2009-02-09 14:25:49 -08:00
|
|
|
<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']));?><?php echo $html->link($html->image('contact-new.png'), array('controller'=> 'contacts', 'action'=>'add_to_customer/customerid:'.$customer['Customer']['id']), null, null, false); ?> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2009-01-12 21:13:18 -08:00
|
|
|
<?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>
|
2009-04-23 21:45:58 -07:00
|
|
|
<th><?php __('Direct Phone'); ?></th>
|
2009-01-12 21:13:18 -08:00
|
|
|
<th><?php __('Fax Number'); ?></th>
|
2009-02-26 16:58:33 -08:00
|
|
|
<th><?php __('Department'); ?></th>
|
2009-01-12 21:13:18 -08:00
|
|
|
<th><?php __('Notes'); ?></th>
|
|
|
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
$i = 0;
|
2009-02-26 16:58:33 -08:00
|
|
|
foreach ($contacts as $contact):
|
2009-01-12 21:13:18 -08:00
|
|
|
$class = null;
|
|
|
|
|
if ($i++ % 2 == 0) {
|
|
|
|
|
$class = ' class="altrow"';
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<tr<?php echo $class;?>>
|
2009-02-26 16:58:33 -08:00
|
|
|
<td><?php echo $contact['Contact']['first_name'].' '.$contact['Contact']['last_name'];?></td>
|
|
|
|
|
<td><?php echo $html->link($contact['Contact']['email'], 'mailto:'.$contact['Contact']['email']);?></td>
|
2009-04-23 21:45:58 -07:00
|
|
|
<td><?php echo $contact['Contact']['phone'];
|
|
|
|
|
if($contact['Contact']['phone_extension']) { echo ' ext:'.$contact['Contact']['phone_extension']; }
|
|
|
|
|
?></td>
|
|
|
|
|
<td><?php echo $contact['Contact']['direct_phone'];?></td>
|
2009-02-26 16:58:33 -08:00
|
|
|
<td><?php echo $contact['Contact']['fax'];?></td>
|
|
|
|
|
<td><?php echo $contact['ContactCategory']['name']; ?></td>
|
|
|
|
|
<td><?php echo $contact['Contact']['notes'];?></td>
|
2009-01-12 21:13:18 -08:00
|
|
|
<td class="actions">
|
2009-02-26 16:58:33 -08:00
|
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'contacts', 'action'=>'view', $contact['Contact']['id'])); ?>
|
|
|
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'contacts', 'action'=>'edit', $contact['Contact']['id'])); ?>
|
2009-01-12 21:13:18 -08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2009-02-26 16:58:33 -08:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</table>
|
2009-07-12 23:55:17 -07:00
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="related">
|
2009-01-22 16:00:50 -08:00
|
|
|
<h3><?php __('Addresses');?><?php echo $html->image('x-office-address-book.png'); ?></h3>
|
2009-02-09 14:25:49 -08:00
|
|
|
<div class="actions">
|
|
|
|
|
<ul>
|
|
|
|
|
<li><?php echo $html->link(__('New Address for this Customer', true), array('controller'=> 'addresses', 'action'=>'add/customerid:'.$customer['Customer']['id']));?><?php echo $html->link($html->image('address-book-new.png'), array('controller'=> 'addresses', 'action'=>'add/customerid:'.$customer['Customer']['id']), null, null, false); ?> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2009-01-12 21:13:18 -08:00
|
|
|
<?php if (!empty($customer['Address'])) {
|
|
|
|
|
echo $this->element('address_table', $addresses);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo 'No Addresses for this Customer Yet';
|
|
|
|
|
}
|
|
|
|
|
?>
|
2009-02-09 14:25:49 -08:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</div>
|
|
|
|
|
<div class="related">
|
2009-02-02 19:01:34 -08:00
|
|
|
<h3><?php __('Enquiries');?><?php echo $html->image('folder.png'); ?></h3>
|
2009-02-09 14:25:49 -08:00
|
|
|
<div class="actions">
|
|
|
|
|
<ul>
|
|
|
|
|
<li><?php echo $html->link(__('New Enquiry for this Customer', true), array('controller'=> 'enquiries', 'action'=>'add/customerid:'.$customer['Customer']['id']));?><?php echo $html->link($html->image('folder-new.png'), array('controller'=> 'enquiries', 'action'=>'add/customerid:'.$customer['Customer']['id']), null, null, false); ?> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2009-01-12 21:13:18 -08:00
|
|
|
<?php if (!empty($customer['Enquiry'])) {
|
|
|
|
|
echo $this->element('enquiry_table', $enquiries);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "No Enquiries from this Customer";
|
|
|
|
|
}
|
|
|
|
|
?>
|
2009-02-02 19:01:34 -08:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
|
2009-02-09 14:25:49 -08:00
|
|
|
|
2009-02-02 19:01:34 -08:00
|
|
|
</div>
|
2009-01-12 21:13:18 -08:00
|
|
|
</div>
|
2009-07-02 18:11:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<? debug($customer, true); ?>
|
2009-07-15 22:51:40 -07:00
|
|
|
|
|
|
|
|
<?php debug($parent_industry_list); ?>
|