Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0013984 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Modules] Accruals and Deferrals | minor | always | 2010-07-16 16:19 | 2010-09-10 19:08 | |||
Reporter | networkb | View Status | public | |||||
Assigned To | vmromanos | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 1.0.10 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 9a85f7e12ab0 | ||||
Projection | none | ETA | none | Target Version | 2.50 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 2.50 | SCM revision | ||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Review Assigned To | ||||||||
Regression introduced in release | ||||||||
Summary | 0013984: Wrong amounts when generating accruals and deferrals plan using Daily calculation and starting at the middle of the month | |||||||
Description | Wrong amounts when generating accruals and deferrals plan using Daily calculation and starting at the middle of the month. | |||||||
Steps To Reproduce | 1. Install Accruals and Deferrals module, version 1.0.5 2. Go to General Setup || Client || Client || Client >> Information : set calculation=dalily 3. Procurement Management || Transactions || Purchase Invoice: create header for BP=mcgiver document=AP Invoice Invoice Date =Accounting Date =Tax Date=15/07/2010 Acc Def Type = Prepaid expenses Date from=15/07/2010 Date To = 14/07/2011 4. Procurement Management || Transactions || Purchase Invoice || Header >> Lines: create record for Hat and Total Line Amount=1200 (Psanjuan= it is required to add here that Tax Rate must be exempt so the system only takes into account an amount = 1.200) 5. Go back to header and complete 6. Go to Procurement Management || Transactions || Purchase Invoice || Header >> Accruals and Deferrals Plan and realize that the amount of the first and the last month are the same as the rest of months. | |||||||
Proposed Solution | In the current version, there is an error, because the first and the last month are calculated with all days, e.g. date from = 15.7. => 31 days for July and this is false if it is calculated on a daily basis, the exact number of days in a month should be calculated: June = 30, July = 31 etc and take that into account as well for the Date From and Date To In the scenario above it should be: 15 for the firt period 14 for the last one Proposed Solution dated on August 31st: For daily calculation this is the way it should work. (1) There are no constrains in relation to Periods. End-use can enter whatever "Date From" and whatever "Date To" no restrictions but the proper ones for Acc&Def functionality. Period range should be at least 1 year. (2) For each month count we need to take into account the number of calendar days each month has (31,30,28..) (3) Monthly amount formula is = Line Net Amount * Number of days in the month/Total number of days between the two dates (Date From and Date To) Example: Accounting date = 12-06-2010 Date From = 12-06-2010 Date To = 20-05-2011 Line Net Amount = 8000,00 Total number of days= 343 June 2010 = 30-12+1 = 19 July 2010 = 31 August 2010 = 31 September 2010 = 30 October 2010 = 31 November 2010 = 30 December 2010 = 31 January 2011 = 31 February 2011 = 28 March 2011 = 31 April 2011 = 30 May 2011 = 20 Monthly amount: June 2010 = 8000*19/343=443.15 July 2010 = 8000*31/343=723,03 August 2010 = 8000*31/343=723,03 September 2010 = 8000*30/343=699,71 October 2010 = 8000*31/343=723,03 November 2010 = 8000*30/343=699,71 December 2010 = 8000*31/343=723,03 January 2011 = 8000*31/343=723,03 February 2011 = 8000*28/343=653.06 March 2011 = 8000*31/343=723,03 April 2011 = 8000*30/343=699,71 May 2011 = 8000*20/343=466,47 total=8000 | |||||||
Tags | No tags attached. | |||||||
Attached Files | 13984.png [^] (69,718 bytes) 2010-08-31 13:17
13984_1.png [^] (40,082 bytes) 2010-08-31 13:17 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0029760) hgbot (developer) 2010-08-03 08:13 |
Repository: erp/pmods/org.openbravo.accrualsanddeferrals Changeset: c4dbe79b947e1c7dc595e14599ebdbae2fdfc0c6 Author: Sathiyan Sivaprakasam <sathiyan.sivaprakasam <at> openbravo.com> Date: Tue Aug 03 11:42:21 2010 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/c4dbe79b947e1c7dc595e14599ebdbae2fdfc0c6 [^] Fixes Issue 13984: Wrong amounts when generating acc. and def. plan using Daily calculation --- M src-db/database/model/functions/ACCDEF_GENERATE_PLAN.xml --- |
(0030539) psanjuan (manager) 2010-08-31 13:06 |
In case of rounding issues please ask as we need to decide those will be added to the first or the last month. See screen attached in order to see current wrong behaviour. |
(0030879) vmromanos (manager) 2010-09-09 09:13 |
Hi Patricia, There are two wrong things in the proposed solution: February 2011 = 8000*28/343= 653.06 May 2011 = it's the last month so we must compensate the deviation due to the rounding in the previous months. So the amount should be 466.48. This way the sum of the months is equal to the grand total. Regards. |
(0030881) psanjuan (manager) 2010-09-09 09:21 |
That's right Victor. February amount was not OK, I realize about that. Now it is fixed. Regarding rounding - that's right as well. I already mentioned that in a note. Let's add rounding differences to the last month. I'll get confirmation from our customer. |
(0030882) psanjuan (manager) 2010-09-09 09:24 |
Confirmed - rounding differences should be allocated to the last month. Thanks. |
(0030885) hgbot (developer) 2010-09-09 10:06 |
Repository: erp/pmods/org.openbravo.accrualsanddeferrals Changeset: 9a85f7e12ab00d68d0b5fb9ac97d1fea5e1f0380 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Thu Sep 09 10:08:05 2010 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/9a85f7e12ab00d68d0b5fb9ac97d1fea5e1f0380 [^] Fixed bug 13984 in module version 1.0.10 Indent ACCDEF_GENERATE_PLAN code Refactor code to improve performance and quality Fixed Daily calculation method Fixed rounding issues --- M src-db/database/model/functions/ACCDEF_GENERATE_PLAN.xml M src-db/database/sourcedata/AD_MODULE.xml --- |
(0030949) psanjuan (manager) 2010-09-10 18:52 |
fixed in version 1.0.10 |
Issue History | |||
Date Modified | Username | Field | Change |
2010-07-16 16:19 | networkb | New Issue | |
2010-07-16 16:19 | networkb | Assigned To | => sathiyan |
2010-07-16 17:08 | rafaroda | Issue Monitored: rafaroda | |
2010-07-16 17:14 | psanjuan | Proposed Solution updated | |
2010-08-03 08:13 | hgbot | Checkin | |
2010-08-03 08:13 | hgbot | Note Added: 0029760 | |
2010-08-03 08:13 | hgbot | Status | new => resolved |
2010-08-03 08:13 | hgbot | Resolution | open => fixed |
2010-08-03 08:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/c4dbe79b947e1c7dc595e14599ebdbae2fdfc0c6 [^] |
2010-08-27 10:07 | psanjuan | Steps to Reproduce Updated | View Revisions |
2010-08-31 12:31 | psanjuan | Status | resolved => new |
2010-08-31 12:31 | psanjuan | Description Updated | View Revisions |
2010-08-31 12:31 | psanjuan | Steps to Reproduce Updated | View Revisions |
2010-08-31 12:31 | psanjuan | Proposed Solution updated | |
2010-08-31 12:43 | psanjuan | Proposed Solution updated | |
2010-08-31 12:58 | psanjuan | Proposed Solution updated | |
2010-08-31 13:05 | psanjuan | Proposed Solution updated | |
2010-08-31 13:06 | psanjuan | Note Added: 0030539 | |
2010-08-31 13:17 | psanjuan | File Added: 13984.png | |
2010-08-31 13:17 | psanjuan | File Added: 13984_1.png | |
2010-08-31 13:18 | psanjuan | Assigned To | sathiyan => dalsasua |
2010-08-31 13:29 | psanjuan | Proposed Solution updated | |
2010-09-08 13:51 | psanjuan | Proposed Solution updated | |
2010-09-08 13:55 | psanjuan | Proposed Solution updated | |
2010-09-09 09:13 | vmromanos | Note Added: 0030879 | |
2010-09-09 09:13 | vmromanos | Assigned To | dalsasua => vmromanos |
2010-09-09 09:13 | vmromanos | Status | new => scheduled |
2010-09-09 09:13 | vmromanos | fix_in_branch | => pi |
2010-09-09 09:21 | psanjuan | Note Added: 0030881 | |
2010-09-09 09:21 | psanjuan | fix_in_branch | pi => |
2010-09-09 09:21 | psanjuan | Proposed Solution updated | |
2010-09-09 09:24 | psanjuan | Note Added: 0030882 | |
2010-09-09 10:06 | hgbot | Checkin | |
2010-09-09 10:06 | hgbot | Note Added: 0030885 | |
2010-09-09 10:06 | hgbot | Status | scheduled => resolved |
2010-09-09 10:06 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/c4dbe79b947e1c7dc595e14599ebdbae2fdfc0c6 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/9a85f7e12ab00d68d0b5fb9ac97d1fea5e1f0380 [^] |
2010-09-10 18:52 | psanjuan | Note Added: 0030949 | |
2010-09-10 18:52 | psanjuan | Status | resolved => closed |
2010-09-10 19:08 | psanjuan | Fixed in Version | => 1.0.10 |
Copyright © 2000 - 2009 MantisBT Group |