Home Forums Support Invoice and Quote Counter Reset

This topic contains 11 replies, has 3 voices, and was last updated by  GerooTech 2 weeks, 4 days ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #23074

    GerooTech
    Participant

    Hello,

    I have local host invoice ninja currently running v4.5.14 on Ubuntu 18.04 – Whitelabel. I have been using invoice ninja all 2019, and i set the options for the invoices and quotes counter to reset every annually.

    I am using the “INV-{$year}-{$counter}” as the inovice number, and “Q-{$year}-{$counter}” for quotes. However i was trying to create an invoice and quote today, but the year reflects the 2020, but the counter didn’t change from the last invoice / quote.

    Anyone has an idea where to start troubleshooting this, or where to get logs why the counter didn’t reset ??

    NOTE: the next reset field was empty. Not sure if this was required or not.

    • This topic was modified 3 weeks ago by  GerooTech.
    #23078

    Hillel Coren
    Keymaster

    The next reset field needs to be set to the next date the counters should be reset (also the crons need to be enabled).

    #23087

    GerooTech
    Participant

    How can i enable cron, i have cron running for other tasks in the same linux box, however i couldn’t find a settings that i can use to turn cron.

    All i can find on the manual is to set cron to send reoccurring invoices.

    #23089

    Hillel Coren
    Keymaster

    You just need to enable the two crons commands listed here:

    https://invoice-ninja.readthedocs.io/en/latest/configure.html

    #23090

    GerooTech
    Participant

    You mean the ones for daily invoices and reminders ??

    #23091

    Hillel Coren
    Keymaster

    Yup

    #23092

    GerooTech
    Participant

    ok, thanks. I just thought this is only for invoices. I have added the following lines:

    0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-invoices
    0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-reminders

    will set the date for tomorrow. Thanks.

    #23093

    GerooTech
    Participant

    I have changed the time to run today, and this is the output i am getting from the cron job

    Jan 4 18:13:45 websrv crontab[2721]: (root) END EDIT (root)
    Jan 4 18:14:01 websrv cron[2711]: (root) RELOAD (crontabs/root)
    Jan 4 18:15:01 websrv CRON[3170]: (root) CMD (/usr/local/bin/php /path/to/ninja/artisan ninja:send-reminders)
    Jan 4 18:15:01 websrv CRON[3171]: (root) CMD (/usr/local/bin/php /path/to/ninja/artisan ninja:send-invoices)
    Jan 4 18:15:01 websrv cron[2711]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 18:15:01 websrv postfix/sendmail[3175]: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 18:15:01 websrv postfix/sendmail[3176]: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 18:15:01 websrv cron[2711]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 18:15:01 websrv CRON[3162]: (root) MAIL (mailed 42 bytes of output but got status 0x004b from MTA#012)
    Jan 4 18:15:01 websrv CRON[3161]: (root) MAIL (mailed 42 bytes of output but got status 0x004b from MTA#012)

    The counter didn’t reset though

    #23094

    GerooTech
    Participant

    I am sorry i recognized i change the path to the artisan script, still getting the same error though:

    Jan 4 19:22:01 websrv CRON[15892]: (root) CMD (/usr/local/bin/php /var/www/html/ninja/artisan ninja:send-invoices)
    Jan 4 19:22:01 websrv CRON[15893]: (root) CMD (/usr/local/bin/php /var/www/html/ninja/artisan ninja:send-reminders)
    Jan 4 19:22:01 websrv postfix/sendmail[15895]: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 19:22:01 websrv cron[2711]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 19:22:01 websrv CRON[15891]: (root) MAIL (mailed 42 bytes of output but got status 0x004b from MTA#012)
    Jan 4 19:22:01 websrv cron[2711]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 19:22:01 websrv postfix/sendmail[15897]: fatal: open /etc/postfix/main.cf: No such file or directory
    Jan 4 19:22:01 websrv CRON[15890]: (root) MAIL (mailed 42 bytes of output but got status 0x004b from MTA#012)

    #23095

    GerooTech
    Participant

    apparently the php path for my ubuntu is /usr/bin/php instead of /usr/local/bin/php

    • This reply was modified 2 weeks, 5 days ago by  GerooTech.
    #23097

    Titanfail
    Participant

    Easiest way to be sure is to use which php, and it will give you the correct path.

    #23101

    GerooTech
    Participant

    Thanks for your help.

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

You must be logged in to reply to this topic.

Posted in: