Stored Procedures [dbo].[MssWebGetOrderAdditionalCharges]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@orderIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
CREATE PROCEDURE [dbo].[MssWebGetOrderAdditionalCharges]
    @orderId int
AS
    SELECT
        
         AddlCharges.AddlChargesID,    
         AddlCharges.ChargeAmount,
         AddlCharges.ChargeTypeID,
         ChargeTypes.ChargeType,
         AddlCharges.OrdPriKey,     
         AddlCharges.JobsID,
         Jobs.ClientJobNo,
         AddlCharges.BillToID,
         BillChargesTo.BillChargesTo,
         AddlCharges.PoNo,
         AddlCharges.AuthorizedBy,
         AddlCharges.AuthViaID,
         AuthVia.AuthorizedVia,
         AddlCharges.BillTrans,
         AddlCharges.Invoiced
    FROM AddlCharges
         INNER JOIN BillChargesTo
             ON BillChargesTo.BillChargesToID = AddlCharges.BillToID
         LEFT OUTER JOIN Jobs
             ON Jobs.JobsID = AddlCharges.JobsID
         LEFT OUTER JOIN AuthVia
             ON AuthVia.AuthViaID = AddlCharges.AuthViaID
         INNER JOIN ChargeTypes  
             ON ChargeTypes.ChargeTypeID = AddlCharges.ChargeTypeID
    WHERE AddlCharges.OrdPriKey = @orderId
GO
GRANT EXECUTE ON  [dbo].[MssWebGetOrderAdditionalCharges] TO [MssExec]
GO
Uses