diff --git a/app/controllers/documents_controller.php b/app/controllers/documents_controller.php
index 5b0f37a1..b69c5c98 100755
--- a/app/controllers/documents_controller.php
+++ b/app/controllers/documents_controller.php
@@ -251,7 +251,6 @@ class DocumentsController extends AppController {
);
foreach($oa_attribues as $attr) {
-
$this->data['Invoice'][$attr] = $sourceDoc['OrderAcknowledgement'][$attr];
}
}
diff --git a/app/views/documents/viewDEFAULT.ctp b/app/views/documents/viewDEFAULT.ctp
deleted file mode 100755
index 9b75cc39..00000000
--- a/app/views/documents/viewDEFAULT.ctp
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
- - >
- - >
-
-
-
- - >
- - >
-
-
-
- - >
- - >
- link($document['Customer']['name'], array('controller' => 'customers', 'action' => 'view', $document['Customer']['id'])); ?>
-
-
- - >
- - >
- link($document['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $document['Enquiry']['id'])); ?>
-
-
- - >
- - >
- link($document['Job']['title'], array('controller' => 'jobs', 'action' => 'view', $document['Job']['id'])); ?>
-
-
- - >
- - >
- link($document['User']['username'], array('controller' => 'users', 'action' => 'view', $document['User']['id'])); ?>
-
-
- - >
- - >
- link($document['Contact']['name'], array('controller' => 'contacts', 'action' => 'view', $document['Contact']['id'])); ?>
-
-
- - >
- - >
-
-
-
- - >
- - >
-
-
-
- - >
- - >
-
-
-
-
-
-
-
- - link(__('Edit Document', true), array('action' => 'edit', $document['Document']['id'])); ?>
- - link(__('Delete Document', true), array('action' => 'delete', $document['Document']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $document['Document']['id'])); ?>
- - link(__('List Documents', true), array('action' => 'index')); ?>
- - link(__('New Document', true), array('action' => 'add')); ?>
- - link(__('List Customers', true), array('controller' => 'customers', 'action' => 'index')); ?>
- - link(__('New Customer', true), array('controller' => 'customers', 'action' => 'add')); ?>
- - link(__('List Enquiries', true), array('controller' => 'enquiries', 'action' => 'index')); ?>
- - link(__('New Enquiry', true), array('controller' => 'enquiries', 'action' => 'add')); ?>
- - link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?>
- - link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?>
- - link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?>
- - link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?>
- - link(__('List Contacts', true), array('controller' => 'contacts', 'action' => 'index')); ?>
- - link(__('New Contact', true), array('controller' => 'contacts', 'action' => 'add')); ?>
- - link(__('List Invoices', true), array('controller' => 'invoices', 'action' => 'index')); ?>
- - link(__('New Invoice', true), array('controller' => 'invoices', 'action' => 'add')); ?>
- - link(__('List Quotes', true), array('controller' => 'quotes', 'action' => 'index')); ?>
- - link(__('New Quote', true), array('controller' => 'quotes', 'action' => 'add')); ?>
- - link(__('List Pages', true), array('controller' => 'pages', 'action' => 'index')); ?>
- - link(__('New Page', true), array('controller' => 'pages', 'action' => 'add')); ?>
-
-
-
-
-
diff --git a/app/views/enquiries/view.ctp b/app/views/enquiries/view.ctp
index 26f45e6e..ac92b308 100755
--- a/app/views/enquiries/view.ctp
+++ b/app/views/enquiries/view.ctp
@@ -335,8 +335,9 @@
+
+
+
Note: View an OrderAcknowledgement to create an Invoice pre-filled with the same data
diff --git a/app/webroot/js/document_add_edit.js b/app/webroot/js/document_add_edit.js
index c84eb570..b4486fe0 100755
--- a/app/webroot/js/document_add_edit.js
+++ b/app/webroot/js/document_add_edit.js
@@ -388,6 +388,8 @@ $(function() {
//OA View.
$("#saveOAButton").click(function() {
saveDocument('Order Acknowledgement');
+ //if the job has changed, the create invoice button wont work properly.
+ window.location.reload(true);
$('.job-title').html($("#OrderAcknowledgementJobId :selected").text());
});