Topic: Fiscal year deletion not possible

When trying to help on thread 1432, I noticed that for mudassir and I, it was not possible to delete a newly created fiscal year.

We have the message: "Cannot delete this fiscal year because thera are fiscal years before."

In my case, just to check, I just created a new fiscal year, and immediately tried to delete it, but got the upper message.

This message is triggered by the following piece of code:

function check_can_delete($selected_id)
{
    $myrow = get_fiscalyear($selected_id);
    // PREVENT DELETES IF DEPENDENT RECORDS IN gl_trans
    if (check_years_before(sql2date($myrow['begin']), true))
    {
        display_error(_("Cannot delete this fiscal year because thera are fiscal years before."));
        return false;
    }

Why is it impossible to delete a just created fiscal year ?

Thanks

Gaston