Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0010836
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2009-09-30 20:292010-05-18 21:44
ReporterpsarobeView Statuspublic 
Assigned Tosivaraman 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7f8f01670ddd
ProjectionnoneETAnoneTarget Version2.50MP17
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product Version2.50MP6SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0010836: Oracle: Payment due date isnot calculated correctly

DescriptionThis 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 ReproducePre-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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0026941)
adrianromero (manager)
2010-05-04 18:28

Probably the error is in the PL/SQL function that calculates payment dates:
c_paymentduedate()
(0027218)
hgbot (developer)
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
---
(0027219)
sivaraman (reporter)
2010-05-14 08:38

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
(0027329)
sureshbabu (reporter)
2010-05-15 16:37

Verified now payment due date rightly assigned as 30/09/2009
(0027524)
hudsonbot (developer)
2010-05-18 21:44

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/7f8f01670ddd [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker