Compare commits

..

No commits in common. "7596038b545c65a5f14e1ca2fb703af7dc18a001" and "a8d83cc042e2f35fd7ef105b9dac85f8cf689093" have entirely different histories.

3 changed files with 24 additions and 30 deletions

View File

@ -10,41 +10,38 @@
SELECT
*, ui_json->'data'
ui_json->'data'
FROM pricequote.single_price_call(
'BFGS0001',
'SPRI0019',
'INT12040G18C100',
'v1:B..CSE..',
7037
'GRIF0001',
'GRIF0001',
'XNS0T1G3G18B096',
'v1:B..PLT..',
9600
) f;
SELECT
*, ui_json->'data'
FROM pricequote.single_price_call(
'BELL0039',
'BELL0039',
'XNS0T1G3X19B096PZBND',
'v1:L.P.PLT..',
82420
) f;
SELECT * FROM rlarp.cust WHERE code = 'PACK0009'
--
-- SELECT
-- ui_json
-- FROM pricequote.single_price_call(
-- 'BFGS0001',
-- 'BOBS0002',
-- 'HTI10754B12B024LXB04',
-- 'v1:L.L.PLT..',
-- 172000
-- ) f;
--
-- SELECT * FROM pricequote.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100';
--
SELECT
q.billto, q.shipto, q.part, q.v1ds, q.units_each, pc.tprice, pc.tmath
pc.expl, pc.hist
FROM
pricequote.live_quotes q
pricequote.live_quotes
LEFT JOIN LATERAL pricequote.single_price_call(
billto, shipto, part, v1ds, units_each
) pc ON TRUE
WHERE
qid = 113761
-- AND qrn = 4;
qid = 113800
AND qrn = 4;
create table pricequote.target_prices_base as (
with

View File

@ -356,14 +356,14 @@ BEGIN
q2.last_price_norm,
q2.listprice_eff,
q2.last_date,
1.0, 1.0, 1.0
.95, 1.0, 1.0
) g ON TRUE
JOIN LATERAL pricequote.approval_logic(
q2.tprice,
q2.last_price_norm,
q2.listprice_eff,
q2.last_date,
1.0, 1.0, 1.0
.95, 1.0, 1.0
) a ON TRUE
) s
WHERE q.ctid = s.ctid;

View File

@ -105,9 +105,6 @@ lq AS MATERIALIZED (
-- ,jsonb_pretty(pricing) pricing
,p.guidance_price
,p.guidance_reason
,p.approval_price
,p.approval_reason
,p.tprice guidance_target
,jsonb_pretty(p.ui_json->'data') expl
FROM
lq
@ -178,4 +175,4 @@ lq AS MATERIALIZED (
WHERE
COALESCE(g.bestprice,1) = 1
)
SELECT * FROM hist --LIMIT 1000--WHERE qid = 108655
SELECT * FROM hist --WHERE qid = 108655