
If a user reports that they are receiving the above error, look for the dbo.fnInvoice_Credit_Amount function in the below location.

If the function is not present, run the below script to recreate the function.
/****** Object: UserDefinedFunction [dbo].[fnInvoice_Credit_Amount] Script Date: 11/20/2024 3:51:34 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[fnInvoice_Credit_Amount]
(@APInvoice_Id int)
RETURNS money
AS
BEGIN
DECLARE @Amount money
SELECT @Amount = SUM(cd.Amount)
FROM AP_Credit_Detail cd
WHERE cd.APInvoice_Id = @apinvoice_id
RETURN @Amount
END
GO