Views [dbo].[vClaimsSummaryAmounts]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created3:10:18 PM Tuesday, July 21, 2015
Last Modified2:29:39 AM Saturday, February 4, 2017
Columns
Name
ClaimId
SummarySettlementAmount
SummaryVendorChargebackAmount
SummaryBranchChargebackAmount
SummaryReveivableAmount
SummaryHandlingRevenueAmount
SummaryHandlingExpensesAmount
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
/**
* This view is for ProServ, used in custom reports. Don't rename the view without confirmation from ProServ.
*/


create view [dbo].[vClaimsSummaryAmounts]
as

select ClaimId = c.ClaimID,
    SummarySettlementAmount = (                        -- Get the Posted Settlement Amounts
        select    sum(cssa.PostedAmount)
        from    dbo.ClaimSummarySettlementAmounts(c.ClaimID) cssa),
    SummaryVendorChargebackAmount = (                --Get the Posted Chargeback Vendor Amounts
        select    sum(csva.PostedAmount)
        from    dbo.ClaimSummaryVendorAmounts(c.ClaimID) csva),
    SummaryBranchChargebackAmount = (                -- Get the Posted Chargeback Branch Amounts
        select    sum(csba.PostedAmount)
        from    dbo.ClaimSummaryBranchChargebackAmounts(c.ClaimID) csba),
    SummaryReveivableAmount = (                        -- Get the Posted Receivable Amounts
        select    sum(csra.PostedAmount)
        from    dbo.ClaimSummaryReceivableAmounts(c.ClaimID) csra),
    SummaryHandlingRevenueAmount = (                -- Get the Posted Handling Revenue Amounts
        select    sum(cshra.PostedAmount)
        from    dbo.ClaimSummaryHandlingRevenueAmounts(c.ClaimID) cshra),
    SummaryHandlingExpensesAmount = (                -- Get the Posted Handling Expenses Amounts
        select    sum(cshea.PostedAmount)
        from    dbo.ClaimSummaryHandlingExpensesAmounts(c.ClaimID) cshea)
from Claim c
GO
GRANT SELECT ON  [dbo].[vClaimsSummaryAmounts] TO [MssExec]
GRANT INSERT ON  [dbo].[vClaimsSummaryAmounts] TO [MssExec]
GRANT DELETE ON  [dbo].[vClaimsSummaryAmounts] TO [MssExec]
GRANT UPDATE ON  [dbo].[vClaimsSummaryAmounts] TO [MssExec]
GO
Uses
Used By