Compare commits

...

5 Commits

6 changed files with 22 additions and 11 deletions

View File

@ -7,12 +7,22 @@ EXEC pricing.single_price_call
@vol = 9600;
EXEC pricing.single_price_call
@bill = 'BFGS0001',
@ship = 'BOBS0002',
@part = 'HTI10754B12B024LXB04',
@v1ds = 'v1:L.L.PLT..',
@bill = 'FARM0001',
@ship = 'KEYB0001',
@part = 'HCA10000B661100',
@v1ds = 'v1:T..CSE..D',
@vol = 172000;
SELECT g.*
FROM (SELECT
TRY_CAST(.33275 AS NUMERIC(20,5)) AS tprice,
TRY_CAST(.758 AS NUMERIC(20,5)) AS last_price_norm,
TRY_CAST(null AS NUMERIC(20,5)) AS listprice_eff,
TRY_CAST('2025-06-01' AS DATE) AS last_date
) q
CROSS APPLY pricing.guidance_logic(q.tprice, q.last_price_norm, q.listprice_eff, q.last_date, 0.05, 1.0, 1.0) g;
SELECT * FROM pricing.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100'
SELECT * FROM pricing.pricelist_ranged pr WHERE pr.jcpart = 'XNS0T1G3G18B096' AND

View File

@ -3,8 +3,8 @@ SELECT
FROM pricequote.single_price_call(
'FARM0001',
'KEYB0001',
'HZP3E103E21D050',
'v1:C..BDL..',
'HCA10000B661100',
'v1:T..CSE..D',
50000
) f
@ -38,5 +38,5 @@ FROM
billto, shipto, part, v1ds, units_each
) pc ON TRUE
WHERE
qid = 113278
AND qrn = 5
qid = 113173
AND qrn = 32

View File

@ -383,7 +383,7 @@ BEGIN
TRY_CAST(q.last_price_norm AS NUMERIC(20,5)),
TRY_CAST(q.listprice_eff AS NUMERIC(20,5)),
TRY_CAST(q.last_date AS DATE),
.05, 1.0, 1.0
.15, 1.0, 1.0
) g;
--------------------------------------------------------------------------------

View File

@ -289,7 +289,7 @@ BEGIN
AND tp.ds = _last_dataseg
AND tp.chan = _chan
AND tp.tier = _tier
AND FLOOR(_last_qty / _pltq)::int <@ tp.vol;
AND FLOOR(_last_qty / NULLIF(_pltq, 0))::int <@ tp.vol;
------------------------------------------------------------------
-- Step 4: Cost data for normalization

View File

@ -23,6 +23,7 @@
},
{
"label": "Target Support",
"detailLevel":1,
"details": [
{
"label": "Tier 1 Truckload",