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'])); ?> -   - - > - > - -   - - > - > - -   - - > - > - -   - -
-
-
- -
- - - 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()); });