This chapter describes how to customize Oracle Communications Billing Care to display only event adjustments in the Bills section for performing adjustments.
By default, Billing Care display all the adjustment options, such as bill, item, and event, for performing adjustments. However, you can customize Billing Care to display only the list of event adjustment options and hide bill and item adjustment options by using the Billing Care SDK. This lets you perform only event adjustments for the selected account.
You can customize Billing Care using Oracle Entitlements Server (OES) to display only event adjustments for performing adjustments.
To customize Billing Care to display only event adjustments:
Create a custom ResourceType and Resource for event adjustments in the OES server. For example, AdjustmentResourceType, AdjustmentResource.
Define Make as the corresponding action for the custom ResourceType in the OES server.
Add the new ResourceType to the CustomConfigurations.xml file. For example:
<keyvals> <key>authorizationResourceTypes</key> <value>AdjustmentResourceType</value> <desc>Add comma separated OES Resource Types(values) for authorization. Also these resource types should be defined in OES. Please note that the key should not be changed here. </desc> </keyvals>
See "Editing the Billing Care Configuration File" for customization of configurations.xml.
Create custom view models containing overrides to hide bill and item adjustments. See "Creating Custom View Models to Display Only Event Adjustments" for more information.
Create a customRegistry.js file configuring Billing Care to use the custom view models that you created. See "Configuring Custom Bill and Bill Item View Models in the Registry" for more information.
Deploy your customizations using one of the methods described in "Using an Exploded Archive during Customization" or "Packaging and Deploying Customizations".
Billing Care uses view model to define the display of the Item Adjustment, Bill Adjustment, and Event Adjustment dialog boxes. You must create the custom view models, customBillItemChargesViewModel and customBillChargesViewModel, containing overrides to hide bill and item adjustments.
See "About View Models" for more information about Billing Care view models.
To create custom view models to display only event adjustments:
Create the customBillItemChargesViewModel.js and customBillChargesViewModel.js files in the myproject/web/custom/js/viewmodels directory, where myproject is the folder containing your NetBeans IDE project.
Add the following code in the customBillItemChargesViewModel.js file using a text editor:
define(['jquery', 'knockout', 'viewmodels/billMainPanel/BillItemChargesViewModel' ], function($, ko, BillItemChargesViewModel) { function CustomBillItemChargesViewModel() { BillItemChargesViewModel.apply(this, arguments); self = this; self.showARActionMenu = function(data, event) { self.__proto__.showARActionMenu(data,event); // write custom action name and resource. Item adjustment can be hide by not granting make permission to customResource. if (!util.isGrantedResourceAction("make", "customResource")){ $("#billItemFlyoverNewAdjustment").hide(); } }; } CustomBillItemChargesViewModel.prototype = new BillItemChargesViewModel(); return CustomBillItemChargesViewModel; });
Save the file in your NetBeans IDE project.
Add the following code in the customBillChargesViewModel.js file using a text editor:
define(['jquery', 'knockout', 'viewmodels/billtab/BillChargesViewModel' ], function($, ko, BillChargesViewModel) { function customBillChargesViewModel() { BillChargesViewModel.apply(this, arguments); $(function() { var myVar = setInterval(function() { if ($('#adjustbillListMenu').length > 0) { // write custom action name and resource. Bill adjustment //can be hide by not granting make permission to customResource. if (!util.isGrantedResourceAction("make", "customResource")) { $('#adjustbillListMenu').remove(); if ($("#actionsmenu").next().children("li.ui-menu-item").length < 1) { $("#actionsmenu").children("span").remove(); } clearInterval(myVar); } }, 20); }); } customBillChargesViewModel.prototype = new BillChargesViewModel(); return customBillChargesViewModel; });
Save the file in your NetBeans IDE project.
After creating customBillItemChargesViewModel and customBillChargesViewModel view models, create custom view model entries in the customRegistry.js file to use when performing adjustments. Billing Care uses the custom bill tab view model and bill item charges view model instead of the default entries when rendering the Adjustments screen.
To create custom view model entries in a customRegistry.js file:
Create a customRegistry.js file in myproject/web/custom/ directory.
Define the entries referencing the custom view models in this file. For example:
billTab: { billChargesViewModel:'custom/js/viewmodels/customBillChargesViewModel.js' }, billItemCharges: { viewmodel: 'custom/js/viewmodels/customBillItemChargesViewModel.js' }
Save the file in your NetBeans IDE project.