Compare commits
No commits in common. "993a476bea62c36be30afb3b00289f83ca820fbf" and "a79a6d973f92e3f5f624d51b7426686a8556a0ac" have entirely different histories.
993a476bea
...
a79a6d973f
@ -14,28 +14,3 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON pricequote.target_prices TO PUBLIC;
|
|||||||
DROP TABLE IF EXISTS import.core_target;
|
DROP TABLE IF EXISTS import.core_target;
|
||||||
|
|
||||||
CREATE TABLE import.core_target AS (SELECT * FROM pricequote.core_target);
|
CREATE TABLE import.core_target AS (SELECT * FROM pricequote.core_target);
|
||||||
|
|
||||||
WITH
|
|
||||||
expand AS (
|
|
||||||
SELECT
|
|
||||||
c.compset,
|
|
||||||
c.stlc,
|
|
||||||
c.floor,
|
|
||||||
b.ds,
|
|
||||||
b.chan,
|
|
||||||
b.tier,
|
|
||||||
b.vol,
|
|
||||||
b.val,
|
|
||||||
b.price,
|
|
||||||
json_pretty(to_json(b.math)) math
|
|
||||||
FROM
|
|
||||||
pricequote.core_target c
|
|
||||||
LEFT JOIN LATERAL pricequote.build_pricing_path_base (options||jsonb_build_object('entity','Anchor','attr',c.stlc,'val',c.floor,'func','Price')) b ON b.lastflag
|
|
||||||
)
|
|
||||||
-- select count(*) from expand
|
|
||||||
INSERT INTO
|
|
||||||
pricequote.target_prices_base
|
|
||||||
SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
expand
|
|
||||||
|
@ -1,75 +1,73 @@
|
|||||||
{
|
{
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "History",
|
"label": "Model Inputs",
|
||||||
"detailLevel": 10,
|
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Last Quote",
|
"label": "Base Cost",
|
||||||
"detailLevel": 10,
|
"value": 1.22446,
|
||||||
"value": 0.1012,
|
"type": "currency"
|
||||||
"type": "currency",
|
|
||||||
"note": "XNS0T1G3G18B096 | Ord# 1008338 | 2025-06-12 | Qty 19,200"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "List",
|
"label": "Peer Target",
|
||||||
"detailLevel": 10,
|
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Code: GUAU",
|
"label": "Peer Median Margin",
|
||||||
"detailLevel": 10,
|
"value": 36.873,
|
||||||
"value": 0.11,
|
"type": "percent",
|
||||||
"type": "currency",
|
"note": "DIR|102 - HANGING POTS|110 - INJECTION|Tier 2"
|
||||||
"note": "List Min Qty: 9,600"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Target Calculation",
|
"label": "Target Support",
|
||||||
"detailLevel": 10,
|
"detailLevel": 1,
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "XNS0T1G3",
|
"label": "Tier 1 Truckload",
|
||||||
"detailLevel": 10,
|
"value": 80,
|
||||||
"value": 0.08,
|
|
||||||
"type": "currency",
|
"type": "currency",
|
||||||
"note": "Base Floor"
|
"note": "reviewed floor price"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Channel:WHS",
|
"label": "Warehouse",
|
||||||
"detailLevel": 10,
|
"value": 1.2,
|
||||||
"value": 0.2,
|
"type": "percent"
|
||||||
"type": "Percent",
|
|
||||||
"note": "Premium"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Volume:1-8",
|
|
||||||
"detailLevel": 10,
|
|
||||||
"value": 0.1,
|
|
||||||
"type": "Percent",
|
|
||||||
"note": "Premium"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Target",
|
|
||||||
"detailLevel": 10,
|
|
||||||
"value": 0.1056,
|
|
||||||
"type": "currency",
|
|
||||||
"note": "Total"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Guidance",
|
"label": "Factor Adjustment",
|
||||||
"detailLevel": 10,
|
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Price",
|
"label": "Package UOM",
|
||||||
"detailLevel": 10,
|
"value": -0.01,
|
||||||
"value": 0.1012,
|
"type": "percent"
|
||||||
"type": "currency",
|
},
|
||||||
"note": "Using target price, capped to not exceed last price"
|
{
|
||||||
|
"label": "# of Pallets",
|
||||||
|
"value": 0.02,
|
||||||
|
"type": "percent",
|
||||||
|
"note": "0.03"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Urgency",
|
||||||
|
"value": 0.03,
|
||||||
|
"type": "percent",
|
||||||
|
"note": "Top Priority"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "State Adder/Subtractor",
|
||||||
|
"value": -0.02,
|
||||||
|
"type": "percent",
|
||||||
|
"note": "OH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Branding",
|
||||||
|
"value": 0,
|
||||||
|
"type": "currency"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user