Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010850Openbravo ERP09. Financial managementpublic2009-10-03 12:222009-11-20 00:00
psarobe 
vmromanos 
highminoralways
closedfixed 
5
pi 
2.50MP92.50MP9 
Core
No
0010850: Message after reseting the accounting is not clear nor useful so mislead the user
When you reset the accounting using the process "Reset accounting process" there is a message after the process is finished. This message tells you two things (See attach):

As an example:

Updated:163
Deleted:506

Supposing that "Updated" means the number of documents (that I guess yes) that has been updated (Posted "Y"-->"N") the messages should be:
Number of documents unposting: 163

Regarding on "Deleted" message:
Each document has its own book entry/journal entry so if we have 163 documents we will have 163 book entries
Right now what is being counting is the number of lines deleted from the fact_acct table, which is the sum of all the total lines that a book entry has. For example let's write a book entry for a sales invoice:
Customer---->1127
Goods sales->1000
Taxes------->127
So we have one document then one book entry but three lines and that's what is addend

So for having a consistent message the "Deleted" one should take into account the journal entries but not the lines. To do so you have to group by the column fact_acct_group_id that is in the table Fact_acct

So finally you would have:

Number of documents unposting:163
Number of book entries deleted:163
1. Login
2. Go to Financial management->Accounting->Transactions->Reset accounting
See the description
No tags attached.
png reset_accounting.PNG (37,400) 2009-10-03 12:22
https://issues.openbravo.com/file_download.php?file_id=1808&type=bug
png
Issue History
2009-10-03 12:22psarobeNew Issue
2009-10-03 12:22psarobeAssigned To => vmromanos
2009-10-03 12:22psarobeFile Added: reset_accounting.PNG
2009-10-03 12:23psarobeStatusnew => scheduled
2009-10-03 12:23psarobefix_in_branch => pi
2009-11-16 17:09vmromanosNote Added: 0021874
2009-11-16 17:09vmromanosAssigned Tovmromanos => psarobe
2009-11-16 17:09vmromanosStatusscheduled => feedback
2009-11-17 11:13psarobeNote Added: 0021911
2009-11-17 11:13psarobeAssigned Topsarobe => vmromanos
2009-11-17 11:13psarobeStatusfeedback => scheduled
2009-11-17 11:13psarobefix_in_branchpi =>
2009-11-17 11:53vmromanosNote Added: 0021914
2009-11-17 19:21dalsasuaNote Added: 0021932
2009-11-17 19:44psarobeNote Added: 0021933
2009-11-18 19:25hgbotCheckin
2009-11-18 19:25hgbotNote Added: 0021991
2009-11-18 19:25hgbotStatusscheduled => resolved
2009-11-18 19:25hgbotResolutionopen => fixed
2009-11-18 19:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/19efa195fcc6dfef19b770229e016eed87d3a6f7 [^]
2009-11-19 06:54sureshbabuNote Added: 0022003
2009-11-19 06:54sureshbabuStatusresolved => closed
2009-11-19 06:54sureshbabuFixed in Version => 2.50MP9
2009-11-20 00:00anonymoussf_bug_id0 => 2900811

Notes
(0021874)
vmromanos   
2009-11-16 17:09   
Pablo,

I think it makes sense to keep the displayed numbers as they are right now. I agree with you that the labels are not very clear, and I propose you to change:
Updated:163
Deleted:506

by:
Number of unposted documents: 163
Number of deleted accounting lines: 506

From my point of view, it's very important to keep track of the deleted lines in the Fact_Acct table, and not hiding this number to the user.

(0021911)
psarobe   
2009-11-17 11:13   
Victor,

I have talked with several end users and they agree with my approach. But we should also take into consideration another thing, which is that you can either have marked the flag "Delete existing Accounting Entries" or not marked.

Solution based on the scenarios:
1. Scenario "Delete existing Accounting Entries" marked
Number of unposted documents: 163 (Número de documentos descontablicados)
Number of deleted book entries : 163 (Número de asientos borrados)

2. Scenario "Delete existing Accounting Entries" not marked
Number of updated documents: 23 (Número de documentos actualizados)
(0021914)
vmromanos   
2009-11-17 11:53   
Thanks Pablo. It's clear
(0021932)
dalsasua   
2009-11-17 19:21   
One thing that we haven't considered is that: unposted documents are, not only documents that changes from Y to N the IsPosted value, but also those in statuses such us period closed, error, etc.
Because of this, it's not true that when activating the "Delete existing Accounting Entries" flag, number of entries deleted and number of documents set to not posted should be the same.

To fix this bug, will group by the fact_acct_group_id value, so not line numbers will be displayed, but number of entries.
(0021933)
psarobe   
2009-11-17 19:44   
Hi David,

I think you are not right. When the flag is marked only deletes accounting entries so update the documents from Posted=Y to N. You can test it by yourself.
When you have a document with posted=e (error) and then you delete the accounting marking the flag "Delete existing Accounting Entries" that documents remains as posted=e

Only when "Delete existing Accounting Entries" is not marked the updating action is triggered
(0021991)
hgbot   
2009-11-18 19:25   
Repository: erp/devel/pi
Changeset: 19efa195fcc6dfef19b770229e016eed87d3a6f7
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Wed Nov 18 19:24:59 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/19efa195fcc6dfef19b770229e016eed87d3a6f7 [^]

Fixes issue 10850: New message and
new way to calculate numbers

---
M src-db/database/model/functions/FACT_ACCT_RESET.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0022003)
sureshbabu   
2009-11-19 06:54   
Tested success message appears as below
"Process completed successfully
Number of unposted documents = X, Number of deleted journal entries = Y"