Topic: Vers2.1.2 Bug: possibility to create an invoice in closed Fiscal year

In our company we are still using version 2.1.2 and will soon upgrade to 2.2

We have found out that it is possible to create a new recurrent invoice.

This was done on 4 januari 2010, and it was booked in the year 2009.

We found out when checking the paper, and we rebooked the invoice as null
But what if people don't check.
And they find out after booking 100 recurrent invoices or more?

I don't know if it is possible on other ways to.
Normally you get a neat "error message" that you are trying to work out of the fiscal year...

But seems like sometimes this error is not forthcoming.

As I already mentioned, we are still using version 2.1.2 So maybe it has been fixed a time ago.
In that case, sorry for my report.

Re: Vers2.1.2 Bug: possibility to create an invoice in closed Fiscal year

You are right, Jackel7007. This bug has been there all the time.
It has been fixed in CVS Main and are going into release 2.2.3.

In the mean-time you can fix it in file /sales/create_recurrent_invoices.php.
After line 62

if (isset($_GET['recurrent']))
{

insert the following lines

    $date = Today();
    if (is_date_in_fiscalyear($date))
    {

And after the end about line 99, insert the following lines.

    }
    else
        display_error(_("The entered date is not in fiscal year."));

So the previous code is inside the { and }.

/Joe