Openbravo Issue Tracking System - Modules
View Issue Details
0026670ModulesService Contract Managementpublic2014-05-22 22:542014-07-28 13:07
sjkumar 
vmromanos 
highcriticalalways
closedfixed 
20Professional Appliance
 
 
naiaramartinez
0026670: Obx version:1.2.55 - computation for overage is not done as per the checkbox:Overage Policy
I applied the 1.2.55 version of service contract Management and notice the overage line is not getting calculated as per the checkbox"Overage Policy"
Test Case1:
1)Created a subscription
2)Added the parent product "Oracle Cloud IAAS Service - Purchased Amount" and exploded the basket
   exploded basket included below items:
        Oracle Cloud IaaS Storage Usage - GB PER MONTH
        Oracle Cloud IaaS CPU Usage - OCPU PER HOUR
        Oracle Cloud IaaS Data Transfer - GB PER MONTH
3)All the above products had : Bill Overage at Price List" selected against it in the product UI screen.
3)Now I created billing schedule and then added Usage :"Oracle Cloud IaaS CPU Usage - OCPU PER HOUR" .
4)Did compute usage .

Result : Since there was no overage, the computed lines picked the price from whatever was set up against that product in the Subscribed Services ->Product Tier level which looks all fine.

5)Now I changed the overage policy for the product "Oracle Cloud IaaS CPU Usage - OCPU PER HOUR" in product UI screen to "Bill Overage at Contract Price".
6)I created another usage line. when did compute usage , it created the computation line with Overage BUT the overage line got the price from the price list instead from the price defined for that product in 'Subscribed service->product Tier " level.

When I went back to Subscribed Service and looked at the Overage policy i see it shows up as " Bill Overage at Price List" where as I set it to
"Bill Overage at Contract Price" before adding this usage line.

Shouldn't this change which I did in product UI screen should also get reflected in the "subscribed service level" too? THis is also not working when I create a brand new subscription. Below is another test case2:

Test Case2:
1) created another brand new subscription .
2)Added the parent product and exploded the basket
   exploded basket included below items:
        Oracle Cloud IaaS Storage Usage - GB PER MONTH
        Oracle Cloud IaaS CPU Usage - OCPU PER HOUR
        Oracle Cloud IaaS Data Transfer - GB PER MONTH
3)I had kept the overage policy for Oracle Cloud IaaS CPU Usage - OCPU PER HOUR as "Bill Overage at Contract Price" from the test case1 .
4)When I had exploded the basket, "Oracle Cloud IaaS CPU Usage - OCPU PER HOUR" in subscribed services tab still showed as "Bill Overage at Price List" instead of "Bill Overage at Contract Price"
5)Since it is setup up as "Bill Overage at Price List" , when I did compute usage, it was n overage But it got the price picekd from the pricelist instead of the contract List.
No tags attached.
zip openbravo.zip (323,426) 2014-05-23 00:18
https://issues.openbravo.com/file_download.php?file_id=6943&type=bug
Issue History
2014-05-22 22:54sjkumarNew Issue
2014-05-22 22:54sjkumarAssigned To => vmromanos
2014-05-23 00:18sjkumarFile Added: openbravo.zip
2014-05-23 12:08vmromanosNote Added: 0067405
2014-05-23 12:08vmromanosStatusnew => feedback
2014-06-30 17:36hgbotCheckin
2014-06-30 17:36hgbotNote Added: 0068456
2014-06-30 17:36hgbotStatusfeedback => resolved
2014-06-30 17:36hgbotResolutionopen => fixed
2014-06-30 17:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/d0afa231f0721182f023b55d0b7b7120db58efb4 [^]
2014-07-28 13:07naiaramartinezReview Assigned To => naiaramartinez
2014-07-28 13:07naiaramartinezNote Added: 0068916
2014-07-28 13:07naiaramartinezStatusresolved => closed

Notes
(0067405)
vmromanos   
2014-05-23 12:08   
Test Case 1:
The overage policy used by the computation engine is the one defined at the Subscribed Services line (not at the product window). When you change the overage policy at the Product window, the change is NOT populated to the Subscribed Services lines where this product is configured. This is the expected behaviour, as we do in other parts of the system. Example: when you update the price of a product into the pricelist, the price for the already invoiced products won't never be changed.

Test Case 2:
The explode basket process sets the overage policy for the children equal to the overage policy defined at the parent's subscribed services line. In your example the subscribed services line associated to the "Oracle Cloud IAAS Service - Purchased Amount" product is set to Bill Overage at Price List, that's why the children have this overage policy too.

However I understand it could make sense too to define the overage policy for the children as it is defined at the Product window.
To support both behaviours we can add a parameter (a new checkbox) to the explode basket process popup to configure that behaviour.
What do you think?
(0068456)
hgbot   
2014-06-30 17:36   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: d0afa231f0721182f023b55d0b7b7120db58efb4
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Jun 10 10:31:52 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/d0afa231f0721182f023b55d0b7b7120db58efb4 [^]

Fixed bug 26670: Added Default Overage Policy From Parent checkbox in Explode Basket
Added M_Product.EM_OBSCNTR_OVERAGEPRICE column
Define check constraint to manage Overage Price in both M_PRODUCT and OBSCNTR_INVOICEPLAN_TEMPL

---
M src-db/database/model/modifiedTables/M_PRODUCT.xml
M src-db/database/model/tables/OBSCNTR_INVOICEPLAN_TEMPL.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_PROCESS_PARA.xml
M src/org/openbravo/contract/services/process/explodebasket/ExplodeBasket.java
M src/org/openbravo/contract/services/utilities/SCConstants.java
---
(0068916)
naiaramartinez   
2014-07-28 13:07   
Code review OK