72 lines
2.5 KiB
PHP
72 lines
2.5 KiB
PHP
<h2>Quote: <?=$html->link($enquiry['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view',$enquiry['Enquiry']['id']));?> <?
|
|
if($document['Quote']['revision'] > 0) {
|
|
echo "Revision {$document['Quote']['revision']} ";
|
|
}
|
|
?>
|
|
for
|
|
<?=$html->link($enquiry['Customer']['name'], array('controller'=>'customers','action'=>'view',$enquiry['Customer']['id']));?>
|
|
</h2>
|
|
|
|
<?=$this->element('pdf_created_message'); ?>
|
|
<?
|
|
|
|
echo $form->create('Document',array('type'=>'post','action'=>'edit', 'default'=>false));
|
|
echo $form->input('Document.id');
|
|
?>
|
|
|
|
<div class="docButtons">
|
|
<button id="generateFirstPage">(re)Generate First Page</button>
|
|
<button id="addPage">Add Content Page</button>
|
|
<button id="editQuoteDetails">View/Edit Quote Details</button>
|
|
<?=$html->link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?>
|
|
</div>
|
|
|
|
<div id="flashMessage" class="message">
|
|
</div>
|
|
|
|
<div class="pages">
|
|
<?php
|
|
$first = true;
|
|
|
|
foreach($document['DocPage'] as $key => $page):?>
|
|
|
|
<? if($first == true) {
|
|
$class = 'page firstPage';
|
|
$first = false;
|
|
}
|
|
else {
|
|
$class = 'page';
|
|
}
|
|
?>
|
|
|
|
<div class="docPage">
|
|
<?=$form->input("DocPage.{$key}.id");?>
|
|
<?=$form->input("DocPage.{$key}.content", array('class'=>$class, 'label'=>'Page '.$page['page_number'], 'between'=>'<button class="removePage">X</button>'));?>
|
|
<?=$form->input("DocPage.{$key}.document_id", array('type'=>'hidden'));?>
|
|
<?=$form->input("DocPage.{$key}.page_number", array('type'=>'hidden'));?>
|
|
</div>
|
|
|
|
<?endforeach?>
|
|
</div>
|
|
<div class="input submit"><button id="savePages">Save Pages</button></div>
|
|
<?=$form->end();?>
|
|
|
|
<span id="quoteID" style="display: none;"><?=$document['Quote']['id']?></span>
|
|
|
|
<div id="commCommentsInitialString" style="display:none;">
|
|
<u>Commercial Comments:</u><br />
|
|
<span style="font-size: small;">The prices quoted are subject to our Standard Terms and Conditions of Sale dated 1/7/06 that is attached and remain firm unless specifically varied in writing. The prices above are based on the following:</span>
|
|
<ol class="commList">
|
|
</ol>
|
|
<span style="font-size: small;">ANY VARIATIONS ON ITEMS 5. TO 7. WILL BE TO YOUR ACCOUNT. THIS QUOTATION IS BASED ON QUANTITIES STATED AND IS SUBJECT TO CHANGE IF QUANTITIES VARY.</span>
|
|
</div>
|
|
|
|
<? //For re-Generating the first page ?>
|
|
<div id="contactFirstName" style="display: none;"><?=$enquiry['Contact']['first_name'];?></div>
|
|
|
|
|
|
<? //debug($this->data);?>
|
|
<? //debug($enquiry);?>
|
|
<?php //debug($document);?>
|
|
<?php //debug($docType);?>
|