Compare commits

...

2 Commits

Author SHA1 Message Date
Paul Trowbridge
5a8ae45a01
Merge pull request #2 from The-HC-Companies/dev_onylist
dont return a price if all you have is price list
2025-10-03 15:51:14 -04:00
f4d25e6819 dont return a price if all you have is price list 2025-10-03 15:45:11 -04:00

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