Merge pull request #2 from The-HC-Companies/dev_onylist

dont return a price if all you have is price list
This commit is contained in:
Paul Trowbridge 2025-10-03 15:51:14 -04:00 committed by GitHub
commit 5a8ae45a01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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