Work on packing lists. Fixed problem cloning products
This commit is contained in:
parent
834a7d233a
commit
0211c87741
|
|
@ -82,6 +82,10 @@ class DocumentsController extends AppController {
|
|||
$this->set('currencies', $this->Document->OrderAcknowledgement->Currency->find('list'));
|
||||
$this->set('job', $this->Document->OrderAcknowledgement->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id']))));
|
||||
$docTypeElement = 'document_orderack_view';
|
||||
|
||||
case 'packingList':
|
||||
$docTypeElement = 'document_packinglist_view';
|
||||
break;
|
||||
}
|
||||
|
||||
$this->set('docTypeElement', $docTypeElement);
|
||||
|
|
@ -282,6 +286,11 @@ class DocumentsController extends AppController {
|
|||
$this->data['Document']['type'] = 'orderAck';
|
||||
break;
|
||||
|
||||
|
||||
case "packingList";
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(isset($source_document_id)) {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ class ProductsController extends AppController {
|
|||
$this->data['Product']['principle_id'] = $product['Product']['principle_id'];
|
||||
$this->data['Product']['title'] = $product['Product']['title'];
|
||||
$this->data['Product']['description'] = $product['Product']['description'];
|
||||
$this->data['Product']['item_code'] = $product['Product']['item_code'];
|
||||
$this->data['Product']['item_description'] = $product['Product']['item_description'];
|
||||
|
||||
|
||||
$principles = $this->Product->Principle->find('list');
|
||||
$this->set(compact('principles', 'product_categories'));
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@
|
|||
<h3>Create new Documents based on this</h3>
|
||||
<ul class="document-buttons">
|
||||
<li>
|
||||
<button id="createInvoice" data-href="/documents/newDocument/invoice/<?=$enquiry['Enquiry']['id']?>/<?=$job['Job']['id']?>/<?=$document['Document']['id']?>">Create Invoice</button>
|
||||
<button id="createInvoice" class="button-link" data-href="/documents/newDocument/invoice/<?=$enquiry['Enquiry']['id']?>/<?=$job['Job']['id']?>/<?=$document['Document']['id']?>">Create Invoice</button>
|
||||
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<button id="createPackingList" class="button-link" data-href="/documents/newDocument/packingList/<?=$enquiry['Enquiry']['id']?>/<?=$job['Job']['id']?>/<?=$document['Document']['id']?>">Create Packing List</button>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ $(function() {
|
|||
$("#addJobConfirmation").dialog('open');
|
||||
});
|
||||
|
||||
$("#createInvoice").click(function() {
|
||||
$(".button-link").click(function() {
|
||||
location.href = $(this).data('href');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue