cmc-sales/views/quotes/view.ctp

107 lines
2.8 KiB
Plaintext
Raw Normal View History

<div class="quotes view">
<h2><?php
$enquirynumber_link = $html->link($quote['Enquiry']['title'],
array('controller'=>'enquiries', 'action'=>'view', $quote['Enquiry']['id']));
if($quote['Quote']['revision'] == 0) {
__('Quote: '.$enquirynumber_link);
}
else {
__('Quote: '.$enquirynumber_link.' Revision '.$quote['Quote']['revision']);
}
?></h2>
</div>
<?php
$i = 0;
foreach ($quote['QuotePage'] as $quotePage):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<div class="related">
<h3>Cover Page <?php echo $i; ?> </h3>
2009-10-06 03:29:00 -07:00
<div class="quotepageview">
<?php echo $quotePage['content']; ?>
</div>
2009-10-06 03:29:00 -07:00
<?php echo $html->link(__('Edit', true), array('controller'=>'quote_pages', 'action'=>'edit',$quotePage['id']));?>
<?php echo $html->link(__('Delete', true), array('controller'=> 'quote_pages', 'action'=>'delete', $quotePage['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $quotePage['id'])); ?>
</div>
<div id="viewpage<?php echo $i;?>">
</div>
<?php endforeach; ?>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Cover Page', true), array('controller'=> 'quote_pages', 'action'=>'add/'.$quote['Quote']['id']));?> </li>
</ul>
</div>
<div class="related">
<h3><?php __('Products in this Quote');?></h3>
<?php if (!empty($quote['QuoteProduct'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
2009-10-06 03:29:00 -07:00
<th><?php __('Item Number'); ?></th>
<th><?php __('Option'); ?></th>
<th><?php __('Quantity'); ?></th>
<th><?php __('Title'); ?></th>
<th><?php __('Description'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($quote['QuoteProduct'] as $quoteProduct):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
2009-10-06 03:29:00 -07:00
<td><?php echo $quoteProduct['item_number'];?></td>
<td><?php echo $quoteProduct['option'];?></td>
2009-10-06 03:29:00 -07:00
<td><?php echo $quoteProduct['quantity'];?></td>
<td><?php echo $quoteProduct['title'];?></td>
<td><?php echo $quoteProduct['description'];?></td>
<td class="actions">
<?php echo $html->link(__('View', true), array('controller'=> 'quote_products', 'action'=>'view', $quoteProduct['id'])); ?>
<?php echo $html->link(__('Edit', true), array('controller'=> 'quote_products', 'action'=>'edit', $quoteProduct['id'])); ?>
<?php echo $html->link(__('Delete', true), array('controller'=> 'quote_products', 'action'=>'delete', $quoteProduct['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $quoteProduct['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<div class="actions">
<ul>
<li><?php echo $html->link(__('Add Product to this Quote', true), array('controller'=> 'quote_products', 'action'=>'add', $quote['Quote']['id']));?> </li>
</ul>
</div>
</div>
2009-10-06 03:29:00 -07:00
<?php debug($quote); ?>