Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0010836 | Openbravo ERP | 09. Financial management | public | 2009-09-30 20:29 | 2010-05-18 21:44 |
|
Reporter | psarobe | |
Assigned To | sivaraman | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 2.50MP6 | |
Target Version | 2.50MP17 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0010836: Oracle: Payment due date isnot calculated correctly |
Description | This is the scenario:
Payment term: 90 days
Invoice date: 30/09/2009
Process the purchase invoice
The due date for the payment should be 30/12/2009 but the ERP calculates 31/12/2009
Only happens in Oracle |
Steps To Reproduce | Pre-requisites: Have a payment term of 90 days (3 month)
1. Create a purchase invoice
2. Select a payment term 3 months
3. Invoice date= 30/09/2009
4. Complete the invoice
The payment due date will be 31/12/2009 and it's wrong |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2009-09-30 20:29 | psarobe | New Issue | |
2009-09-30 20:29 | psarobe | Assigned To | => rafaroda |
2009-09-30 20:29 | psarobe | OBNetwork customer | => No |
2009-09-30 20:29 | psarobe | Status | new => scheduled |
2009-09-30 20:29 | psarobe | fix_in_branch | => pi |
2010-02-11 18:13 | rafaroda | Assigned To | rafaroda => adrianromero |
2010-05-01 20:07 | psarobe | Target Version | 2.50MP7 => 2.50MP16 |
2010-05-01 20:07 | psarobe | fix_in_branch | pi => |
2010-05-04 18:28 | adrianromero | Note Added: 0026941 | |
2010-05-11 18:19 | jpabloae | Target Version | 2.50MP16 => 2.50MP17 |
2010-05-14 07:04 | sivaraman | Assigned To | adrianromero => sivaraman |
2010-05-14 08:37 | hgbot | Checkin | |
2010-05-14 08:37 | hgbot | Note Added: 0027218 | |
2010-05-14 08:37 | hgbot | Status | scheduled => resolved |
2010-05-14 08:37 | hgbot | Resolution | open => fixed |
2010-05-14 08:37 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/7f8f01670ddd57603ad4b0c2a583d1982603f18d [^] |
2010-05-14 08:38 | sivaraman | Note Added: 0027219 | |
2010-05-15 16:37 | sureshbabu | Note Added: 0027329 | |
2010-05-15 16:37 | sureshbabu | Status | resolved => closed |
2010-05-16 00:00 | anonymous | sf_bug_id | 0 => 3002195 |
2010-05-18 21:44 | hudsonbot | Checkin | |
2010-05-18 21:44 | hudsonbot | Note Added: 0027524 | |
Notes |
|
|
Probably the error is in the PL/SQL function that calculates payment dates:
c_paymentduedate() |
|
|
(0027218)
|
hgbot
|
2010-05-14 08:37
|
|
Repository: erp/devel/pi
Changeset: 7f8f01670ddd57603ad4b0c2a583d1982603f18d
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Fri May 14 12:06:44 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7f8f01670ddd57603ad4b0c2a583d1982603f18d [^]
Fixes issue 10836: Oracle: Payment due date isnot calculated correctly.
As per ADD_MONTHS function in oracle, If date is the last day of the month or if the resulting month has fewer days than the day component of date, then the result is the last day of the resulting month. To overcome this in our case, C_ADD_MONTHS2 has been used instead of ADD_MONTHS.
---
M src-db/database/model/functions/C_PAYMENTDUEDATE.xml
---
|
|
|
|
Steps to test:
1. Log on to Openbravo with 'Openbravo Admin' role
2. Go to Master Data Management || Business Partner Setup || Payment Term
3. Create new record with the following details
Search Key : 3-months
Name : 3 Months
Offset Month Due : 3
4. Save & Go to Procurement Management || Transactions || Purchase Invoice || Header
5. Create new record with the following details
Invoice Date : 30-09-2009
Business Partner : McGiver Supplies
Payment Term : 3 Months
6. Save and Go to Procurement Management || Transactions || Purchase Invoice || Header >> Lines
7. Create new line for 'Hat' product
8. Save and come back to Procurement Management || Transactions || Purchase Invoice || Header
9. Click and execute 'Complete'
10. Go to Procurement Management || Transactions || Purchase Invoice || Header >> Payment
11. Verify Due Date field |
|
|
|
Verified now payment due date rightly assigned as 30/09/2009 |
|
|
|
|