Issue 10292

Title
Type amount ignores inactive accounts
Priority
bug
Status
testing
Nosy list
ced, pokoli, reviewbot
Assigned to
pokoli
Keywords
review

Created on 2021-04-15.13:45:44 by pokoli, last changed 3 days ago by reviewbot.

Messages

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-25.09:41:49

I uploaded the review which includes the check on closed fiscalyear and also includes the inactive accounts (and not taxes) from open fiscalyears.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-16.01:28:05
On 2021-04-15 16:55, Sergi Almacellas Abellana wrote:
> Which is the problem of including the accounts that have ended on the previous fiscalyears to properly compute the balance? 

They will be displayed when it should not for following fiscal year of
the closing (because the balance must always be 0).
Also the ActivePeriodMixin is also used for tax so we should neither
display old taxes.

> I see to much issues with this validations, for example it will prevent to update the chart of accounts if an end date is set on a template and the company still has not closed the related period and the user won't be able to fix it. 

Indeed it is complicated.
So maybe we can have simpler rule. We could include non-closed past
fiscal year if we have a check on closing fiscal year that the inactive
account are balanced.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-15.16:55:48

Which is the problem of including the accounts that have ended on the previous fiscalyears to properly compute the balance?
I see to much issues with this validations, for example it will prevent to update the chart of accounts if an end date is set on a template and the company still has not closed the related period and the user won't be able to fix it.

Also it will be a problem to close a fiscalyear just to allow setting an end_date to an account because we may receive some invoice in the previous fiscalyear which we won't be able to post because the period will be closed.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-15.16:45:51

So the problem is actually to inactivate an unbalanced account. It is difficult to enforce that on an opened period/fiscal year because at any time the user can create a line in the past.
So I guess the proper way is to allow to set a end date only if the date is in a closed period and if the account balance is zero. But also reopening a period should warn that it will remove the end date of accounts that was ended during this period.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-04-15.13:45:44

Here are the steps to reproduce the issue using just account module:

  1. Create a company and use the minimal account chart
  2. Create a fiscalyear for 2020 and another for 2021
  3. Create a move on 31/12/2020 with "Main Cash" Account with 100€ in debit and "Main Revenue" as counterpart.
  4. Set end date on "Main Cash" to 31/12/2020
  5. Open the Balance sheet with date 01/01/2020.

Current behaviour:

  • The "Asset\Current\Type" has an amount of 0€

Expected behaviour:

  • The same type has the amount of 100€ cumulated from previous fiscalyear.

Note that the value of the type is correct until 31/12/2020 but it's incorrect after the end date of the account.

History
Date User Action Args
2021-06-17 08:57:29reviewbotsetmessages: + msg68303
2021-06-14 11:26:15reviewbotsetmessages: + msg68241
2021-04-25 11:45:37reviewbotsetmessages: + msg66938
2021-04-25 09:49:15reviewbotsetmessages: + msg66928
2021-04-25 09:41:49pokolisetmessages: + msg66927
2021-04-25 09:19:40reviewbotsetmessages: + msg66926
nosy: + reviewbot
2021-04-16 01:28:05cedsetmessages: + msg66654
2021-04-15 16:55:48pokolisetmessages: + msg66633
2021-04-15 16:50:56pokolisettitle: Type amount ignores inactive amounts -> Type amount ignores inactive accounts
2021-04-15 16:45:51cedsetmessages: + msg66632
nosy: + ced

Showing 10 items. Show all history (warning: this could be VERY long)