Can't create a quote or invoice

Hi,

I gone through your wiki and forums but can’t seem to find any working solution to my problem. I have installed invoiceplane on 2 different VPS and both end up with the same problem.

I can’t create a quote or a invoice. After the installation and added the client information, I click on the quote button or the invoice button nothing happens. I noticed that a # sign appears at the end of the URL though. In the demo a popup appears but not on my website. Is there anything that is required besides a min of php5.3? I can’t seem to get this to work.

Please advice. Thank you.

Please open the console of your browser. If you click this button and nothing happens ot means that the scripts couldnt load the required modal.
Additionally, please enable the logging insode the configuration file (config.php) by setting zhe log threshold to 2. You can find the logs in corresponding folder inside the application directory.

Hi, thanks for the reply. I have tried opening the console, nothing happens though… I have also set the threshold to 2. Is the log file saved in php extension?

https://drive.google.com/file/d/0B6E7eN_GURcSQm1CQkVGWjJqTUU/view?usp=sharing

May I know what else I must do from here on?

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.