Hi,
Am getting this error:

When calling this function.
I want to see the value it returns to test .
The function is in the Risk_Reclamaciones_pkg
function Calc_Ratio(pDateFrom date,
pDateTo date,
pCustomerID number default null,
pCompanyID number default null) return number is
vTotalSales number;
vTotalReturns number;
begin
select nvl(sum(SALES_AMOUNT), 0)
into vTotalSales
from SALES
where SALES_DATE >= pDateFrom and
SALES\_DATE \<= pDateTo and
CUSTOMER\_ID = nvl(pCustomerID, CUSTOMER\_ID) and
COMPANY\_ID = nvl(pCompanyID, COMPANY\_ID);
select nvl(sum(RETURNS_AMOUNT), 0)
into vTotalReturns
from RETURNS
where RETURNS_DATE >= pDateFrom and
RETURNS\_DATE \<= pDateTo and
CUSTOMER\_ID = nvl(pCustomerID, CUSTOMER\_ID) and
COMPANY\_ID = nvl(pCompanyID, COMPANY\_ID);
return (vTotalReturns / NullIf(vTotalSales, 0)) * 100; -- Nullif prevents divide by zero.
end;
/
What could be the problem??
Thanks for any help!