top_banner.png

Treat without the trick!

Be brave and face your Redmine fears Horribly awesome discounts wait for you!

Halloween special offer has begun!

Recurring invoices

In order to make your invoice recurring you need to:

1. Mark invoice as recurring

Go to the view of the invoice and click Edit. Find Recurring invoice option (just after Description, by default it is disabled) and check it in. You will see the following fields:

recurring_invoice.png

  • Recurring period: frequency of action - from weekly to yearly.
  • Recurring action: either create a draft of the invoice or send it directly to the client.
  • Recurring occurrences: total times to perform an action. If left blank, it will be performed ad infinitum.

Also, you can create a special email template for your recurring invoices. Go to Administration -> Invoices, Recurring email template tab. Prepare the template, using available macros, and save. It will be used automatically for all recurring invoices. Each time a recurring invoice is sent, the assigned user can be notified if you check that option in.

recurring_invoice_message.png

2. Schedule action to be performed automatically

On UNIX systems, you can schedule automatic execution with a cron job . Customize and add the following line to the crontab file (in this example, task will be executed every day):

* * */1 * * redmineuser rake -f /path/to/redmine/appdir/Rakefile redmine:invoices:recurring RAILS_ENV="production"

Note: This will not cause invoices to be sent out every day, rather Redmine would check every day if an invoice action is to be performed.

Note: You can manually execute recurring invoice actions through
bundle exec rake redmine:invoices:recurring RAILS_ENV="production" for UNIX,
or
SET RAILS_ENV=production
bundle exec rake redmine:invoices:recurring for Windows.

On Windows systems, you can do the following:

  1. Create a file called send_invoices.bat containing the lines
    set RAILS_ENV=production
    CALL bundle exec rake %*
    Bitnami users should also edit and add the line
    CALL (...)\Bitnami\redmine\scripts\setenv.bat
    at the beginning of the file (replace (...) with the path to your Bitnami folder).

    Make sure to save with ANSI encoding (the default with Windows Notepad).
  2. Open Windows Task Scheduler and click Create Task....
  3. You should check the various options, but two things are core:
    1. With a Trigger you can set up the frequency of task execution;
    2. Add an Action with the following parameters:
    • Action: Start a program
    • Program/script: path\to\send_invoices.bat (the file we created at step 1)
    • Add arguments(optional): redmine:invoices:recurring
    • Start in(optional): path\to\Redmine (where Redmine rakefile resides)

new_action.png

Was this article helpful? Yes  No
102 from 197 found this helpful