Home Forums Support Invoice not sent

This topic contains 45 replies, has 3 voices, and was last updated by  peopleinside 2 days, 21 hours ago.

Viewing 46 posts - 1 through 46 (of 46 total)
  • Author
    Posts
  • #22417

    peopleinside
    Participant

    Hi,
    the recurring invoice has been sent the first october 2019 than the system show the next invoice schedule send is the first of november.

    Today is the 5 of november and the recurring invoice was still not sent.
    I done manually the cron but no error are showed.

    Once again Invoice Ninja seems have issue on send recurring invoice now how i can solve this issue?
    Thanks.

    screenshot

    Invoice Ninja – v4.5.16
    Apache
    PHP 7.3

    • This topic was modified 5 months ago by  peopleinside. Reason: Adding invoice version and server informations
    #22419

    Hillel Coren
    Keymaster

    What was the problem last time?

    #22435

    peopleinside
    Participant

    Usually i have issue with recurring invoice.

    Now i deleted the recurring invoice, created an invoice for this month than set a recurring new invoice from December.

    I hope this will fix the issues.
    Thanks

    #22437

    Hillel Coren
    Keymaster

    By ‘issue’ do you mean the invoice isn’t sent, is it generated and not sent or not generated at all.

    If you’re having problems I doubt recreating the invoice will fix it.

    #22438

    peopleinside
    Participant

    Was not generated.
    I will monitor the new recurring invoice and let’s see.
    Now the status in waiting so should be set correctly let’s see if will be sent, if not i will update this discussion.
    Thank you for the support.

    #22440

    Hillel Coren
    Keymaster

    I suggest logging the output from the crons, it can be a big help debugging issues.

    #22472

    CadmiumTelluride
    Participant

    This is due to the PHP version. Please make sure your running PHP 7.2 (Assuming your self-hosting)

    #22473

    peopleinside
    Participant

    Hi, thank you for your message! I use PHP 7.3 as i keep always software updated.
    I have just one doubt and is the recurring invoice was not created correctly.
    I will monitor the new created where now the status is pending so it’s correct.

    #22475

    CadmiumTelluride
    Participant

    Your welcome. I went through the same situation, as you described it, with the recurring statements before i figured it was the php version. If you have a testing environment you can set the job to fire every few minutes so do don’t have to wait for long.

    #22476

    Hillel Coren
    Keymaster

    FYI… the latest version now has support for PHP 7.3 🙂

    https://github.com/invoiceninja/invoiceninja/releases

    #22478

    CadmiumTelluride
    Participant

    Great! My apologies for missing that detail. I’ve updated my self hosting copy, tested the recurring invoice with PHP 7.2, then updated to PHP 7.3 and tested again. The invoice emails where successfully received and the PDFs where successfully generated.

    @peopleinside I withdraw my previous suggestion, because your running the latest version. Like Hillel recommended, you need to get the output from the cron jobs.

    #22479

    Hillel Coren
    Keymaster

    Awesome, glad to hear it! Thanks for the update

    #23036

    peopleinside
    Participant

    Hi Hillel, hope you are well and you enjoy this Christmas time. Don’t know if you celebrate this.

    I have manually sent an recurring invoice because was not automatically sent.
    The invoice was sent at 6 of the month because also if i set to send the first day was not send maybe because customer has no email? I don’t have to send by email to costumer, i have to see generated invoice in the system.

    I was not able to generate the invoice without a valid email address on the customer profile, this is bad for me. I put mine email for be able to send and activate the recurring invoice.

    This caused the invoice was not sent automatically the first of the month as i set so i need force the send at 6 of the month. After done this i removed the email address from the customer as they should not receive by email.
    Now i don’t know if also the next invoice will be not generated because of this anyway is scheduled for the 6 of the next month, I need correct this date to the first of the month.

    In the recurring invoice i see sent on 6 and will send next on 6. How can i edit in the database will be sent on 6 to will be sent on 1?

    Hope in the future you can add the possibility to change this scheduled date from the interface without have to stop the recurring invoice and generate another one.

    Hope also you will insert an option to be not forced to send invoice to the customer who don’t want have sent by email but i need have in the web interface.

    Thanks.

    #23047

    Hillel Coren
    Keymaster

    You can change the start date of the recurring invoice to the next date it should be sent.

    You can also disable auto-emailing of recurring invoices in the workflow section on Settings > Invoice Settings.

    We’re currently working on v2 of the app and will keep this use-case in mind.

    Happy Holidays and have a great new year!

    #23050

    peopleinside
    Participant

    Hi Hillel, thank you for the reply!

    You can change the start date of the recurring invoice to the next date it should be sent.

    Done thanks now status is waiting, Hope to see the invoice sent on the first of Jenuary.

    You can also disable auto-emailing of recurring invoices in the workflow section on Settings > Invoice Settings.

    Option to disable for all client found. I have just one client, maybe will be nice can customize this option for each customer. Again, thanks.

    Happy Holidays and Happy new year!

    #23465

    peopleinside
    Participant

    I still have recurring invoice not automated created. The cron is active, no errors.
    Your software gives to me issues on recurring invoice. I have to send manually every month.

    #23466

    Hillel Coren
    Keymaster

    Are you able to reproduce the problem with a test invoice?

    #23470

    peopleinside
    Participant

    Hi Hillel, it’s not easy.
    Since i moved from a different invoice system the only issue that found in your software is how generation of invoice works.

    I update your software with Softaculous script manager, my HP is updated 7.3 as for Apache and my server.
    Again this month the system has not generated the invoice and i need send manually.
    In the past the system was not sending on correct date and as now i cannot correct i sent yesterday the invoice and i need is sent every first day of the month… need stop the recurring invoice and create another.

    Also i don’t like the system send email when i need to generate manually the invoice and customer must have an email address or system give an error. I don’t have to send invoice to the customer, I’m not into business i need manage invoice by myself.

    I don’t know why is so hard have recurring invoice working.
    Mine is just a feedback, i think i will still have issue on this.

    #23471

    peopleinside
    Participant

    I have no error in server log.
    Checking PHP I find this:

    [06-Feb-2020 12:32:39] WARNING: [pool index] child 22869, script ‘invoice/public/index.php’ (request: “POST /invoice/public/index.php”) executing too slow (6.182955 sec), logging

    i don’t see any other errors so i can not understand why of the issue.

    #23473

    Hillel Coren
    Keymaster

    Are you saying the invoice is set to send but doesn’t send?

    If you can give me steps to replicate a problem I can try to look into it.

    #23474

    peopleinside
    Participant

    Yes. At the moment i deleted again the recurring invoice and scheduled a new one.
    The status is waiting so should be active.
    I will see again…

    #23475

    CadmiumTelluride
    Participant

    @peopleinside I’m curious, does you invoice have an image? if yes, could you check how large it is or test without it? this would include the company logo.

    #23476

    peopleinside
    Participant

    Logo is 538 x 338 png

    #23477

    CadmiumTelluride
    Participant

    That should be fine. Just to confirm with you what you already mentioned:

    Manually executing the command /usr/local/bin/php /path/to/ninja/artisan ninja:send-invoices yields no errors? you should see something similar to this:

    Fri, 07 Feb 2020 21:45:42 +0000 Running SendRecurringInvoices…
    Fri, 07 Feb 2020 21:45:42 +0000 5 recurring invoice(s) found
    Fri, 07 Feb 2020 21:45:42 +0000 Processing Invoice: 3
    Fri, 07 Feb 2020 21:45:42 +0000 Not billed – Sending Invoice
    Fri, 07 Feb 2020 21:46:46 +0000 0 recurring expenses(s) found
    Fri, 07 Feb 2020 21:46:52 +0000 Done

    In the PHP Log (php_errors.log) you get a Warning. right?

    In \ninja\storage\logs stacktrace.log and laravel-error.log have no errors. right?

    #23478

    peopleinside
    Participant

    No errors seems.
    If i do the command by SSH nothing is showed just a new empty line

    #23485

    CadmiumTelluride
    Participant

    Could you try the verbose option to see if you can get some information? try: php artisan ninja:send-invoices -vvv

    #23500

    peopleinside
    Participant

    Tue, 11 Feb 2020 09:41:14 +0000 Running SendRecurringInvoices…
    Tue, 11 Feb 2020 09:41:14 +0000 0 recurring invoice(s) found
    Tue, 11 Feb 2020 09:41:14 +0000 0 recurring expenses(s) found
    Tue, 11 Feb 2020 09:41:14 +0000 Done

    #23545

    CadmiumTelluride
    Participant

    Well that’s good. From the output, the second line tells are no recurring invoices active. Lets double check the results… Can you run the following query?

    SELECT count(*) FROM invoices WHERE is_recurring = 1 and is_deleted = 0 AND ( end_date <= NOW() OR end_date IS NULL )

    If the result is 0, or if you are not able to run the query, create a new recurring invoice and run the artisan command again. You should get something like “Tue, 11 Feb 2020 09:41:14 +0000 1 recurring invoice(s) found”

    #23546

    peopleinside
    Participant
    #23547

    CadmiumTelluride
    Participant

    Ok, I see that my query was missing a few conditions try this one (copied from the source) :

    SELECT count(*) FROM invoices WHERE
    is_deleted IS FALSE
    AND deleted_at IS NULL
    AND is_recurring IS TRUE
    AND is_public IS TRUE
    AND frequency_id > 0
    AND start_date <= NOW()
    AND (end_date IS NULL OR end_date >= NOW())

    #23548

    peopleinside
    Participant
    #23549

    CadmiumTelluride
    Participant

    great! one of these conditions is not being met:

    deleted_at IS NULL
    is_public IS TRUE
    frequency_id > 0
    start_date <= NOW()

    so try this query:

    SELECT deleted_at, is_public, frequency_id, start_date FROM invoices WHERE
    is_deleted IS FALSE
    AND is_recurring IS TRUE
    AND (end_date IS NULL OR end_date >= NOW())

    you should get 4 records

    • This reply was modified 1 month, 3 weeks ago by  CadmiumTelluride. Reason: spellcheck
    #23551

    peopleinside
    Participant
    #23552

    CadmiumTelluride
    Participant

    Thanks, lets do a test. Set up a new recurring invoice, use a test client with a contact that has your email. Then set the “Start Date” to a date in the past, like yesterday. Leave the end date blank, the frequency weekly (so you don’t have to wait a month). If you run the query:

    SELECT count(*) FROM invoices WHERE
    is_deleted IS FALSE
    AND deleted_at IS NULL
    AND is_recurring IS TRUE
    AND is_public IS TRUE
    AND frequency_id > 0
    AND start_date <= NOW()
    AND (end_date IS NULL OR end_date >= NOW())

    you should get one row and if you run the artisan command you should see a “…1 recurring invoice(s) found” and “…Processing Invoice: #” and receive a new email (because the start date was set in the past). If you run the artisan command a second time you should still see the “…1 recurring invoice(s) found”, but no invoice will be processed, until a full week has passed. Let me know if you get the first recurrence.

    #23553

    peopleinside
    Participant

    Currently i can’t and want do test on Ninja Invoice also because if I’m not wrong is hard to delete things you can only archive it. I will see at the start of march if i still having the same issue.

    Or i need install a new test instance but i cannot do this now.
    I will see… i cannot believe the software is bugged but if is I’m surprised no user are reporting.

    Also is hard to me understand what’s wrong.
    I will see if I will be able to try before having again the issue in march.
    Thanks for your help.

    • This reply was modified 1 month, 3 weeks ago by  peopleinside.
    #23555

    CadmiumTelluride
    Participant

    Ok, I will do a test as well… I’m inclined to think is a configuration issue.

    I set up a recurring invoice, Start Date Mar 1, 2020, Due Date set to the first of the month, no end date, monthly frequency, and no email on the client contact. If i’m missing anything on this setup or got something wrong, let me know.

    #23556

    peopleinside
    Participant

    Due Date is set at the 5th day for me.
    I have set end data in December of 2021.
    No email on the customer field.

    Thanks.
    My server is Apache with PHP 7.3

    #23762

    CadmiumTelluride
    Participant

    This is what i have to report:
    1.The recurring invoice status is “Active” and it shows: Sent Last: Mar 1, 2020 and Send Next: Apr 1, 2020
    2.The invoice was created and is listed in the “Invoices” section, with the status set to “Draft”. It was not sent as the single contact for the client did not have an email set.
    3.The laravel-error.log shows the following error: [2020-03-01 17:01:43] production.ERROR: PhantomJS – Invalid response http://localhost/view/bm07tluadxllvpjemhvrllpvyqv6bntx?phantomjs=true&phantomjs_secret=82Sufdktfore3kWp8zzlkdz5fkshom5q: {“statusCode”:404,”error”:”Not Found”} {“context”:”PHP”,”user_id”:1,”account_id”:1,”user_name”:”Admin Test”,”method”:”GET”,”user_agent”:””,”locale”:”en”,”ip”:”127.0.0.1″,”count”:1,”is_console”:”yes”,”is_api”:”no”,”db_server”:”mysql”,”url”:”/”} []
    However, the invoice is shown when clicking “View in Portal” for the contact that has no email set (eg. http://localhost/view/bm07tluadxllvpjemhvrllpvyqv6bntx).

    Other 2 invoices i set up as tests where generated and the notifications sent as one would expect, and did not produce any errors in the logs.

    #23763

    peopleinside
    Participant

    Yes also this month the invoice was not created.
    Seems i have not particular error log. I found a possible error with SMTP email, fixed.
    I’m forced to insert an email in the customer profile (i don’t like this) and now generated sent manually.

    #23767

    CadmiumTelluride
    Participant

    That is strange. Even without an email, the invoice should have been created, just not sent.

    #23768

    peopleinside
    Participant

    No i have to send manually so it’s created.

    #24311

    peopleinside
    Participant

    I still have the issue of automatic recurring invoice.
    I have two cron set in the server and this is not working because invoice is not sent.
    Also i don’t wanna be forced to insert an email address in the customer profile.
    I don’t wanna leave Invoice Ninja but I’m thinking about it if i could not find a solution.

    I use other applications that need CronJob and all works so it’s just an issue with Invoice Ninja.
    I don’t know why but recurring invoice is not working for me even if i try to recreate from zero.

    #24313

    Hillel Coren
    Keymaster

    Does the client have an email address set?

    #24315

    peopleinside
    Participant

    Yes, was present a not existent email address so all time i need create manually the invoice i receive a delivery status notification. Now as this (put a fake email) doesn’t solve i removed the email address.

    With email or without email the system still not working.

    I still think i want to be able to have recurring invoice generated and showed in the system without the need the customer give me an email address. I use the software for mine management not for send to the user an invoice.

    The cron and the recurring invoice is not doing his job because every month since maybe 2020 I need generate manually the recurring invoice.

    #24316

    Hillel Coren
    Keymaster

    Sorry, I’m not sure. No one else is reporting the problem which makes me thing it’s a configuration issue.

    #24317

    peopleinside
    Participant

    I understand but “not fully agree”.
    A configuration issue let’s me think about an issue created for misconfiguration from the user.

    In my side when I open the recurring invoice the system say the next invoice will be sent the next month. The error can be only in the Cron but the cron is correct so i have no way to explain why the issue exist also in the past was not strong as now. Now I’m unable to see recurring invoice work.

    Another issue is that if the customer has no a valid email address recurring invoice has issue?! Don’t know.
    Sad to be unable to resolve the issue anyway thanks for your help.

Viewing 46 posts - 1 through 46 (of 46 total)

You must be logged in to reply to this topic.

Posted in: