cmc-sales/views/documents/view.ctp

72 lines
1.5 KiB
PHP
Executable file

<?php
echo $javascript->link('ckeditor/ckeditor');
echo $javascript->link('ckeditor/adapters/jquery');
echo $javascript->link('document_add_edit');
?>
<h2><?=$docTypeFullName?>: <?=$html->link($enquiry['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view',$enquiry['Enquiry']['id']));?> <?
if($document['Document']['revision'] > 0) {
echo "Revision {$document['Document']['revision']} ";
}
?>
for
<?=$html->link($enquiry['Customer']['name'], array('controller'=>'customers','action'=>'view',$enquiry['Customer']['id']));?>
</h2>
<?=$this->element('pdf_created_message'); ?>
<?
switch($docType) {
case 'quote':
echo $this->element('document_quote_view');
break;
case 'invoice':
echo $this->element('document_invoice_view');
break;
case 'purchaseOrder':
echo 'Purchase OOOOORDER!!';
break;
}
?>
<button class="addLineItem">Add Line Item</button>
<div id="lineItems">
</div>
<button class="addLineItem">Add Line Item</button>
<div id="pageContentFactory">
<?
echo $form->input("DocPage.content", array('class'=>'page', 'label'=>'Page', 'between'=>'<button class="removePage">X</button>'));
?>
</div>
<div id="addLineItemModal" title="Add Line Item">
</div>
<div id="editLineItemModal" title="Edit Line Item">
</div>
<div id="QuoteDetails" title="Edit Quote Details">
</div>
<div id="InvoiceDetails">
</div>
<span id="documentID" style="display:none;"><?=$document['Document']['id']?></span>
<?php // debug($currency);?>
<?php //debug($docType);?>
<?php //debug($enquiry);?>
<?php debug($document);?>