2009-01-12 21:13:18 -08:00
|
|
|
<div class="quotes view">
|
|
|
|
|
<h2><?php
|
|
|
|
|
|
2009-09-09 20:23:39 -07:00
|
|
|
$enquirynumber_link = $html->link($quote['Enquiry']['title'],
|
|
|
|
|
array('controller'=>'enquiries', 'action'=>'view', $quote['Enquiry']['id']));
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
if($quote['Quote']['revision'] == 0) {
|
2009-09-09 20:23:39 -07:00
|
|
|
__('Quote: '.$enquirynumber_link);
|
2009-01-12 21:13:18 -08:00
|
|
|
}
|
|
|
|
|
else {
|
2009-09-09 20:23:39 -07:00
|
|
|
__('Quote: '.$enquirynumber_link.' Revision '.$quote['Quote']['revision']);
|
2009-01-12 21:13:18 -08:00
|
|
|
}
|
|
|
|
|
?></h2>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
|
2009-09-09 20:23:39 -07:00
|
|
|
</div>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
<div id="LoadingDiv" style="display: none;">
|
|
|
|
|
<?php echo $html->image('ajax-loader.gif'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
2009-09-09 20:23:39 -07:00
|
|
|
$i = 0;
|
2009-08-13 19:09:47 -07:00
|
|
|
foreach ($quote['QuotePage'] as $quotePage):
|
|
|
|
|
$class = null;
|
|
|
|
|
if ($i++ % 2 == 0) {
|
|
|
|
|
$class = ' class="altrow"';
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-09 20:23:39 -07:00
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<div class="related">
|
|
|
|
|
<h3>Cover Page <?php echo $i; ?> </h3>
|
|
|
|
|
|
|
|
|
|
<?php echo $ajax->link('View', array('controller'=> 'quote_pages', 'action'=>'show', $quotePage['id']),
|
|
|
|
|
array('update'=>'viewpage'.$i, 'indicator' => 'LoadingDiv','loading'=>'Effect.appear(\'viewpage\')'));
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// echo $ajax->link('View', array('controller'=> 'quote_pages', 'action'=>'show', $quotePage['id']),
|
|
|
|
|
//array('update'=>'viewpage', 'indicator' => 'LoadingDiv'));
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php // echo $html->link(__('Edit', true), array('controller'=> 'quote_pages', 'action'=>'edit', $quotePage['id']));
|
2009-09-09 20:23:39 -07:00
|
|
|
// echo $ajax->link('Edit', array('controller'=> 'quote_pages', 'action'=>'edit', $quotePage['id']),
|
|
|
|
|
// array('update'=>'viewpage'.$i, 'indicator' => 'LoadingDiv','loading'=>'Effect.toggle(\'viewpage\', \'blind\')'));
|
|
|
|
|
echo $html->link('Edit', array('controller'=>'quote_pages', 'action'=>'edit', $quotePage['id']));
|
|
|
|
|
|
|
|
|
|
|
2009-08-13 19:09:47 -07:00
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?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'])); ?>
|
|
|
|
|
|
|
|
|
|
|
2009-09-09 20:23:39 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="viewpage<?php echo $i;?>">
|
|
|
|
|
</div>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
<?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>
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
<div class="related">
|
2009-09-09 20:23:39 -07:00
|
|
|
<h3><?php __('Products in this Quote');?></h3>
|
2009-01-12 21:13:18 -08:00
|
|
|
<?php if (!empty($quote['QuoteProduct'])):?>
|
|
|
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
|
|
|
<tr>
|
|
|
|
|
<th><?php __('Id'); ?></th>
|
|
|
|
|
<th><?php __('Itemnumber'); ?></th>
|
|
|
|
|
<th><?php __('Option'); ?></th>
|
|
|
|
|
<th><?php __('Principle Id'); ?></th>
|
|
|
|
|
<th><?php __('Quantity'); ?></th>
|
|
|
|
|
<th><?php __('Grosssellprice'); ?></th>
|
|
|
|
|
<th><?php __('Title'); ?></th>
|
|
|
|
|
<th><?php __('Description'); ?></th>
|
|
|
|
|
<th><?php __('Discount'); ?></th>
|
|
|
|
|
<th><?php __('Discountamount'); ?></th>
|
|
|
|
|
<th><?php __('Grosssellpriceeach'); ?></th>
|
|
|
|
|
<th><?php __('Netsellpriceeach'); ?></th>
|
|
|
|
|
<th><?php __('Netsellprice'); ?></th>
|
|
|
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
|
|
|
</tr>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
2009-01-12 21:13:18 -08:00
|
|
|
$i = 0;
|
|
|
|
|
foreach ($quote['QuoteProduct'] as $quoteProduct):
|
|
|
|
|
$class = null;
|
|
|
|
|
if ($i++ % 2 == 0) {
|
|
|
|
|
$class = ' class="altrow"';
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<tr<?php echo $class;?>>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
<td><?php echo $quoteProduct['id'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['itemnumber'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['option'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['principle_id'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['quantity'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['grosssellprice'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['title'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['description'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['discount'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['discountamount'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['grosssellpriceeach'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['netsellpriceeach'];?></td>
|
|
|
|
|
<td><?php echo $quoteProduct['netsellprice'];?></td>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
<td class="actions">
|
2009-01-12 21:13:18 -08:00
|
|
|
<?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>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</table>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<div class="actions">
|
|
|
|
|
<ul>
|
2009-09-09 20:23:39 -07:00
|
|
|
<li><?php echo $html->link(__('Add Product to this Quote', true), array('controller'=> 'quote_products', 'action'=>'add', $quote['Quote']['id']));?> </li>
|
2009-01-12 21:13:18 -08:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
2009-08-13 19:09:47 -07:00
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
</div>
|