invoiceninja / invoiceninja

A source-available invoice, quote, project and time-tracking app built with Laravel
https://invoiceninja.com
Other
8.26k stars 2.28k forks source link

Recurring invoice created relative to `last_send`, not `start_date` #3407

Open alpipego opened 4 years ago

alpipego commented 4 years ago

I'm not sure if this a bug or intended to work that way. I have a recurring invoice that's monthly and the start date is 2019-07-01.

I had problems with my cronjob last month and thus it wasn't created until 2020-02-03. In the UI it's now set to always be sent on the third:

image

I'd much rather see it be created relative to the start_date and not the last_send.

I've looked at #1952, #1553, and #1788, and I think to change the start date is only a workaround and does not fix the issue.

turbo124 commented 4 years ago

Yes, recurring is generated from the last sent date, it should like the cron issue is the root cause.

alpipego commented 4 years ago

Well, I know that the cron issue is what caused it, but I still do not understand why it's designed this way.

Let's say today, March, 3rd, I create a new recurring invoice; I'll set the start_date to March, 1st to get the first invoice today. The next invoice will be created on April, 3rd instead of April, 1st.

That does not make sense to me, what good is the start date then?

turbo124 commented 4 years ago

The start date is used if the recurring invoice is to be started sometime in the future, not on the date it was created.

alpipego commented 4 years ago

Ok, that's fine. Why does the next send not use the start_date?

turbo124 commented 4 years ago

This is the way the system has been designed.

maikst commented 4 years ago

Well, this is understood. But WHY is it designed this way?

I have the same problem. Startdate was the first of a month and every next sending is one day later.... Example:

  1. on 1. Jan. 2020
  2. on 2. Feb 2020
  3. on 3. Mar 2020 and so on. It is always counting one day more ... so that I have to fix it.

I want that the system send the invoices always on the first or 15th day of a month and not moving it around. :-)

How is this possible? Thank you!

hillelcoren commented 4 years ago

I believe this may be a different problem, in the initial post the user wrote "I had problems with my cronjob last month and thus it wasn't created until 2020-02-03".

alpipego commented 4 years ago

I believe this may be a different problem

You're right in what's causing the issue is different, but the issue is the same.

If the date of the recurring invoices were to be deducted from the start_date, it would solve my problem as well as @maikst!

maikst commented 4 years ago

Yes, that would solve both problems. Pleeeeaaaaase :+1: :-)

SemoTech commented 4 years ago

I assume nothing changed here yet, and we still do not have control over the recurring invoice dates?

turbo124 commented 4 years ago

@SemoTech the functionality won't change for this version of Invoice Ninja, we can look at this again in V2 of our app.

SemoTech commented 4 years ago

Then there is hope, thanks @turbo124!