on 09-24-2018 2:36 PM
Hello Experts,
I'm currently using Financial Accelerator 6.6.
I'm trying to get the one time charge entries for a certain product. However, I only have productModel, policyModel and orderModel which I was not able to find any one time charge entries related data since they are store in the SubsriptionPricePlan which I dont have.
Your help is highly appreciated.
Hi ,
first of all, please note that SubscriptionPricePlanModel extends PriceRowModel, so you can use that inheritance to get the one time charge entries.
In addition, below you can find two examples how to get the list of OneTimeChargeEntrie-s, using only Model or Data, probably it will give you an idea how to make it work:
for (AbstractOrderEntryModel entry : orderModel.getEntries())
{
if (entry.getProduct() instanceof SubscriptionProductModel)
{
SubscriptionPricePlanModel pricePlanModel = getSubscriptionCommercePriceService().getSubscriptionPricePlanForEntry(entry);
Collection<OneTimeChargeEntryModel> oneTimeChargeEntryModels = pricePlanModel.getOneTimeChargeEntries();
}
}
//or if you can work with ProductData
SubscriptionPricePlanData subscriptionPricePlanData = (SubscriptionPricePlanData) productData.getPrice();
List<OneTimeChargeEntryData> oneTimeChargeEntries = subscriptionPricePlanData.getOneTimeChargeEntries();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.