Can't create a quote or invoice

There are no unsusual errors in the log file. Which Browser do you use and do you have any script blocking extensions enabled?

Hi Kovah,

I am currently using the Google Chrome and Firefox browser. Both didn’t work but somehow when I tested it on Internet Explorer it worked. Not too sure if it is a coding error or is it the setup of my server. Hopefully we can find something that is causing this problem.

Hi, I’ve been facing the same issue. I can’t create an Invoice from a Quote, the create button doesn’t seem to work, I click on it and nothing happens. I’ve tested it in IE, FF, Chrome and Safari and no error occurs.

Using IP 1.4.4

Please open the console of your browser. If there’s something wrong with that button the error should be logged there.

Hi Kovah, thanks for your response. I’ve copied the console’s error and here it is:

09:38:51.562 SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
<anonymous> jquery-1.11.2.min.js line 2 > eval:17
m.Callbacks/j() jquery-1.11.2.min.js:2
m.Callbacks/k.fireWith() jquery-1.11.2.min.js:2
x() jquery-1.11.2.min.js:4
.send/b() jquery-1.11.2.min.js:4
1 jquery-1.11.2.min.js line 2 > eval:17:36

Can you tell what it is?
Thanks again.

Well this is not too helpful.
Could you please take a look at the web server error logs and/or enable logs for InvoicePlane itself. (Help here: 403 or Stuck error)

Here’s the link http://hastebin.com/akuxecezar.coffee

What about the server itself? The logs does not contain any errors.

There are no errors reported on the server’s log.
The browser’s console error seems to be related to jQuery. Does the jQuery version has anything to do?

No, this has something to do with either the server or the browser.

Here’s the Chrome console error:

Uncaught SyntaxError: Unexpected token <(anonymous function)
@ VM116:17j
@ jquery-1.11.2.min.js:2k.fireWith
@ jquery-1.11.2.min.js:2x
@ jquery-1.11.2.min.js:4b
@ jquery-1.11.2.min.js:4

On both, Firefox & Chrome it gives an error on the console.
IE and Safari and doing the same.

Here’s a link I found, I think it could be helpful.

this means that the server responded with an error instead of any data.

Ok. Thanks for your help. Do you have any idea how can I check if there’s something wrong with the server? I don’t know where to start :smiley:

Change the file application/modules/invoices/views/modal_create_invoice.php at line 52 from

function (data) {
    var response = JSON.parse(data);
    if (response.success == '1') {
        // The validation was successful and invoice was created
        window.location = "<?php echo site_url('invoices/view'); ?>/" + response.invoice_id;
    }

to

function (data) {
    console.log(data);
    var response = JSON.parse(data);
    if (response.success == '1') {
        // The validation was successful and invoice was created
        window.location = "<?php echo site_url('invoices/view'); ?>/" + response.invoice_id;
    }

and then try again. This should display the full response of the server in your browser console.

Thanks Kovah, I did what you recommended and here’s Chrome response:

Uncaught SyntaxError: Unexpected end of input
(anonymous function) @ VM293:17
j @ jquery-1.11.2.min.js:2
k.fireWith @ jquery-1.11.2.min.js:2
x @ jquery-1.11.2.min.js:4
b @ jquery-1.11.2.min.js:4

The only difference is that now it doesn’t say “token” but “end of input”.

Thanks so much for the time you’re giving to this.

Arrr… What the hell…
Do you always do the same thing or do you created a quote first and then an invoice?
It’s pretty confusing that there are other errors each time you try…

I’ve always followed the same steps.

  1. Create Quote
  2. Inside Quote click on “Options -> Quote to Invoice”
  3. On Modal Window I fill Date and Group (No PDF Password)
  4. Click on “Send” button and nothing happens.

“Cancel” button closes the modal.

I have the same problem with creating invoices or quotes.

Didn’t want to jump into someone’s support thread but Kovah since you have access to the /kovah/ installation on my server I thought it may help you troubleshoot this problem (if the problem on my server is the same as what’s being described above).

Okay I will take a look into this if possible.

Hi,

I’m having the same problem, I tried to create a invoice from a quote and I after I click Submit nothing happens. The weird this is that it does work If I had the language set to english I used it in spanish and it does not work. I did a fresh install with 1.4.4 and with a clean database it does work, if I restore my database the problem begin.

The webconsole shows this:

31http://172.16.0.141/quotes/ajax/quote_to_invoice Failed to load resource: the server responded with a status of 500 (Internal Server Error)
jquery-1.11.2.min.js:4 POST http://172.16.0.141/quotes/ajax/quote_to_invoice 500 (Internal Server Error)send @ jquery-1.11.2.min.js:4m.extend.ajax @ jquery-1.11.2.min.js:4m.(anonymous function) @ jquery-1.11.2.min.js:4(anonymous function) @ VM1759:8m.event.dispatch @ jquery-1.11.2.min.js:3r.handle @ jquery-1.11.2.min.js:3

I cannot find any error on apache.

Thanks!