56 lines
2 KiB
Plaintext
56 lines
2 KiB
Plaintext
|
|
<table cellpadding = "0" cellspacing = "0" class="mer">
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th><?php __('Assigned to'); ?></th>
|
||
|
|
<th><?php __('Date'); ?></th>
|
||
|
|
<th><?php __('Enquiry Number'); ?></th>
|
||
|
|
<th><?php __('Customer'); ?></th>
|
||
|
|
<th><?php __('Contact'); ?></th>
|
||
|
|
<th><?php __('State'); ?></th>
|
||
|
|
<th><?php __('Country'); ?></th>
|
||
|
|
<th><?php __('Principle'); ?></th>
|
||
|
|
<th><?php __('Status'); ?></th>
|
||
|
|
<th><?php __('Comments'); ?></th>
|
||
|
|
<th class="actions"><?php __('Actions');?></th>
|
||
|
|
</tr>
|
||
|
|
<?php
|
||
|
|
$i = 0;
|
||
|
|
foreach ($enquiries as $enquiry):
|
||
|
|
$class = null;
|
||
|
|
/* Set Row colour to Yellow if the Job has been won and turned into an order */
|
||
|
|
if($enquiry['Status']['id'] == 3) {
|
||
|
|
$class = ' class="jobwon"';
|
||
|
|
}
|
||
|
|
else if($enquiry['Status']['id'] == 4) {
|
||
|
|
$class = ' class="joblost"';
|
||
|
|
}
|
||
|
|
else if($enquiry['Status']['id'] == 5) {
|
||
|
|
$class = ' class="quoteissued"';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
?>
|
||
|
|
<tr<?php echo $class;?>>
|
||
|
|
<td>
|
||
|
|
<? $firstname = $enquiry['User']['first_name'];
|
||
|
|
$lastname = $enquiry['User']['last_name'];
|
||
|
|
echo $html->link($firstname[0].$lastname[0], array('controller'=> 'users', 'action'=>'view', $enquiry['User']['id'])); ?>
|
||
|
|
</td>
|
||
|
|
<td><?php echo date('j M Y',$time->toUnix($enquiry['Enquiry']['created'])); ?></td>
|
||
|
|
<td><?php echo $enquiry['Enquiry']['title'];?></td>
|
||
|
|
<td><?php echo $enquiry['Customer']['name'];?></td>
|
||
|
|
<td><?php echo $enquiry['Contact']['first_name'].' '.$enquiry['Contact']['last_name'];?></td>
|
||
|
|
<td><?php echo $enquiry['State']['name'];?></td>
|
||
|
|
<td><?php echo $enquiry['Country']['name'];?></td>
|
||
|
|
<td><?php echo $enquiry['Principle']['name'];?></td>
|
||
|
|
<td><?php echo $enquiry['Status']['name'];?></td>
|
||
|
|
<td><?php echo $enquiry['Enquiry']['comments'];?></td>
|
||
|
|
<td class="actions">
|
||
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'enquiries', 'action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
||
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'enquiries', 'action'=>'edit', $enquiry['Enquiry']['id'])); ?>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<?php endforeach; ?>
|
||
|
|
</table>
|
||
|
|
|