Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016045Openbravo ERP07. Sales managementpublic2011-02-24 16:142011-03-23 00:00
adrianromero 
adrianromero 
urgentmajoralways
closedfixed 
5
pi 
3.0RC5 
Core
No
0016045: 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.
blocks backport 00157872.50MP27 closed adrianromero It is not possible to void an invoice with conversion rate 
Issue History
2011-02-24 16:14adrianromeroNew Issue
2011-02-24 16:14adrianromeroAssigned To => adrianromero
2011-02-24 16:14adrianromeroModules => Core
2011-02-24 16:14adrianromeroIssue generated from0015787
2011-02-24 16:14adrianromeroRelationship addedblocks 0015787
2011-02-24 16:15adrianromeroStatusnew => scheduled
2011-02-24 16:15adrianromerofix_in_branch => pi
2011-03-02 11:43hgbotCheckin
2011-03-02 11:43hgbotNote Added: 0034488
2011-03-02 11:43hgbotStatusscheduled => resolved
2011-03-02 11:43hgbotResolutionopen => fixed
2011-03-02 11:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e9b0a01aa6690f34f761c073ada9309e9a6bc167 [^]
2011-03-02 11:51adrianromeroNote Added: 0034495
2011-03-02 11:51adrianromeroNote Edited: 0034495bug_revision_view_page.php?bugnote_id=0034495#r1546
2011-03-22 11:05maiteNote Added: 0035131
2011-03-22 11:05maiteStatusresolved => closed
2011-03-22 11:05maiteFixed in Version => 3.0RC5
2011-03-23 00:00anonymoussf_bug_id0 => 3235751

Notes
(0034488)
hgbot   
2011-03-02 11:43   
Repository: erp/devel/pi
Changeset: e9b0a01aa6690f34f761c073ada9309e9a6bc167
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Mar 02 11:40:14 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e9b0a01aa6690f34f761c073ada9309e9a6bc167 [^]

Fixes issue 0016045: 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
---
(0034495)
adrianromero   
2011-03-02 11:51   
* 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.

(0035131)
maite   
2011-03-22 11:05   
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.