← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 560150] Re: [account_voucher] Creating move_lines related to the amount for opening balance change all values for existing lines.

 

improved in trunk.

** Changed in: openobject-addons
       Status: New => Fix Released

-- 
[account_voucher] Creating move_lines related to the amount for opening balance change all values for existing lines.
https://bugs.launchpad.net/bugs/560150
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Fix Released

Bug description:
Some definitions:

Opening Balance[1]:
The amount of funds in an account at the beginning of a period, especially a month or year. For example, if one has a bank account with a balance of $1236 at the end of August, this becomes the opening balance for the beginning of September.

When we configure an account we have this options.
Deferral Method [2]: determines how to treat the account and its entries at the closing of the books at the end of the year. Four methods are available:
        * Balance : an entry is generated for the account balance and carried across to the new year (generally used for bank accounts),
        * None : no accounting entries are transferred across to the new financial year (generally for classes 6 and 7),
        * Detail : all entries are kept for the new fiscal year,
        * Unreconciled : only unreconciled entries are carried over to the new fiscal year (usually used for third-party accounts).

We have 2 cases for the opening balance.

1st.- A balance that depends of a list of entries (Like the unreconciled definition)
2nd.- A balance that depends of only one Entry (Like Balance definition)
[This second option works excellent for our point of view we will talk about the first one.]

With account_voucher installed you are able to put by hand the Opening balance, it generate an exception that was solved by us in the bug 559747 [3]:

IOH, this bug have a second part, when the opening balance for an account has _more_ than one entry (Unreconciled deferral method), and you put by hand the opening balance amount, the method put this value on _all_ entries in the opening move, we propose the correction with mathematical solution, this field in case of several opening entries _must_ be compared with the sum of all entries in a journal.type="Situation", IF the sum is different the system optionally should propose an entry with the difference and the record saved.

I.E:[currently] in a NEW account, with opening entries loaded in a move for a journal of type='situation' and no move_lines for other journals of type<>'situation'

Account       Description                    Debit        Credit
Acc111         opening entry 1             1000.00        0.00
Acc111         opening entry 2             2000.00        0.00
Acc111         opening entry 3             3000.00        0.00
Acc200        counter-opening            0.00              7000.00

Actual Opening Balance  7000.00 [Debit]
Current Reported Opening balance 0.00  [Debit]
Closing Balance 7000.00 [Debit]

When you explore on the details on account Acc111, [with account_voucher installed], the opening balance is zero.

Change It To 7000 (the correct value calculated by us.), and select "debit" an DR/CR field and save it:
Results:
Account       Description                    Debit        Credit
Acc111         opening entry 1             7000.00        0.00
Acc111         opening entry 2             7000.00        0.00
Acc111         opening entry 3             7000.00        0.00
Acc200        counter-opening            0.00              21000.00

Actual Opening Balance  21000.00 [Debit]
Current Reported Opening balance 7000.00  [Debit]
Closing Balance 21000.00 [Debit]

The balance has changed and the new value is wrong,


we propose a solution for handling this error without implying core modifications of the module account_voucher, while it is developed a new method for correcting this way of loading opening balance and writing the related moves

In a NEW account, with opening entries loaded in a move for a journal of type='situation' and no move_lines for other journals of type<>'situation'

Account       Description                    Debit        Credit
Acc111         opening entry 1             1000.00        0.00
Acc111         opening entry 2             2000.00        0.00
Acc111         opening entry 3             3000.00        0.00
Acc200        counter-opening            0.00              7000.00

Actual Opening Balance  7000.00 [Debit]
Current Reported Opening balance 0.00  [Debit]
Closing Balance 7000.00 [Debit]

When you explore on the details of the account, [with account_voucher installed], the opening balance is zero.
Change It To 7000 (the correct value calculated by us.) and save it:

The result is to save the field without make changes and give an exception """[4]""", that this amount shouldn't be posted by this way and that the current move_lines will be kept.

Account       Description                    Debit        Credit
Acc111         opening entry 1             1000.00        0.00
Acc111         opening entry 2             2000.00        0.00
Acc111         opening entry 3             3000.00        0.00
Acc200        counter-opening            0.00              7000.00

Actual Opening Balance  7000.00 [Debit]
Current Reported Opening balance 7000.00  [Debit]
Closing Balance 7000.00 [Debit]



We will build a module that makes the calculus to these entries and post the results on the field open_bal, because this module is an improve for this situation we propose for merge the "exception" control and we will build a module on stable-extra-addons to put a button that will make the calculus and update this value..

With this solution _all_ the actual problems with reports related to the opening balances can be solved consulting this values on accounts, because the solution [module+avoid mistakes] allow to you to trust in this value giving consistency to data. [We think in trunk 6.0 shouldn't exist an extra module this calculus must be made directly on account or account_voucher, even, we don't know why account_voucher has this field if is a basic field related to account]

I will link this bug on accounting-expert-list to read different points of view, but for information we are using this changes on our production environments, we want to know if the solution is enough generic to everybody.

Thanks in advance for all your opinions.

[1]http://financial-dictionary.thefreedictionary.com/opening+balance
[2]http://doc.openerp.com/book/3/3_9/chart_of_accounts.html
[3]https://bugs.launchpad.net/openobject-addons/+bug/559747
[4]"""You cannot load or change by this method the opening balance amount for an account with more than ONE opening move lines. Please try editing the opening move."""