Operation Details
Description: Reads the performance measure against units delivered for a service invoice line item and roster line item for the provider offering. @deprecated since 7.0.0.0, This functionality forms part of a feature that is no longer relevant to the product strategy and will not be replaced.
Sterotype: ns
SQL
SELECT
  SUM(unitsDelivered)
INTO
  :count 
FROM
  
  ( 
  SELECT
    SUM(ServiceInvoiceLineItem.noOfUnits) AS unitsDelivered 
  FROM
    ServiceInvoiceLineItem,
    ProviderOffering,
    ServiceOffering 
  WHERE ProviderOffering.providerOfferingID = :resourceID 
    AND ProviderOffering.serviceOfferingID = ServiceOffering.serviceOfferingID 
    AND ServiceInvoiceLineItem.serviceID = ServiceOffering.serviceOfferingID 
    AND ServiceInvoiceLineItem.status = :siliStatus 
  
  UNION ALL
    
  SELECT
    SUM(RosterLineItem.totalUnitsDelivered) AS unitsDelivered 
  FROM
    Roster,
    RosterLineItem,
    ProviderRosterLineItem 
  WHERE Roster.serviceID = :resourceID 
    AND Roster.rosterID = RosterLineItem.rosterID 
    AND RosterLineItem.rosterLineItemID = ProviderRosterLineItem.rosterLineItemID 
    AND ProviderRosterLineItem.status = :prliStatus 
  ) LineItems