Views [dbo].[vClaimsSummaryAmounts]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created10:56:42 AM Monday, May 4, 2015
Last Modified8:55:41 AM Thursday, December 5, 2024
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