Openbravo Issue Tracking System - Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0026427 | Modules | Service Contract Management | public | 2014-04-30 05:56 | 2015-01-12 17:58 |
|
Reporter | sjkumar | |
Assigned To | vmromanos | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Review Assigned To | naiaramartinez |
Support ticket | |
OBNetwork customer | |
Regression introduced in release | |
|
Summary | 0026427: Service Contract showing incorrect currency and storing incorrect currency in the table |
Description | Incorrect currency is displayed on the screen and stored in the table c_project |
Steps To Reproduce | 1. Make sure multiple currencies are enabled in the system.
3. Create products
2. Define a price list with USD currency and include some product in the price list version. (e.g. Price list name = SUBSCRIPTION CURRENT COMMERCIAL)
3. Create a service contract header (lets call this a subscription header) using the price list as in step2.
4. Now save the header record. You will notice that it showing currency different than what is on the price list.
5. Refresh the subscription header by clicking on the refresh button in the green toolbar. You will notice that currency is refreshed to USD.
6. Now check the data in the database (we are using Oracle), currency is still the same as what was initially shown on the screen. Below is the query to check this
select c_project_id, b.c_currency_id, b.ISO_CODE
from tad.c_project a,tad.c_currency b
where a.value= <input_value> and a.c_currency_id=b.c_currency_id
;
Screenshot is attached for your reference.
We are expecting that screen will show the currency correctly the first time as well as store the currency in table correctly. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0028572 | | closed | vmromanos | Service Contract showing incorrect currency and storing incorrect currency in the table |
|
Attached Files | Incorrect Currency is show and stored in the subscription header.doc (186,368) 2014-04-30 05:56 https://issues.openbravo.com/file_download.php?file_id=6892&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2014-04-30 05:56 | sjkumar | New Issue | |
2014-04-30 05:56 | sjkumar | Assigned To | => vmromanos |
2014-04-30 05:56 | sjkumar | File Added: Incorrect Currency is show and stored in the subscription header.doc | |
2014-04-30 09:51 | vmromanos | Status | new => scheduled |
2014-04-30 09:51 | vmromanos | fix_in_branch | => pi |
2014-04-30 11:11 | vmromanos | Note Added: 0066703 | |
2014-04-30 13:43 | hgbot | Checkin | |
2014-04-30 13:43 | hgbot | Note Added: 0066708 | |
2014-04-30 13:43 | hgbot | Status | scheduled => resolved |
2014-04-30 13:43 | hgbot | Resolution | open => fixed |
2014-04-30 13:43 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/949e3246768548ee67518c1f50b6245d14a03247 [^] |
2014-05-20 11:06 | naiaramartinez | Review Assigned To | => naiaramartinez |
2014-05-20 11:06 | naiaramartinez | Note Added: 0067295 | |
2014-05-20 11:06 | naiaramartinez | Status | resolved => closed |
2015-01-12 17:58 | VictorVillar | Issue cloned | 0028572 |
2015-01-12 18:01 | VictorVillar | Relationship added | related to 0028572 |
Notes |
|
|
Hi Sanjay,
In this bug there are several aspects to take into account:
1. The column C_Project.C_Currency_ID belongs to Core and it's used only by the Project functionality in Openbravo.
2. Contract module doesn't use this core's column. That's why the contract module doesn't display the Currency field (if you take a look at the Application Dictionary you will see that this field is set as Displayed=N)
3. In your SPM module you have defined a property field called Currency that points to the priceList currency (priceList.currency). This field is displayed into the status bar.
Here is the explanation of the behaviour you are reporting:
1. When you query the database you see the core's C_Currency_ID column. Remember that we don't use this column in Contracts/Subscription
2. Your SPM Currency property field, which is the one displayed at the status bar, shows the pricelist currency only after saving the record. This currency can be the same or not as the C_Project.C_Currency_ID
3. When you refresh the record, the property field is calculated, and the right currency is shown
Once said that, I do think that having this unused C_Project.C_Currency_ID may create some issues and misunderstandings; in fact we detected a bug in the billing engine because it was using this column.
Besides, I think it makes sense to display the contract/subscription currency in that window, but instead of using a property field, in this particular case only we should be using the C_Project.C_Currency_ID column to avoid issues and misunderstandings.
So the way to fix the issues is split in two parts:
1. Openbravo will show the Currency field from the C_Project.C_Currency_ID column, and we will make sure that the field is properly populated depending on the selected Price List (through a callout)
2. SPM team will remove the Currency property field into the SPM module. I will provide the patch that removes it (I can't push it myself because I don't have VPN access yet) |
|
|
(0066708)
|
hgbot
|
2014-04-30 13:43
|
|
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 949e3246768548ee67518c1f50b6245d14a03247
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 30 13:43:28 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/949e3246768548ee67518c1f50b6245d14a03247 [^]
Fixed issue 26427: Populate C_Project.C_Currency_ID from Price List callout and show Currency field
The C_Project.C_Currency_ID is not used by the Contract module (it belongs to core's Project functionality). However, to avoid problems and misunderstandings, from now on we populate this value from the Price List and we display the Currency field just after the Price List (as read only)
The Currency field has been moved from Contract Management Infrastructure where it was set as Displayed = N. Due to this change, the Service Contract Management module must depend on Contract Management Infrastructure 1.1.3 (or higher)
SE_PriceListChange minor refactor included
---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
M src/org/openbravo/contract/services/callout/SE_PriceListChange.java
---
|
|
|
|
|