70 lines
2.3 KiB
PHP
Executable file
70 lines
2.3 KiB
PHP
Executable file
<h2>Purchase Order: <?=$document['PurchaseOrder']['title']?></h2>
|
|
|
|
<div id="flashMessage" class="message">
|
|
</div>
|
|
<div class="docButtons">
|
|
<button id="pdfDocButton" data-url="/documents/pdf/<?= $document['Document']['id']; ?>">Generate PDF</button>
|
|
<button id="emailDocButton" data-url="/documents/email_pdf/<?= $document['Document']['id']; ?>">Email PurchaseOrder to customer</button>
|
|
</div>
|
|
|
|
|
|
|
|
<div id="invoiceDetails" class="documentDetails">
|
|
<fieldset>
|
|
<? //TO DO: Copy fields from CMC PO PDF. Wack them here
|
|
// MAKE HTML TABLE ON PDF TEMPLATE IF NECESSARY.
|
|
// ADD MANY JOBS TO THIS FORM WITH JS/CHECKBOXES/ETC
|
|
// ?>
|
|
<? echo $form->create('Document',array('type'=>'post','action'=>'edit', 'default'=>false));
|
|
echo $form->input('Document.id');
|
|
echo $form->input('PurchaseOrder.id');
|
|
echo $form->input('PurchaseOrder.principle_id');
|
|
echo $form->input('PurchaseOrder.principle_reference');
|
|
?>
|
|
<div id="job" class="hiddenDefault">
|
|
<?
|
|
echo $form->input('job', array('id'=>'job_autocomplete', array('label'=>'Job (start typing and select from the list)')));
|
|
?>
|
|
<span class="moreInfo">Items from the OA for this Job will be added automatically to the PO.</span>
|
|
|
|
<ul id="jobsList" class="habtmList">
|
|
<?php foreach($purchaseOrder['Job'] as $job):?>
|
|
<li id="JobID_<?=$job['id']?>">
|
|
<button class="removeFromList">X</button>
|
|
<?=$job['title'];?>
|
|
<input type="hidden" name="data[PurchaseOrder][Job][]" value="<?=$job['id']?>">
|
|
</li>
|
|
<?php endforeach?>
|
|
</ul>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
echo $form->input('PurchaseOrder.currency_id');
|
|
echo $form->input('PurchaseOrder.dispatch_date');
|
|
echo $form->input('PurchaseOrder.date_arrived'); //ARGH. Really Karl?
|
|
|
|
echo $form->input('PurchaseOrder.ordered_from');
|
|
echo $form->input('PurchaseOrder.description');
|
|
|
|
echo $form->input('PurchaseOrder.dispatch_by');
|
|
|
|
echo $form->input('PurchaseOrder.deliver_to');
|
|
echo $form->input('PurchaseOrder.shipping_instructions');
|
|
|
|
|
|
echo $form->end(array('label'=>'Save PurchaseOrder Details', 'id'=>'savePurchaseOrderButton'));
|
|
?>
|
|
</fieldset>
|
|
</div>
|
|
|
|
|
|
<span id="purchaseOrderID" style="display: none;"><?=$document['PurchaseOrder']['id']?></span>
|
|
|
|
<? //debug($this->data);?>
|
|
<? //debug($enquiry);?>
|
|
<?php //debug($document);?>
|
|
<?php //debug($docType);?>
|
|
|
|
<? //debug($invoice); ?>
|