13 Customizing Billing Care to Enable Noncurrency Adjustments for Expired Sub-Balances

Learn how to customize the Oracle Communications Billing Care Noncurrency Balance Details dialog box to enable adjustments to expired noncurrency sub-balances.

About Noncurrency Sub-Balance Adjustments

By default, Billing Care disables the Adjust bucket menu item in the Noncurrency Balance Details dialog box for expired noncurrency sub-balances.

You can enable Adjust bucket using the Billing Care SDK, allowing users to update expired noncurrency sub-balances.

Customizing Billing Care to Enable Adjustments to Expired Noncurrency Sub-Balances

To customize Billing Care to enable adjusting expired sub-balances for noncurrency resources:
  1. Create a customization project. See "Setting Up a Billing Care Customization Project" for more details.

  2. Create a custom view model to enable Adjust bucket for expired noncurrency sub-balances. See "Creating a Custom View Model to Enable the Adjust Bucket for Expired Noncurrency Sub-Balances" for more information.

  3. Override the registry values for your custom view model. See "Configuring the Registry to use Your Custom Noncurrency Balance View Model" for more information.

  4. Package and deploy your customizations using one of the methods described in "Using an Exploded Archive during Customization" or "Packaging and Deploying Customizations".

The Billing Care SDK includes samples that you can use for developing your own customizations in the SDK_home/samples/NonCurrencyPastBalanceUpdates directory. The sample includes a custom view model, a customRegistry.js file, and a README.txt file explaining how to use the sample files.

Creating a Custom View Model to Enable the Adjust Bucket for Expired Noncurrency Sub-Balances

Billing Care uses a view model to define how to display screens in Billing Care. You must create a custom view model such as CustomNonCurrencyViewModel. This will contain the details to enable Adjust bucket for expired noncurrency sub-balances in the Noncurrency Balance Details dialog box. A sample is located in SDK_home/samples/NonCurrencyPastBalanceUpdates/web/custom/viewmodels/balances/CustomNonCurrencyBalanceViewModel.js.

See "About View Models" for more information about Billing Care view models.

To create a custom view model that enables adjustments to expired noncurrency sub-balances:

  1. Create the CustomNonCurrencyBalanceViewModel.js file in the myproject/web/custom/js/viewmodels directory, where myproject is the folder containing your NetBeans IDE project.

  2. In the file, add the following code, ensuring you set the isPastBalanceUpdate parameter to true:

    Define([
    ‘jquery’,
    ‘underscore’,
    ‘knockout’,
    ‘knockout-mapping’,
    ‘viewmodels/balances/NonCurrencyBalanceViewModel’
    ], function ($, -, ko, komapping, BaseViewModel){
    
    function CustomNonCurrencyBalanceViewModel(){
         BaseViewModel.apply(this, arguments);
         var self = this;
         self.isPastBalanceUpdate=true;
    }
    
    CustomNoncurrencyBalanceViewModel.prototype = new BaseViewModel();
    return CustomNonCurrencyBalanceViewModel;
    });
  3. Save the file in your NetBeans IDE project.

Configuring the Registry to use Your Custom Noncurrency Balance View Model

Create a custom module entry in the customRegistry.js file to point to your custom view model. This configures Billing Care to use the custom noncurrency balance view model instead of the default one. A sample is located in SDK_home/samples/NonCurrencyPastBalanceUpdates/web/custom/customRegistry.js.

To add your custom view model to the registry:
  1. Create a customRegistry.js file in myproject/web/custom/ directory.

  2. Specify the custom noncurrency balance view model in this file. For example:

    balances: {
        containedViewModel: '../custom/viewmodels/balances/CustomNonCurrencyBalanceViewModel'
    }
  3. Save the file in your NetBeans IDE project.