Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015787Openbravo ERP07. Sales managementpublic2011-01-27 10:412011-03-22 10:57
maite 
adrianromero 
urgentmajoralways
closedfixed 
5
2.50MP25 
2.50MP272.50MP28 
Core
No
0015787: It is not possible to void an invoice with conversion rate
It is not possible to void an invoice with conversion rate. You obtain error DATA_EXCEPTION (which also need to be fixed to show proper error). Problem is when filtering dates to find conversion rate
1. General Setup || Application || Conversion Rates || Conversion Rate: define conversion rates from EUR to MXN and from MXN to EUR, from date 27/01/2011 to date 27/01/2011 and any rate.
2. Master Data Management || Pricing || Price List || Price List : create sales price list for MXN. Valid from 01/01/2011 and add price for Shirts
3. Sales Management || Transactions || Sales Invoice || Header : create record for Main organization, business partner mcgiver, pricelist MXN
4. Sales Management || Transactions || Sales Invoice || Header >> Lines : add line for one Shirt
5. Come back to header and complete
6. Try to Void the invoice and you will obtain
Error:
DATA_EXCEPTION

Problem is located in function C_Currency_Rate, when creating CUR_Rate. Problem is that ValidFrom and ValidTo have value '2011-01-27 00:00:00' but v_ConvDate is '2011-01-27 10:15:23'. Only should filter bu date and no by hour and minute
No tags attached.
depends on defect 0016045 closed adrianromero It is not possible to void an invoice with conversion rate 
Issue History
2011-01-27 10:41maiteNew Issue
2011-01-27 10:41maiteAssigned To => adrianromero
2011-01-27 10:41maiteModules => Core
2011-02-24 16:14adrianromeroStatusnew => scheduled
2011-02-24 16:14adrianromerofix_in_branch => pi
2011-02-24 16:14adrianromeroTypedefect => backport
2011-02-24 16:14adrianromerofix_in_branchpi =>
2011-02-24 16:14adrianromeroIssue cloned0016045
2011-02-24 16:14adrianromeroRelationship addeddepends on 0016045
2011-03-04 11:23hgbotCheckin
2011-03-04 11:23hgbotNote Added: 0034548
2011-03-04 11:23hgbotStatusscheduled => resolved
2011-03-04 11:23hgbotResolutionopen => fixed
2011-03-04 11:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/39c1bc9d96c0024bdea995ce71a5b0acae55af9f [^]
2011-03-09 13:38adrianromeroNote Added: 0034691
2011-03-22 10:57maiteNote Added: 0035130
2011-03-22 10:57maiteStatusresolved => closed
2011-03-22 10:57maiteFixed in Version => 2.50MP28

Notes
(0034548)
hgbot   
2011-03-04 11:23   
Repository: erp/stable/2.50
Changeset: 39c1bc9d96c0024bdea995ce71a5b0acae55af9f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Mar 02 11:36:31 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/39c1bc9d96c0024bdea995ce71a5b0acae55af9f [^]

Fixes issue 0015787: It is not possible to void an invoice with conversion rate
It has been applied the function TRUNC to remove the hours and minutes to the conversion date and also it has been removed the raise exception instruction that hid the error conversion message

---
M src-db/database/model/functions/C_CURRENCY_RATE.xml
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0034691)
adrianromero   
2011-03-09 13:38   
* Testing the issue

Follow the steps to test and verify that now the invoice can be voided because it takes properly the void date without the hours, minutes and seconds.

Verify also that if does not really exist a valid change rate in the date when the invoice is voided it does not appear the error DATA_EXCEPTION but also the message explaining that there not exists a conversion hour for the specified date.

* Other areas affected

All areas that performs currency changes may be affected because now the date used is used without hours, minutes and seconds.

It also may affect other errors when processing an invoice that instead of displaying an DATA_EXCEPTION error, will display the cause error.
(0035130)
maite   
2011-03-22 10:57   
Verified.
DATA_EXCEPTION message is note received any more. If you have not conversion rate defined for today's date (as you should because new invoice is going to be created) proper message is raised. If you define requested rate invoice is voided properly.