dont return a price if all you have is price list

This commit is contained in:
Paul Trowbridge 2025-10-03 15:45:11 -04:00
parent b62f2275d6
commit f4d25e6819

View File

@ -29,6 +29,13 @@ BEGIN
RETURN; RETURN;
END; END;
-- Early exit if only list price is available
IF @target IS NULL AND @last_norm IS NULL
BEGIN
INSERT INTO @ret VALUES (NULL, N'Only List price is available, disregard');
RETURN;
END;
-- Pick starting base price -- Pick starting base price
SET @base_price = COALESCE(@target, @last_norm, @list_eff); SET @base_price = COALESCE(@target, @last_norm, @list_eff);
-- Reason text -- Reason text