Compare commits
2 Commits
a79a6d973f
...
993a476bea
Author | SHA1 | Date | |
---|---|---|---|
993a476bea | |||
59a28591bd |
@ -14,3 +14,28 @@ 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
|
||||||
|
104
ui_schema.json
104
ui_schema.json
@ -1,73 +1,75 @@
|
|||||||
{
|
{
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Model Inputs",
|
"label": "History",
|
||||||
|
"detailLevel": 10,
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Base Cost",
|
"label": "Last Quote",
|
||||||
"value": 1.22446,
|
"detailLevel": 10,
|
||||||
"type": "currency"
|
"value": 0.1012,
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Peer Target",
|
|
||||||
"details": [
|
|
||||||
{
|
|
||||||
"label": "Peer Median Margin",
|
|
||||||
"value": 36.873,
|
|
||||||
"type": "percent",
|
|
||||||
"note": "DIR|102 - HANGING POTS|110 - INJECTION|Tier 2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Target Support",
|
|
||||||
"detailLevel": 1,
|
|
||||||
"details": [
|
|
||||||
{
|
|
||||||
"label": "Tier 1 Truckload",
|
|
||||||
"value": 80,
|
|
||||||
"type": "currency",
|
"type": "currency",
|
||||||
"note": "reviewed floor price"
|
"note": "XNS0T1G3G18B096 | Ord# 1008338 | 2025-06-12 | Qty 19,200"
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Warehouse",
|
|
||||||
"value": 1.2,
|
|
||||||
"type": "percent"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Factor Adjustment",
|
"label": "List",
|
||||||
|
"detailLevel": 10,
|
||||||
"details": [
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Package UOM",
|
"label": "Code: GUAU",
|
||||||
"value": -0.01,
|
"detailLevel": 10,
|
||||||
"type": "percent"
|
"value": 0.11,
|
||||||
|
"type": "currency",
|
||||||
|
"note": "List Min Qty: 9,600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Target Calculation",
|
||||||
|
"detailLevel": 10,
|
||||||
|
"details": [
|
||||||
|
{
|
||||||
|
"label": "XNS0T1G3",
|
||||||
|
"detailLevel": 10,
|
||||||
|
"value": 0.08,
|
||||||
|
"type": "currency",
|
||||||
|
"note": "Base Floor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "# of Pallets",
|
"label": "Channel:WHS",
|
||||||
"value": 0.02,
|
"detailLevel": 10,
|
||||||
"type": "percent",
|
"value": 0.2,
|
||||||
"note": "0.03"
|
"type": "Percent",
|
||||||
|
"note": "Premium"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Urgency",
|
"label": "Volume:1-8",
|
||||||
"value": 0.03,
|
"detailLevel": 10,
|
||||||
"type": "percent",
|
"value": 0.1,
|
||||||
"note": "Top Priority"
|
"type": "Percent",
|
||||||
|
"note": "Premium"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "State Adder/Subtractor",
|
"label": "Target",
|
||||||
"value": -0.02,
|
"detailLevel": 10,
|
||||||
"type": "percent",
|
"value": 0.1056,
|
||||||
"note": "OH"
|
"type": "currency",
|
||||||
},
|
"note": "Total"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Guidance",
|
||||||
|
"detailLevel": 10,
|
||||||
|
"details": [
|
||||||
{
|
{
|
||||||
"label": "Branding",
|
"label": "Price",
|
||||||
"value": 0,
|
"detailLevel": 10,
|
||||||
"type": "currency"
|
"value": 0.1012,
|
||||||
|
"type": "currency",
|
||||||
|
"note": "Using target price, capped to not exceed last price"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user