diff --git a/vendors/pdfdoc.php b/vendors/pdfdoc.php index 5442b2a9..5950f912 100644 --- a/vendors/pdfdoc.php +++ b/vendors/pdfdoc.php @@ -121,8 +121,12 @@ ENDHTML; $this->MultiCell($firstColWidth, 0, "$docTypeFullName TO:", 'LTR', 'L', 0, 0); $this->MultiCell($secondColWidth, 0, $companyName, 'LTR', 'L', 0, 0); + $fromString = <<{$fromName} +ENDSTRING; + $this->MultiCell($thirdColWidth, 0, "FROM:", 'LT', 'L', 0, 0); - $this->MultiCell($fourthColWidth, 0, "$fromName", 'TR', 'L', false, 1, null,null, true,0,true, false, 0, null, false); //Start a new line after this. + $this->MultiCell($fourthColWidth, 0, $fromString, 'TR','L', 0, 1, null, null, true, 0, true); //Start a new line after this. $this->MultiCell($firstColWidth, 0, "EMAIL TO:", 'LR', 'L', 0, 0); diff --git a/views/documents/pdf.ctp b/views/documents/pdf.ctp index b43e588a..24f0f8ab 100755 --- a/views/documents/pdf.ctp +++ b/views/documents/pdf.ctp @@ -38,10 +38,10 @@ foreach($document['DocPage'] as $page) { $pdfdoc->DetailsBox($docTypeFullName, $companyName, $emailTo, $attention, $fromName, $fromEmail, $enquiryNumber, $your_reference, $issue_date); - + /*$pdfdoc->DetailsBoxHTML($docTypeFullName, $companyName, $emailTo, $attention, $fromName, $fromEmail, $enquiryNumber, $your_reference, $issue_date);*/ - + $firstPageDone = true; } diff --git a/webroot/js/document_add_edit.js b/webroot/js/document_add_edit.js index dd300d57..ac71c342 100644 --- a/webroot/js/document_add_edit.js +++ b/webroot/js/document_add_edit.js @@ -36,8 +36,16 @@ $(function() { var thisLineItemInputs = $('#LineItemAddForm').find('input,select,textarea'); $.post('/line_items/ajax_add', thisLineItemInputs, function(data) { - $( "#addLineItemModal" ).dialog('close'); + + if(data == 'SUCCESS') { + $( "#addLineItemModal" ).dialog('close'); + } + else { + alert("Line Item could not be saved") + $('#LineItemDescription').ckeditor(config); + } + }); }, @@ -69,8 +77,19 @@ $(function() { var thisLineItemInputs = $('#LineItemEditForm').find('input,select,textarea'); $.post('/line_items/ajax_edit', thisLineItemInputs, function(data) { - $( "#editLineItemModal" ).dialog('close'); + + + + if(data == 'SUCCESS') { + $( "#editLineItemModal" ).dialog('close'); + + } + else { + alert("Line Item could not be saved") + $('#LineItemDescription').ckeditor(config); + } + }); },