Added confirm box to first page overwrite

This commit is contained in:
Karl Cordes 2013-03-29 18:20:00 +11:00
parent da23179673
commit 4f9ef7198d
3 changed files with 439 additions and 421 deletions

View file

@ -1,39 +1,48 @@
<? <?
App::import('Vendor','pagecounter'); App::import('Vendor','pagecounter');
$pagecounter = new PageCounter(); $pagecounter = new PageCounter();
?> ?>
<p>Dear <?=$enquiry['Contact']['first_name']?>,</p> <p>Dear <?=$enquiry['Contact']['first_name']?>,</p>
<p>Thank you for your enquiry. The following quotation is for:</p> <p>Thank you for your enquiry. The following quotation is for:</p>
<table> <table>
<tr> <tr>
<td width="10%"><u><b>Item</b></u></td> <td width="10%"><u><b>Item</b></u></td>
<td width="80%"><u><b>Description</b></u></td> <td width="80%"><u><b>Description</b></u></td>
<td width="10%"><u><b>Quantity</b></u></td> <td width="10%"><u><b>Quantity</b></u></td>
</tr> </tr>
<? foreach($document['LineItem'] as $li):?> <? foreach($document['LineItem'] as $li):?>
<tr> <tr>
<td valign="top" width="10%"><? if($li['option'] == 1) { <td valign="top" width="10%"><? if($li['option'] == 1) {
echo 'Option<br>'; echo 'Option<br>';
} }
?><?=$li['item_number']?></td> ?><?=$li['item_number']?></td>
<td width="80%"><?=$li['title'];?></td> <td width="80%"><?=$li['title'];?></td>
<td valign="top" width="10%"><?=$decimal->formatDecimal($li['quantity']);?></td> <td valign="top" width="10%"><?=$decimal->formatDecimal($li['quantity']);?></td>
</tr> </tr>
<? endforeach;?> <? endforeach;?>
</table> </table>
<p></p> <p></p>
<p>If you have any further queries, please contact us at our office for assistance.</p> <p>If you have any further queries, please contact us at our office for assistance.</p>
<p>We look forward to your reply.</p> <p>We look forward to your reply.</p>
<p>Regards,</p> <p>Regards,</p>
<?=$enquiry['User']['first_name'].' '.$enquiry['User']['last_name'];?><br /> <?=$enquiry['User']['first_name'].' '.$enquiry['User']['last_name'];?><br />
<?=$enquiry['User']['job_title'];?><br /> <?=$enquiry['User']['job_title'];?><br />
<br /> <br />
<u><b>Attachments:</b></u><br /> <u><b>Attachments:</b></u><br />
CMC Technologies Terms & Conditions of Sale 1/7/06 (attached)<br> CMC Technologies Terms & Conditions of Sale 1/7/06 (attached)<br>
<?php foreach($attachments as $attachment) {; ?> <?php foreach($attachments as $attachment) { ?>
<?php echo $attachment['Attachment']['name']; ?> (<?=$pagecounter->count($attachment['Attachment']['file']); ?> pages)<br> <?php
<?php } ?>
$pagecount = '';
if($attachment['Attachment']['type'] == 'application/pdf') {
$pagecount = '('.$pagecounter->count($attachment['Attachment']['file']).') pages';
}
?>
<?= $attachment['Attachment']['name']; ?> <?= $pagecount ?><br>
<?php
} ?>

View file

@ -16,10 +16,12 @@ echo $form->input('Document.id');
?> ?>
<div class="docButtons"> <div class="docButtons">
<button id="generateFirstPage">(re)Generate First Page</button> <button id="generateFirstPage">Generate first fage</button>
<button id="addPage">Add Content Page</button> <button id="addPage">Add Content Page</button>
<button id="editQuoteDetails">View/Edit Quote Details</button> <button id="editQuoteDetails">View/Edit Quote details</button>
<?=$html->link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?> <button id="pdfDocButton">Generate PDF</button>
<button id="emailDocButton">Email Quote to customer</button>
<?=$html->link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?>
<?=$html->link('Email this Quote', '/documents/email_pdf/'.$document['Document']['id']);?> <?=$html->link('Email this Quote', '/documents/email_pdf/'.$document['Document']['id']);?>
</div> </div>

File diff suppressed because it is too large Load diff