Stored Procedures [dbo].[MssWebUpdateOrderThirdPartyService]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inIdint4
@inOrderIdint4
@inVendorIdvarchar(15)15
@inAmountmoney8
@inPONumbervarchar(20)20
@inInvoiceNumbervarchar(20)20
@inDescriptionvarchar(60)60
@inServiceDatedatetime8
@inInvoiceReceivedDatedatetime8
@inInvoiceApprovedDatedatetime8
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
CREATE PROCEDURE [dbo].[MssWebUpdateOrderThirdPartyService]
@inId int,
@inOrderId int,
@inVendorId varchar(15),
@inAmount money,
@inPONumber varchar(20),
@inInvoiceNumber varchar(20),
@inDescription varchar(60),
@inServiceDate datetime,
@inInvoiceReceivedDate datetime,
@inInvoiceApprovedDate datetime
AS
BEGIN
    UPDATE OrderThirdPartys SET
        VendorID = @inVendorId,
        Amount = @inAmount,
        PONumber = @inPONumber,
        InvoiceNumber = @inInvoiceNumber,
        Description = @inDescription,
        Date = @inServiceDate,
        InvoiceReceivedDate = @inInvoiceReceivedDate,
        InvoiceApprovedDate = @inInvoiceApprovedDate
    WHERE OrdThirdPartyPriKey = @inId AND OrdPriKey=@inOrderId
END
update Orders set
    JobCostingCalculated = 0
    from dbo.OrderThirdPartys
inner join Orders on Orders.PriKey=OrderThirdPartys.OrdPrikey and
    Orders.PriKey=@inOrderId
where OrderThirdPartys.OrdThirdPartyPriKey = @inId and
    Orders.ReleaseDate is null
GO
GRANT EXECUTE ON  [dbo].[MssWebUpdateOrderThirdPartyService] TO [MssExec]
GO
Uses