Commit all views
This commit is contained in:
8
.claude/settings.local.json
Normal file
8
.claude/settings.local.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(PGPASSWORD=dsproject psql -h 72.61.163.139 -p 5433 -U postgres -d tradon -c \"SELECT version\\(\\);\")",
|
||||||
|
"Bash(py -c ' *)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Data Reconciliation/2026-05-07 Contracts_Reco.xlsx
Normal file
BIN
Data Reconciliation/2026-05-07 Contracts_Reco.xlsx
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@ CREATE OR REPLACE VIEW public.vw_bi_dim_price_curve AS
|
|||||||
"strUnit" AS "Unit",
|
"strUnit" AS "Unit",
|
||||||
"strPriceCurveType" AS "Type",
|
"strPriceCurveType" AS "Type",
|
||||||
"strPriceArea" AS "Area",
|
"strPriceArea" AS "Area",
|
||||||
"strPriceCalendar" AS "Calendard",
|
"strPriceCalendar" AS "Calendar",
|
||||||
"strPricingType" AS "Pricing Type",
|
"strPricingType" AS "Pricing Type",
|
||||||
"dtmPricingStartDate" AS "Pricing Start Date",
|
"dtmPricingStartDate" AS "Pricing Start Date",
|
||||||
"dtmPricingEndDate" AS "Pricing End Date",
|
"dtmPricingEndDate" AS "Pricing End Date",
|
||||||
|
|||||||
@@ -4,5 +4,7 @@ CREATE OR REPLACE VIEW public.vw_bi_fct_prices AS
|
|||||||
"dblHighPrice" AS "High",
|
"dblHighPrice" AS "High",
|
||||||
"dblLowPrice" AS "Low",
|
"dblLowPrice" AS "Low",
|
||||||
"dblOpenPrice" AS "Open",
|
"dblOpenPrice" AS "Open",
|
||||||
"dblPriceValue" AS "Price Value"
|
"dblPriceValue" AS "Price Value",
|
||||||
|
"dtmMaxPriceDate" AS "Last Price Date",
|
||||||
|
"ysnIsLatestPrice" AS "Is Latest Price"
|
||||||
FROM vw_utility_price_curve_prices;;
|
FROM vw_utility_price_curve_prices;;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_contract_fees AS
|
|||||||
"strUnit" AS "Unit",
|
"strUnit" AS "Unit",
|
||||||
(("dblQuantity" * "dblPrice") * ("dblSignMultiplier")::numeric) AS "Amount",
|
(("dblQuantity" * "dblPrice") * ("dblSignMultiplier")::numeric) AS "Amount",
|
||||||
CASE
|
CASE
|
||||||
WHEN (upper(("strProduct")::text) = 'MARITIME FREIGHT'::text) THEN "strProduct"
|
WHEN (upper(("strProduct")::text) = 'MARITIME FREIGHT'::text) THEN 'Freight'::character varying
|
||||||
WHEN (upper(("strProduct")::text) = 'PROFIT SHARING'::text) THEN "strProduct"
|
WHEN (upper(("strProduct")::text) = 'PROFIT SHARING'::text) THEN 'Profit Sharing'::character varying
|
||||||
ELSE 'Other Costs'::character varying
|
ELSE 'Other Costs'::character varying
|
||||||
END AS "Cost Group"
|
END AS "Cost Group"
|
||||||
FROM vw_utility_contract_fees;;
|
FROM vw_utility_contract_fees;;
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_full_pnl AS
|
|||||||
contracts."Open Quantity Signed",
|
contracts."Open Quantity Signed",
|
||||||
contracts."Price",
|
contracts."Price",
|
||||||
contracts."Open Cost Amount" AS amount,
|
contracts."Open Cost Amount" AS amount,
|
||||||
contracts."Estimated BL Date" AS "Delivery Date"
|
contracts."Estimated BL Date" AS "Delivery Date",
|
||||||
|
contracts."Line Group"
|
||||||
FROM (vw_bi_itsa_physical_open_costs contracts
|
FROM (vw_bi_itsa_physical_open_costs contracts
|
||||||
JOIN trade trade ON ((contracts."intTradeLineId" = trade."intTradeId")))
|
JOIN trade trade ON ((contracts."intTradeLineId" = trade."intTradeId")))
|
||||||
UNION ALL
|
UNION ALL
|
||||||
@@ -28,7 +29,8 @@ UNION ALL
|
|||||||
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
||||||
shipment."Purchase Price" AS "Price",
|
shipment."Purchase Price" AS "Price",
|
||||||
(shipment."Shipped Quantity" * (shipment."Purchase Price")::double precision) AS amount,
|
(shipment."Shipped Quantity" * (shipment."Purchase Price")::double precision) AS amount,
|
||||||
shipment."BL Date" AS "Delivery Date"
|
shipment."BL Date" AS "Delivery Date",
|
||||||
|
'Purchase'::text AS "Line Group"
|
||||||
FROM vw_bi_itsa_fct_shipments shipment
|
FROM vw_bi_itsa_fct_shipments shipment
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT 3 AS "intPnlTypeId",
|
SELECT 3 AS "intPnlTypeId",
|
||||||
@@ -38,7 +40,8 @@ UNION ALL
|
|||||||
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
||||||
shipment."Sale Price" AS "Price",
|
shipment."Sale Price" AS "Price",
|
||||||
(shipment."Shipped Quantity" * (shipment."Sale Price")::double precision) AS amount,
|
(shipment."Shipped Quantity" * (shipment."Sale Price")::double precision) AS amount,
|
||||||
shipment."BL Date" AS "Delivery Date"
|
shipment."BL Date" AS "Delivery Date",
|
||||||
|
'Sale'::text AS "Line Group"
|
||||||
FROM vw_bi_itsa_fct_shipments shipment
|
FROM vw_bi_itsa_fct_shipments shipment
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT 3 AS "intPnlTypeId",
|
SELECT 3 AS "intPnlTypeId",
|
||||||
@@ -48,9 +51,21 @@ UNION ALL
|
|||||||
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
||||||
fees."Price",
|
fees."Price",
|
||||||
(shipment."Shipped Quantity" * (fees."Price")::double precision) AS amount,
|
(shipment."Shipped Quantity" * (fees."Price")::double precision) AS amount,
|
||||||
shipment."BL Date" AS "Delivery Date"
|
shipment."BL Date" AS "Delivery Date",
|
||||||
|
fees."Cost Group" AS "Line Group"
|
||||||
FROM (vw_bi_itsa_fct_shipment_fees fees
|
FROM (vw_bi_itsa_fct_shipment_fees fees
|
||||||
JOIN vw_bi_itsa_fct_shipments shipment ON ((fees."intShipmentId" = shipment."intShipmentId")))
|
JOIN vw_bi_itsa_fct_shipments shipment ON ((fees."intShipmentId" = shipment."intShipmentId")))
|
||||||
|
UNION ALL
|
||||||
|
SELECT fees."intPnlTypeId",
|
||||||
|
fees."strConformedReferenceId",
|
||||||
|
fees."intPriceGroupId",
|
||||||
|
fees."Line Description",
|
||||||
|
fees."Open Quantity Signed",
|
||||||
|
fees."Price",
|
||||||
|
fees."Amount" AS amount,
|
||||||
|
fees."Delivery Date",
|
||||||
|
fees."Line Group"
|
||||||
|
FROM vw_bi_itsa_fct_inherited_expenses_on_shipments fees
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT 1 AS "intPnlTypeId",
|
SELECT 1 AS "intPnlTypeId",
|
||||||
trade."strTradeId" AS "strConformedReferenceId",
|
trade."strTradeId" AS "strConformedReferenceId",
|
||||||
@@ -59,7 +74,8 @@ UNION ALL
|
|||||||
ctr."Contract Quantity" AS "Open Quantity Signed",
|
ctr."Contract Quantity" AS "Open Quantity Signed",
|
||||||
ctr."Avg Price" AS "Price",
|
ctr."Avg Price" AS "Price",
|
||||||
(ctr."Contract Quantity" * ctr."Avg Price") AS amount,
|
(ctr."Contract Quantity" * ctr."Avg Price") AS amount,
|
||||||
ctr."Delivery Date"
|
ctr."Delivery Date",
|
||||||
|
'Expected'::text AS "Line Group"
|
||||||
FROM (vw_bi_itsa_fct_contract ctr
|
FROM (vw_bi_itsa_fct_contract ctr
|
||||||
JOIN vw_bi_dim_trade trade ON ((ctr."TradeLineId" = trade."intTradeId")))
|
JOIN vw_bi_dim_trade trade ON ((ctr."TradeLineId" = trade."intTradeId")))
|
||||||
WHERE ((trade."Book")::text ~~ '%Projection%'::text);;
|
WHERE ((trade."Book")::text ~~ '%Projection%'::text);;
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_inherited_expenses_on_shipments AS
|
||||||
|
WITH all_fees AS (
|
||||||
|
SELECT 3 AS "intPnlTypeId",
|
||||||
|
((shipment."intPurchaseLineId" || '_'::text) || shipment."intSaleLineId") AS "strConformedReferenceId",
|
||||||
|
2 AS "intPriceGroupId",
|
||||||
|
ctr_fees."Fee" AS "Line Description",
|
||||||
|
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
||||||
|
ctr_fees."Price",
|
||||||
|
(shipment."Shipped Quantity" * (ctr_fees."Price")::double precision) AS "Amount",
|
||||||
|
shipment."BL Date" AS "Delivery Date",
|
||||||
|
ctr_fees."Cost Group" AS "Line Group"
|
||||||
|
FROM (vw_bi_itsa_fct_shipments shipment
|
||||||
|
JOIN vw_bi_itsa_fct_contract_fees ctr_fees ON ((ctr_fees."intContractLineId" = shipment."intPurchaseLineId")))
|
||||||
|
UNION ALL
|
||||||
|
SELECT 3 AS "intPnlTypeId",
|
||||||
|
((shipment."intPurchaseLineId" || '_'::text) || shipment."intSaleLineId") AS "strConformedReferenceId",
|
||||||
|
2 AS "intPriceGroupId",
|
||||||
|
fees."Fee" AS "Line Description",
|
||||||
|
shipment."Shipped Quantity" AS "Open Quantity Signed",
|
||||||
|
fees."Price",
|
||||||
|
(shipment."Shipped Quantity" * (fees."Price")::double precision) AS "Amount",
|
||||||
|
shipment."BL Date" AS "Delivery Date",
|
||||||
|
fees."Cost Group" AS "Line Group"
|
||||||
|
FROM (vw_bi_itsa_fct_shipment_fees fees
|
||||||
|
JOIN vw_bi_itsa_fct_shipments shipment ON ((fees."intShipmentId" = shipment."intShipmentId")))
|
||||||
|
)
|
||||||
|
SELECT all_fees."intPnlTypeId",
|
||||||
|
all_fees."strConformedReferenceId",
|
||||||
|
all_fees."intPriceGroupId",
|
||||||
|
all_fees."Line Description",
|
||||||
|
all_fees."Open Quantity Signed",
|
||||||
|
all_fees."Price",
|
||||||
|
all_fees."Amount",
|
||||||
|
all_fees."Delivery Date",
|
||||||
|
all_fees."Line Group"
|
||||||
|
FROM all_fees
|
||||||
|
WHERE ((all_fees."Line Description")::text <> 'Profit sharing'::text)
|
||||||
|
UNION ALL
|
||||||
|
SELECT ranked."intPnlTypeId",
|
||||||
|
ranked."strConformedReferenceId",
|
||||||
|
ranked."intPriceGroupId",
|
||||||
|
ranked."Line Description",
|
||||||
|
ranked."Open Quantity Signed",
|
||||||
|
ranked."Price",
|
||||||
|
ranked."Amount",
|
||||||
|
ranked."Delivery Date",
|
||||||
|
ranked."Line Group"
|
||||||
|
FROM ( SELECT all_fees."intPnlTypeId",
|
||||||
|
all_fees."strConformedReferenceId",
|
||||||
|
all_fees."intPriceGroupId",
|
||||||
|
all_fees."Line Description",
|
||||||
|
all_fees."Open Quantity Signed",
|
||||||
|
all_fees."Price",
|
||||||
|
all_fees."Amount",
|
||||||
|
all_fees."Delivery Date",
|
||||||
|
all_fees."Line Group",
|
||||||
|
row_number() OVER (PARTITION BY all_fees."strConformedReferenceId" ORDER BY all_fees."Price" DESC) AS rn
|
||||||
|
FROM all_fees
|
||||||
|
WHERE ((all_fees."Line Description")::text = 'Profit sharing'::text)) ranked
|
||||||
|
WHERE (ranked.rn = 1);;
|
||||||
@@ -22,8 +22,8 @@ CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_shipment_fees AS
|
|||||||
ELSE ("dblPrice" * ("dblSignMultiplier")::numeric)
|
ELSE ("dblPrice" * ("dblSignMultiplier")::numeric)
|
||||||
END) AS "Amount",
|
END) AS "Amount",
|
||||||
CASE
|
CASE
|
||||||
WHEN (upper(("strProduct")::text) = 'MARITIME FREIGHT'::text) THEN "strProduct"
|
WHEN (upper(("strProduct")::text) = 'MARITIME FREIGHT'::text) THEN 'Freight'::character varying
|
||||||
WHEN (upper(("strProduct")::text) = 'PROFIT SHARING'::text) THEN "strProduct"
|
WHEN (upper(("strProduct")::text) = 'PROFIT SHARING'::text) THEN 'Profit Sharing'::character varying
|
||||||
ELSE 'Other Costs'::character varying
|
ELSE 'Other Costs'::character varying
|
||||||
END AS "Cost Group"
|
END AS "Cost Group"
|
||||||
FROM vw_utility_shipment_fees;;
|
FROM vw_utility_shipment_fees;;
|
||||||
|
|||||||
20
Database Backups/SQL Views/vw_bi_itsa_fct_shipments_v2.sql
Normal file
20
Database Backups/SQL Views/vw_bi_itsa_fct_shipments_v2.sql
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_shipments_v2 AS
|
||||||
|
SELECT q.valued_lot_id AS "intLotId",
|
||||||
|
q.product_id AS "intProductId",
|
||||||
|
q.from_location_id AS "intFromLocationId",
|
||||||
|
q.to_location_id AS "intToLocationId",
|
||||||
|
q.shipment_id AS "intShipmentId",
|
||||||
|
q.purchase_line_id AS "intPurchaseLineId",
|
||||||
|
q.sale_line_id AS "intSaleLineId",
|
||||||
|
q.pnl_quantity_after_finished_rule AS "Shipped Quantity",
|
||||||
|
q.quantity_unit AS "Quantity Unit",
|
||||||
|
COALESCE(p."dblUnitPrice", (0)::numeric) AS "Purchase Price",
|
||||||
|
COALESCE(s."dblUnitPrice", (0)::numeric) AS "Sale Price",
|
||||||
|
q.bl_date AS "BL Date",
|
||||||
|
q.delivery_date_from AS "Delivery Date From",
|
||||||
|
q.delivery_date_to AS "Delivery Date To",
|
||||||
|
q.valued_lot_type AS "Lot Type"
|
||||||
|
FROM ((vw_utility_trade_pnl_quantities q
|
||||||
|
LEFT JOIN vw_utility_purchase_physical_contract p ON ((q.purchase_line_id = p."intPurchaseLineId")))
|
||||||
|
LEFT JOIN vw_utility_sale_physical_contract s ON ((q.sale_line_id = s."intSaleLineId")))
|
||||||
|
WHERE ((q.ignored_by_finished_rule = false) AND (q.shipment_id IS NOT NULL));;
|
||||||
@@ -58,7 +58,8 @@ CREATE OR REPLACE VIEW public.vw_bi_itsa_physical_open_costs AS
|
|||||||
((opq."OpenQuantitySigned" * pur."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
((opq."OpenQuantitySigned" * pur."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||||
1 AS "intPriceGroupId",
|
1 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
'Price'::text AS "Line Group"
|
||||||
FROM ((vw_utility_dim_physical_purchase_contract ctr
|
FROM ((vw_utility_dim_physical_purchase_contract ctr
|
||||||
JOIN vw_utility_purchase_physical_contract pur ON ((ctr."intPurchaseLineId" = pur."intPurchaseLineId")))
|
JOIN vw_utility_purchase_physical_contract pur ON ((ctr."intPurchaseLineId" = pur."intPurchaseLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||||
@@ -73,7 +74,8 @@ UNION ALL
|
|||||||
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
||||||
3 AS "intPriceGroupId",
|
3 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
'MTM'::text AS "Line Group"
|
||||||
FROM ((vw_utility_physical_mtm_definition mtm
|
FROM ((vw_utility_physical_mtm_definition mtm
|
||||||
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((mtm."intContractLineId" = ctr."intPurchaseLineId")))
|
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((mtm."intContractLineId" = ctr."intPurchaseLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||||
@@ -92,7 +94,8 @@ UNION ALL
|
|||||||
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||||
2 AS "intPriceGroupId",
|
2 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
fees."strProductGroup" AS "Line Group"
|
||||||
FROM ((vw_utility_contract_fees fees
|
FROM ((vw_utility_contract_fees fees
|
||||||
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((fees."intContractLineId" = ctr."intPurchaseLineId")))
|
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((fees."intContractLineId" = ctr."intPurchaseLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||||
@@ -107,7 +110,8 @@ UNION ALL
|
|||||||
((opq."OpenQuantitySigned" * sale."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
((opq."OpenQuantitySigned" * sale."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||||
1 AS "intPriceGroupId",
|
1 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
'Price'::text AS "Line Group"
|
||||||
FROM ((vw_utility_dim_physical_sale_contract ctr
|
FROM ((vw_utility_dim_physical_sale_contract ctr
|
||||||
JOIN vw_utility_sale_physical_contract sale ON ((ctr."intSaleLineId" = sale."intSaleLineId")))
|
JOIN vw_utility_sale_physical_contract sale ON ((ctr."intSaleLineId" = sale."intSaleLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||||
@@ -122,7 +126,8 @@ UNION ALL
|
|||||||
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
||||||
3 AS "intPriceGroupId",
|
3 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
'MTM'::text AS "Line Group"
|
||||||
FROM ((vw_utility_physical_mtm_definition mtm
|
FROM ((vw_utility_physical_mtm_definition mtm
|
||||||
JOIN vw_utility_dim_physical_sale_contract ctr ON ((mtm."intContractLineId" = ctr."intSaleLineId")))
|
JOIN vw_utility_dim_physical_sale_contract ctr ON ((mtm."intContractLineId" = ctr."intSaleLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||||
@@ -141,7 +146,8 @@ UNION ALL
|
|||||||
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||||
2 AS "intPriceGroupId",
|
2 AS "intPriceGroupId",
|
||||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||||
|
fees."strProductGroup" AS "Line Group"
|
||||||
FROM ((vw_utility_contract_fees fees
|
FROM ((vw_utility_contract_fees fees
|
||||||
JOIN vw_utility_dim_physical_sale_contract ctr ON ((fees."intContractLineId" = ctr."intSaleLineId")))
|
JOIN vw_utility_dim_physical_sale_contract ctr ON ((fees."intContractLineId" = ctr."intSaleLineId")))
|
||||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ CREATE OR REPLACE VIEW public.vw_utility_contract_fees AS
|
|||||||
CASE
|
CASE
|
||||||
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN '-1'::integer
|
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN '-1'::integer
|
||||||
ELSE 1
|
ELSE 1
|
||||||
END AS "dblSignMultiplier"
|
END AS "dblSignMultiplier",
|
||||||
|
CASE
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'Profit Sharing'::text
|
||||||
|
ELSE 'Other Costs'::text
|
||||||
|
END AS "strProductGroup"
|
||||||
FROM ((((fee_fee f
|
FROM ((((fee_fee f
|
||||||
JOIN currency_currency c ON ((f.currency = c.id)))
|
JOIN currency_currency c ON ((f.currency = c.id)))
|
||||||
JOIN product_product p ON ((f.product = p.id)))
|
JOIN product_product p ON ((f.product = p.id)))
|
||||||
@@ -47,7 +52,12 @@ UNION ALL
|
|||||||
CASE
|
CASE
|
||||||
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN 1
|
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN 1
|
||||||
ELSE '-1'::integer
|
ELSE '-1'::integer
|
||||||
END AS "dblSignMultiplier"
|
END AS "dblSignMultiplier",
|
||||||
|
CASE
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'Profit Sharing'::text
|
||||||
|
ELSE 'Other Costs'::text
|
||||||
|
END AS "strProductGroup"
|
||||||
FROM ((((fee_fee f
|
FROM ((((fee_fee f
|
||||||
JOIN currency_currency c ON ((f.currency = c.id)))
|
JOIN currency_currency c ON ((f.currency = c.id)))
|
||||||
JOIN product_product p ON ((f.product = p.id)))
|
JOIN product_product p ON ((f.product = p.id)))
|
||||||
|
|||||||
@@ -1,10 +1,23 @@
|
|||||||
CREATE OR REPLACE VIEW public.vw_utility_price_curve_prices AS
|
CREATE OR REPLACE VIEW public.vw_utility_price_curve_prices AS
|
||||||
|
WITH lastprice AS (
|
||||||
|
SELECT ppv_1.price,
|
||||||
|
max(ppv_1.price_date) AS max_price_date
|
||||||
|
FROM price_price_value ppv_1
|
||||||
|
WHERE (ppv_1.active = true)
|
||||||
|
GROUP BY ppv_1.price
|
||||||
|
)
|
||||||
SELECT pp.id AS "intPriceCurveId",
|
SELECT pp.id AS "intPriceCurveId",
|
||||||
ppv.price_date AS "dtmPriceDate",
|
ppv.price_date AS "dtmPriceDate",
|
||||||
(ppv.high_price)::numeric(18,6) AS "dblHighPrice",
|
(ppv.high_price)::numeric(18,6) AS "dblHighPrice",
|
||||||
(ppv.low_price)::numeric(18,6) AS "dblLowPrice",
|
(ppv.low_price)::numeric(18,6) AS "dblLowPrice",
|
||||||
(ppv.open_price)::numeric(18,6) AS "dblOpenPrice",
|
(ppv.open_price)::numeric(18,6) AS "dblOpenPrice",
|
||||||
(ppv.price_value)::numeric(18,6) AS "dblPriceValue"
|
(ppv.price_value)::numeric(18,6) AS "dblPriceValue",
|
||||||
FROM (price_price pp
|
lp.max_price_date AS "dtmMaxPriceDate",
|
||||||
|
CASE
|
||||||
|
WHEN (ppv.price_date = lp.max_price_date) THEN true
|
||||||
|
ELSE false
|
||||||
|
END AS "ysnIsLatestPrice"
|
||||||
|
FROM ((price_price pp
|
||||||
LEFT JOIN price_price_value ppv ON (((pp.id = ppv.price) AND (ppv.active = true))))
|
LEFT JOIN price_price_value ppv ON (((pp.id = ppv.price) AND (ppv.active = true))))
|
||||||
|
LEFT JOIN lastprice lp ON ((ppv.price = lp.price)))
|
||||||
WHERE ((1 = 1) AND (pp.active = true));;
|
WHERE ((1 = 1) AND (pp.active = true));;
|
||||||
|
|||||||
@@ -0,0 +1,267 @@
|
|||||||
|
CREATE OR REPLACE VIEW public.vw_utility_shipment_fee_allocation AS
|
||||||
|
WITH physical_shipment_lots AS (
|
||||||
|
SELECT l.lot_shipment_in AS shipment_id,
|
||||||
|
l.id AS lot_id,
|
||||||
|
l.lot_type,
|
||||||
|
l.line AS purchase_line_id,
|
||||||
|
l.sale_line AS sale_line_id,
|
||||||
|
qh.quantity AS shipment_quantity,
|
||||||
|
l.lot_unit_line AS shipment_unit_id
|
||||||
|
FROM (lot_lot l
|
||||||
|
LEFT JOIN lot_qt_hist qh ON (((qh.lot = l.id) AND (qh.quantity_type = l.lot_state))))
|
||||||
|
WHERE (((l.lot_type)::text = 'physic'::text) AND (l.lot_shipment_in IS NOT NULL))
|
||||||
|
), virtual_shipment_lots AS (
|
||||||
|
SELECT q.lot_shipment_in AS shipment_id,
|
||||||
|
vp.id AS lot_id,
|
||||||
|
vp.lot_type,
|
||||||
|
vp.line AS purchase_line_id,
|
||||||
|
COALESCE(vp.sale_line, ps.sale_line) AS sale_line_id,
|
||||||
|
q.lot_quantity AS shipment_quantity,
|
||||||
|
q.lot_unit AS shipment_unit_id
|
||||||
|
FROM ((lot_qt q
|
||||||
|
JOIN lot_lot vp ON (((vp.id = q.lot_p) AND ((vp.lot_type)::text = 'virtual'::text))))
|
||||||
|
LEFT JOIN lot_lot ps ON ((ps.id = q.lot_s)))
|
||||||
|
WHERE ((q.lot_shipment_in IS NOT NULL) AND (NOT (EXISTS ( SELECT 1
|
||||||
|
FROM physical_shipment_lots pl
|
||||||
|
WHERE ((pl.shipment_id = q.lot_shipment_in) AND (pl.purchase_line_id = vp.line) AND ((pl.sale_line_id = COALESCE(vp.sale_line, ps.sale_line)) OR (COALESCE(vp.sale_line, ps.sale_line) IS NULL)))))))
|
||||||
|
), shipment_lots AS (
|
||||||
|
SELECT physical_shipment_lots.shipment_id,
|
||||||
|
physical_shipment_lots.lot_id,
|
||||||
|
physical_shipment_lots.lot_type,
|
||||||
|
physical_shipment_lots.purchase_line_id,
|
||||||
|
physical_shipment_lots.sale_line_id,
|
||||||
|
physical_shipment_lots.shipment_quantity,
|
||||||
|
physical_shipment_lots.shipment_unit_id
|
||||||
|
FROM physical_shipment_lots
|
||||||
|
UNION ALL
|
||||||
|
SELECT virtual_shipment_lots.shipment_id,
|
||||||
|
virtual_shipment_lots.lot_id,
|
||||||
|
virtual_shipment_lots.lot_type,
|
||||||
|
virtual_shipment_lots.purchase_line_id,
|
||||||
|
virtual_shipment_lots.sale_line_id,
|
||||||
|
virtual_shipment_lots.shipment_quantity,
|
||||||
|
virtual_shipment_lots.shipment_unit_id
|
||||||
|
FROM virtual_shipment_lots
|
||||||
|
), shipment_context AS (
|
||||||
|
SELECT shipment_lots.shipment_id,
|
||||||
|
shipment_lots.purchase_line_id,
|
||||||
|
shipment_lots.sale_line_id,
|
||||||
|
shipment_lots.shipment_unit_id,
|
||||||
|
sum(COALESCE(shipment_lots.shipment_quantity, (0)::numeric)) AS shipment_quantity
|
||||||
|
FROM shipment_lots
|
||||||
|
WHERE (shipment_lots.shipment_id IS NOT NULL)
|
||||||
|
GROUP BY shipment_lots.shipment_id, shipment_lots.purchase_line_id, shipment_lots.sale_line_id, shipment_lots.shipment_unit_id
|
||||||
|
), shipment_base AS (
|
||||||
|
SELECT shipment_context.shipment_id,
|
||||||
|
sum(shipment_context.shipment_quantity) AS shipment_quantity
|
||||||
|
FROM shipment_context
|
||||||
|
GROUP BY shipment_context.shipment_id
|
||||||
|
), shipment_fee_candidates AS (
|
||||||
|
SELECT f_1.id AS fee_id,
|
||||||
|
'Shipment'::text AS fee_source,
|
||||||
|
f_1.type AS fee_type,
|
||||||
|
CASE
|
||||||
|
WHEN ((f_1.type)::text = 'ordered'::text) THEN 1
|
||||||
|
WHEN ((f_1.type)::text = 'scheduled'::text) THEN 2
|
||||||
|
ELSE NULL::integer
|
||||||
|
END AS priority,
|
||||||
|
sb.shipment_id,
|
||||||
|
NULL::integer AS purchase_line_id,
|
||||||
|
NULL::integer AS sale_line_id,
|
||||||
|
f_1.product AS product_id,
|
||||||
|
f_1.supplier AS supplier_id,
|
||||||
|
f_1.mode AS packaging,
|
||||||
|
f_1.p_r AS pay_or_rec,
|
||||||
|
f_1.state,
|
||||||
|
f_1.weight_type,
|
||||||
|
COALESCE(f_1.quantity, (0)::numeric) AS requested_quantity,
|
||||||
|
sb.shipment_quantity,
|
||||||
|
f_1.price AS fee_price,
|
||||||
|
f_1.currency AS currency_id,
|
||||||
|
f_1.unit AS unit_id,
|
||||||
|
CASE
|
||||||
|
WHEN (upper((f_1.p_r)::text) = 'REC'::text) THEN 1
|
||||||
|
ELSE '-1'::integer
|
||||||
|
END AS sign_multiplier
|
||||||
|
FROM (shipment_base sb
|
||||||
|
JOIN fee_fee f_1 ON ((f_1.shipment_in = sb.shipment_id)))
|
||||||
|
WHERE ((f_1.type)::text = ANY ((ARRAY['ordered'::character varying, 'scheduled'::character varying])::text[]))
|
||||||
|
), shipment_fee_allocated AS (
|
||||||
|
SELECT c.fee_id,
|
||||||
|
c.fee_source,
|
||||||
|
c.fee_type,
|
||||||
|
c.priority,
|
||||||
|
c.shipment_id,
|
||||||
|
c.purchase_line_id,
|
||||||
|
c.sale_line_id,
|
||||||
|
c.product_id,
|
||||||
|
c.supplier_id,
|
||||||
|
c.packaging,
|
||||||
|
c.pay_or_rec,
|
||||||
|
c.state,
|
||||||
|
c.weight_type,
|
||||||
|
c.requested_quantity,
|
||||||
|
c.shipment_quantity,
|
||||||
|
c.fee_price,
|
||||||
|
c.currency_id,
|
||||||
|
c.unit_id,
|
||||||
|
c.sign_multiplier,
|
||||||
|
LEAST(c.requested_quantity, GREATEST((c.shipment_quantity - COALESCE(sum(c.requested_quantity) OVER (PARTITION BY c.shipment_id, c.product_id, c.supplier_id ORDER BY c.priority, c.fee_id ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING), (0)::numeric)), (0)::numeric)) AS allocated_quantity
|
||||||
|
FROM shipment_fee_candidates c
|
||||||
|
), shipment_fee_coverage AS (
|
||||||
|
SELECT shipment_fee_allocated.shipment_id,
|
||||||
|
shipment_fee_allocated.product_id,
|
||||||
|
shipment_fee_allocated.supplier_id,
|
||||||
|
max(shipment_fee_allocated.shipment_quantity) AS shipment_quantity,
|
||||||
|
sum(shipment_fee_allocated.allocated_quantity) AS allocated_quantity
|
||||||
|
FROM shipment_fee_allocated
|
||||||
|
GROUP BY shipment_fee_allocated.shipment_id, shipment_fee_allocated.product_id, shipment_fee_allocated.supplier_id
|
||||||
|
), contract_budgeted_fee_candidates AS (
|
||||||
|
SELECT f_1.id AS fee_id,
|
||||||
|
'Purchase Contract'::text AS fee_source,
|
||||||
|
f_1.type AS fee_type,
|
||||||
|
3 AS priority,
|
||||||
|
sc.shipment_id,
|
||||||
|
sc.purchase_line_id,
|
||||||
|
NULL::integer AS sale_line_id,
|
||||||
|
f_1.product AS product_id,
|
||||||
|
f_1.supplier AS supplier_id,
|
||||||
|
f_1.mode AS packaging,
|
||||||
|
f_1.p_r AS pay_or_rec,
|
||||||
|
f_1.state,
|
||||||
|
f_1.weight_type,
|
||||||
|
sc.shipment_quantity,
|
||||||
|
f_1.price AS fee_price,
|
||||||
|
f_1.currency AS currency_id,
|
||||||
|
COALESCE(f_1.unit, sc.shipment_unit_id) AS unit_id,
|
||||||
|
CASE
|
||||||
|
WHEN (upper((f_1.p_r)::text) = 'REC'::text) THEN '-1'::integer
|
||||||
|
ELSE 1
|
||||||
|
END AS sign_multiplier
|
||||||
|
FROM (shipment_context sc
|
||||||
|
JOIN fee_fee f_1 ON ((f_1.line = sc.purchase_line_id)))
|
||||||
|
WHERE (((f_1.type)::text = 'budgeted'::text) AND (sc.purchase_line_id IS NOT NULL))
|
||||||
|
UNION ALL
|
||||||
|
SELECT f_1.id AS fee_id,
|
||||||
|
'Sale Contract'::text AS fee_source,
|
||||||
|
f_1.type AS fee_type,
|
||||||
|
3 AS priority,
|
||||||
|
sc.shipment_id,
|
||||||
|
NULL::integer AS purchase_line_id,
|
||||||
|
sc.sale_line_id,
|
||||||
|
f_1.product AS product_id,
|
||||||
|
f_1.supplier AS supplier_id,
|
||||||
|
f_1.mode AS packaging,
|
||||||
|
f_1.p_r AS pay_or_rec,
|
||||||
|
f_1.state,
|
||||||
|
f_1.weight_type,
|
||||||
|
sc.shipment_quantity,
|
||||||
|
f_1.price AS fee_price,
|
||||||
|
f_1.currency AS currency_id,
|
||||||
|
COALESCE(f_1.unit, sc.shipment_unit_id) AS unit_id,
|
||||||
|
CASE
|
||||||
|
WHEN (upper((f_1.p_r)::text) = 'REC'::text) THEN 1
|
||||||
|
ELSE '-1'::integer
|
||||||
|
END AS sign_multiplier
|
||||||
|
FROM (shipment_context sc
|
||||||
|
JOIN fee_fee f_1 ON ((f_1.sale_line = sc.sale_line_id)))
|
||||||
|
WHERE (((f_1.type)::text = 'budgeted'::text) AND (sc.sale_line_id IS NOT NULL))
|
||||||
|
), contract_budgeted_allocated AS (
|
||||||
|
SELECT c.fee_id,
|
||||||
|
c.fee_source,
|
||||||
|
c.fee_type,
|
||||||
|
c.priority,
|
||||||
|
c.shipment_id,
|
||||||
|
c.purchase_line_id,
|
||||||
|
c.sale_line_id,
|
||||||
|
c.product_id,
|
||||||
|
c.supplier_id,
|
||||||
|
c.packaging,
|
||||||
|
c.pay_or_rec,
|
||||||
|
c.state,
|
||||||
|
c.weight_type,
|
||||||
|
c.shipment_quantity,
|
||||||
|
c.fee_price,
|
||||||
|
c.currency_id,
|
||||||
|
c.unit_id,
|
||||||
|
c.sign_multiplier,
|
||||||
|
GREATEST((c.shipment_quantity - COALESCE(fc.allocated_quantity, (0)::numeric)), (0)::numeric) AS allocated_quantity
|
||||||
|
FROM (contract_budgeted_fee_candidates c
|
||||||
|
LEFT JOIN shipment_fee_coverage fc ON (((fc.shipment_id = c.shipment_id) AND (fc.product_id = c.product_id) AND (fc.supplier_id = c.supplier_id))))
|
||||||
|
), final_fees AS (
|
||||||
|
SELECT shipment_fee_allocated.fee_id,
|
||||||
|
shipment_fee_allocated.fee_source,
|
||||||
|
shipment_fee_allocated.fee_type,
|
||||||
|
shipment_fee_allocated.priority,
|
||||||
|
shipment_fee_allocated.shipment_id,
|
||||||
|
shipment_fee_allocated.purchase_line_id,
|
||||||
|
shipment_fee_allocated.sale_line_id,
|
||||||
|
shipment_fee_allocated.product_id,
|
||||||
|
shipment_fee_allocated.supplier_id,
|
||||||
|
shipment_fee_allocated.packaging,
|
||||||
|
shipment_fee_allocated.pay_or_rec,
|
||||||
|
shipment_fee_allocated.state,
|
||||||
|
shipment_fee_allocated.weight_type,
|
||||||
|
shipment_fee_allocated.allocated_quantity AS fee_quantity,
|
||||||
|
shipment_fee_allocated.fee_price,
|
||||||
|
shipment_fee_allocated.currency_id,
|
||||||
|
shipment_fee_allocated.unit_id,
|
||||||
|
shipment_fee_allocated.sign_multiplier
|
||||||
|
FROM shipment_fee_allocated
|
||||||
|
WHERE (shipment_fee_allocated.allocated_quantity > (0)::numeric)
|
||||||
|
UNION ALL
|
||||||
|
SELECT contract_budgeted_allocated.fee_id,
|
||||||
|
contract_budgeted_allocated.fee_source,
|
||||||
|
contract_budgeted_allocated.fee_type,
|
||||||
|
contract_budgeted_allocated.priority,
|
||||||
|
contract_budgeted_allocated.shipment_id,
|
||||||
|
contract_budgeted_allocated.purchase_line_id,
|
||||||
|
contract_budgeted_allocated.sale_line_id,
|
||||||
|
contract_budgeted_allocated.product_id,
|
||||||
|
contract_budgeted_allocated.supplier_id,
|
||||||
|
contract_budgeted_allocated.packaging,
|
||||||
|
contract_budgeted_allocated.pay_or_rec,
|
||||||
|
contract_budgeted_allocated.state,
|
||||||
|
contract_budgeted_allocated.weight_type,
|
||||||
|
contract_budgeted_allocated.allocated_quantity AS fee_quantity,
|
||||||
|
contract_budgeted_allocated.fee_price,
|
||||||
|
contract_budgeted_allocated.currency_id,
|
||||||
|
contract_budgeted_allocated.unit_id,
|
||||||
|
contract_budgeted_allocated.sign_multiplier
|
||||||
|
FROM contract_budgeted_allocated
|
||||||
|
WHERE (contract_budgeted_allocated.allocated_quantity > (0)::numeric)
|
||||||
|
)
|
||||||
|
SELECT f.shipment_id AS "intShipmentId",
|
||||||
|
f.fee_id AS "intFeeId",
|
||||||
|
f.fee_source AS "strFeeSource",
|
||||||
|
f.fee_type AS "strFeeType",
|
||||||
|
f.priority AS "intPriority",
|
||||||
|
f.purchase_line_id AS "intPurchaseLineId",
|
||||||
|
f.sale_line_id AS "intSaleLineId",
|
||||||
|
f.product_id AS "intProductId",
|
||||||
|
p.code AS "strFee",
|
||||||
|
f.supplier_id AS "intSupplierId",
|
||||||
|
sup.name AS "strSupplier",
|
||||||
|
f.packaging AS "strPackaging",
|
||||||
|
f.pay_or_rec AS "strPayOrRec",
|
||||||
|
f.state AS "strState",
|
||||||
|
CASE
|
||||||
|
WHEN (upper((f.weight_type)::text) = 'BRUT'::text) THEN 'Gross'::text
|
||||||
|
ELSE 'Net'::text
|
||||||
|
END AS "strWeighingType",
|
||||||
|
f.fee_quantity AS "dblQuantity",
|
||||||
|
(f.fee_price * (f.sign_multiplier)::numeric) AS "dblPrice",
|
||||||
|
cur.name AS "strCurrency",
|
||||||
|
COALESCE(uom.name, 'Mt'::character varying) AS "strUnit",
|
||||||
|
((f.fee_quantity * f.fee_price) * (f.sign_multiplier)::numeric) AS "dblAmount",
|
||||||
|
CASE
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'ProfitSharing'::text
|
||||||
|
ELSE 'OtherCosts'::text
|
||||||
|
END AS "strCostGroup"
|
||||||
|
FROM ((((final_fees f
|
||||||
|
JOIN product_product p ON ((p.id = f.product_id)))
|
||||||
|
JOIN party_party sup ON ((sup.id = f.supplier_id)))
|
||||||
|
LEFT JOIN currency_currency cur ON ((cur.id = f.currency_id)))
|
||||||
|
LEFT JOIN product_uom uom ON ((uom.id = f.unit_id)))
|
||||||
|
ORDER BY f.shipment_id, f.product_id, f.supplier_id, f.priority, f.fee_id;;
|
||||||
@@ -19,7 +19,12 @@ CREATE OR REPLACE VIEW public.vw_utility_shipment_fees AS
|
|||||||
CASE
|
CASE
|
||||||
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN 1
|
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN 1
|
||||||
ELSE '-1'::integer
|
ELSE '-1'::integer
|
||||||
END AS "dblSignMultiplier"
|
END AS "dblSignMultiplier",
|
||||||
|
CASE
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
|
||||||
|
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'Profit Sharing'::text
|
||||||
|
ELSE 'Other Costs'::text
|
||||||
|
END AS "strProductGroup"
|
||||||
FROM ((((fee_fee f
|
FROM ((((fee_fee f
|
||||||
JOIN currency_currency c ON ((f.currency = c.id)))
|
JOIN currency_currency c ON ((f.currency = c.id)))
|
||||||
JOIN product_product p ON ((f.product = p.id)))
|
JOIN product_product p ON ((f.product = p.id)))
|
||||||
|
|||||||
313
Database Backups/SQL Views/vw_utility_trade_pnl_quantities.sql
Normal file
313
Database Backups/SQL Views/vw_utility_trade_pnl_quantities.sql
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
CREATE OR REPLACE VIEW public.vw_utility_trade_pnl_quantities AS
|
||||||
|
WITH lot_current_qty AS (
|
||||||
|
SELECT l.id AS lot_id,
|
||||||
|
round(((COALESCE(lh.quantity, (0)::numeric) * (COALESCE(lot_uom.factor, (1)::double precision))::numeric) / NULLIF((COALESCE(line_uom.factor, (1)::double precision))::numeric, (0)::numeric)), 5) AS pnl_quantity,
|
||||||
|
lot_uom.name AS quantity_uom
|
||||||
|
FROM (((((lot_lot l
|
||||||
|
LEFT JOIN lot_qt_hist lh ON (((lh.lot = l.id) AND (lh.quantity_type = l.lot_state))))
|
||||||
|
LEFT JOIN product_uom lot_uom ON ((lot_uom.id = l.lot_unit_line)))
|
||||||
|
LEFT JOIN purchase_line pl ON ((pl.id = l.line)))
|
||||||
|
LEFT JOIN sale_line sl ON ((sl.id = l.sale_line)))
|
||||||
|
LEFT JOIN product_uom line_uom ON ((line_uom.id = COALESCE(pl.unit, sl.unit))))
|
||||||
|
), purchase_pnl_lots AS (
|
||||||
|
SELECT 'purchase'::text AS pnl_side,
|
||||||
|
p.id AS purchase_id,
|
||||||
|
p.number AS purchase_number,
|
||||||
|
p.reference AS purchase_reference,
|
||||||
|
pl.id AS purchase_line_id,
|
||||||
|
pl.finished AS purchase_line_finished,
|
||||||
|
NULL::integer AS sale_id,
|
||||||
|
NULL::character varying AS sale_number,
|
||||||
|
NULL::character varying AS sale_reference,
|
||||||
|
NULL::integer AS sale_line_id,
|
||||||
|
NULL::boolean AS sale_line_finished,
|
||||||
|
l.id AS valued_lot_id,
|
||||||
|
l.lot_type AS valued_lot_type,
|
||||||
|
NULL::integer AS lot_qt_id,
|
||||||
|
lcq.pnl_quantity,
|
||||||
|
lcq.quantity_uom AS quantity_unit,
|
||||||
|
pl.product AS product_id,
|
||||||
|
COALESCE(shi.from_location, sint.from_location, sho.from_location, p.from_location) AS from_location_id,
|
||||||
|
COALESCE(shi.to_location, sint.to_location, sho.to_location, p.to_location) AS to_location_id,
|
||||||
|
shi.id AS shipment_id,
|
||||||
|
shi.bl_date,
|
||||||
|
pl.from_del AS delivery_date_from,
|
||||||
|
pl.to_del AS delivery_date_to
|
||||||
|
FROM ((((((purchase_line pl
|
||||||
|
JOIN purchase_purchase p ON ((p.id = pl.purchase)))
|
||||||
|
JOIN lot_lot l ON ((l.line = pl.id)))
|
||||||
|
JOIN lot_current_qty lcq ON ((lcq.lot_id = l.id)))
|
||||||
|
LEFT JOIN stock_shipment_in shi ON ((shi.id = l.lot_shipment_in)))
|
||||||
|
LEFT JOIN stock_shipment_internal sint ON ((sint.id = l.lot_shipment_internal)))
|
||||||
|
LEFT JOIN stock_shipment_out sho ON ((sho.id = l.lot_shipment_out)))
|
||||||
|
WHERE (((pl.type)::text = 'line'::text) AND ((l.lot_type)::text = ANY (ARRAY[('virtual'::character varying)::text, ('physic'::character varying)::text])))
|
||||||
|
), sale_pnl_direct_lots AS (
|
||||||
|
SELECT 'sale'::text AS pnl_side,
|
||||||
|
p.id AS purchase_id,
|
||||||
|
p.number AS purchase_number,
|
||||||
|
p.reference AS purchase_reference,
|
||||||
|
pl.id AS purchase_line_id,
|
||||||
|
pl.finished AS purchase_line_finished,
|
||||||
|
s.id AS sale_id,
|
||||||
|
s.number AS sale_number,
|
||||||
|
s.reference AS sale_reference,
|
||||||
|
sl.id AS sale_line_id,
|
||||||
|
sl.finished AS sale_line_finished,
|
||||||
|
l.id AS valued_lot_id,
|
||||||
|
l.lot_type AS valued_lot_type,
|
||||||
|
NULL::integer AS lot_qt_id,
|
||||||
|
lcq.pnl_quantity,
|
||||||
|
lcq.quantity_uom AS quantity_unit,
|
||||||
|
sl.product AS product_id,
|
||||||
|
COALESCE(shi.from_location, sint.from_location, sho.from_location, s.from_location) AS from_location_id,
|
||||||
|
COALESCE(shi.to_location, sint.to_location, sho.to_location, s.to_location) AS to_location_id,
|
||||||
|
shi.id AS shipment_id,
|
||||||
|
shi.bl_date,
|
||||||
|
sl.from_del AS delivery_date_from,
|
||||||
|
sl.to_del AS delivery_date_to
|
||||||
|
FROM ((((((((purchase_line pl
|
||||||
|
JOIN purchase_purchase p ON ((p.id = pl.purchase)))
|
||||||
|
JOIN lot_lot l ON (((l.line = pl.id) AND (l.sale_line IS NOT NULL))))
|
||||||
|
JOIN sale_line sl ON ((sl.id = l.sale_line)))
|
||||||
|
JOIN sale_sale s ON ((s.id = sl.sale)))
|
||||||
|
JOIN lot_current_qty lcq ON ((lcq.lot_id = l.id)))
|
||||||
|
LEFT JOIN stock_shipment_in shi ON ((shi.id = l.lot_shipment_in)))
|
||||||
|
LEFT JOIN stock_shipment_internal sint ON ((sint.id = l.lot_shipment_internal)))
|
||||||
|
LEFT JOIN stock_shipment_out sho ON ((sho.id = l.lot_shipment_out)))
|
||||||
|
WHERE (((pl.type)::text = 'line'::text) AND ((l.lot_type)::text = 'physic'::text))
|
||||||
|
), sale_pnl_matched_virtual_lots AS (
|
||||||
|
SELECT 'sale'::text AS pnl_side,
|
||||||
|
p.id AS purchase_id,
|
||||||
|
p.number AS purchase_number,
|
||||||
|
p.reference AS purchase_reference,
|
||||||
|
pl.id AS purchase_line_id,
|
||||||
|
pl.finished AS purchase_line_finished,
|
||||||
|
s.id AS sale_id,
|
||||||
|
s.number AS sale_number,
|
||||||
|
s.reference AS sale_reference,
|
||||||
|
sl.id AS sale_line_id,
|
||||||
|
sl.finished AS sale_line_finished,
|
||||||
|
sale_lot.id AS valued_lot_id,
|
||||||
|
sale_lot.lot_type AS valued_lot_type,
|
||||||
|
lqt.id AS lot_qt_id,
|
||||||
|
lcq.pnl_quantity,
|
||||||
|
lcq.quantity_uom AS quantity_unit,
|
||||||
|
sl.product AS product_id,
|
||||||
|
COALESCE(shi.from_location, sint.from_location, sho.from_location, s.from_location) AS from_location_id,
|
||||||
|
COALESCE(shi.to_location, sint.to_location, sho.to_location, s.to_location) AS to_location_id,
|
||||||
|
shi.id AS shipment_id,
|
||||||
|
shi.bl_date,
|
||||||
|
sl.from_del AS delivery_date_from,
|
||||||
|
sl.to_del AS delivery_date_to
|
||||||
|
FROM ((((((((((purchase_line pl
|
||||||
|
JOIN purchase_purchase p ON ((p.id = pl.purchase)))
|
||||||
|
JOIN lot_lot purchase_lot ON (((purchase_lot.line = pl.id) AND ((purchase_lot.lot_type)::text = 'virtual'::text) AND (purchase_lot.sale_line IS NULL))))
|
||||||
|
JOIN lot_qt lqt ON (((lqt.lot_p = purchase_lot.id) AND (lqt.lot_s IS NOT NULL) AND (lqt.lot_quantity > (0)::numeric))))
|
||||||
|
JOIN lot_lot sale_lot ON (((sale_lot.id = lqt.lot_s) AND ((sale_lot.lot_type)::text = 'virtual'::text))))
|
||||||
|
JOIN sale_line sl ON ((sl.id = sale_lot.sale_line)))
|
||||||
|
JOIN sale_sale s ON ((s.id = sl.sale)))
|
||||||
|
JOIN lot_current_qty lcq ON ((lcq.lot_id = sale_lot.id)))
|
||||||
|
LEFT JOIN stock_shipment_in shi ON ((shi.id = lqt.lot_shipment_in)))
|
||||||
|
LEFT JOIN stock_shipment_internal sint ON ((sint.id = lqt.lot_shipment_internal)))
|
||||||
|
LEFT JOIN stock_shipment_out sho ON ((sho.id = lqt.lot_shipment_out)))
|
||||||
|
WHERE ((pl.type)::text = 'line'::text)
|
||||||
|
), sale_pnl_unmatched_lots AS (
|
||||||
|
SELECT 'sale'::text AS pnl_side,
|
||||||
|
NULL::integer AS purchase_id,
|
||||||
|
NULL::character varying AS purchase_number,
|
||||||
|
NULL::character varying AS purchase_reference,
|
||||||
|
NULL::integer AS purchase_line_id,
|
||||||
|
NULL::boolean AS purchase_line_finished,
|
||||||
|
s.id AS sale_id,
|
||||||
|
s.number AS sale_number,
|
||||||
|
s.reference AS sale_reference,
|
||||||
|
sl.id AS sale_line_id,
|
||||||
|
sl.finished AS sale_line_finished,
|
||||||
|
l.id AS valued_lot_id,
|
||||||
|
l.lot_type AS valued_lot_type,
|
||||||
|
NULL::integer AS lot_qt_id,
|
||||||
|
lcq.pnl_quantity,
|
||||||
|
lcq.quantity_uom AS quantity_unit,
|
||||||
|
sl.product AS product_id,
|
||||||
|
COALESCE(shi.from_location, sint.from_location, sho.from_location, s.from_location) AS from_location_id,
|
||||||
|
COALESCE(shi.to_location, sint.to_location, sho.to_location, s.to_location) AS to_location_id,
|
||||||
|
shi.id AS shipment_id,
|
||||||
|
shi.bl_date,
|
||||||
|
sl.from_del AS delivery_date_from,
|
||||||
|
sl.to_del AS delivery_date_to
|
||||||
|
FROM ((((((sale_line sl
|
||||||
|
JOIN sale_sale s ON ((s.id = sl.sale)))
|
||||||
|
JOIN lot_lot l ON (((l.sale_line = sl.id) AND (l.line IS NULL) AND ((l.lot_type)::text = ANY (ARRAY[('virtual'::character varying)::text, ('physic'::character varying)::text])))))
|
||||||
|
JOIN lot_current_qty lcq ON ((lcq.lot_id = l.id)))
|
||||||
|
LEFT JOIN stock_shipment_in shi ON ((shi.id = l.lot_shipment_in)))
|
||||||
|
LEFT JOIN stock_shipment_internal sint ON ((sint.id = l.lot_shipment_internal)))
|
||||||
|
LEFT JOIN stock_shipment_out sho ON ((sho.id = l.lot_shipment_out)))
|
||||||
|
WHERE (((sl.type)::text = 'line'::text) AND (NOT (EXISTS ( SELECT 1
|
||||||
|
FROM lot_qt lqt
|
||||||
|
WHERE ((lqt.lot_s = l.id) AND (lqt.lot_p IS NOT NULL) AND (lqt.lot_quantity > (0)::numeric))))))
|
||||||
|
), pnl_lot_rows AS (
|
||||||
|
SELECT purchase_pnl_lots.pnl_side,
|
||||||
|
purchase_pnl_lots.purchase_id,
|
||||||
|
purchase_pnl_lots.purchase_number,
|
||||||
|
purchase_pnl_lots.purchase_reference,
|
||||||
|
purchase_pnl_lots.purchase_line_id,
|
||||||
|
purchase_pnl_lots.purchase_line_finished,
|
||||||
|
purchase_pnl_lots.sale_id,
|
||||||
|
purchase_pnl_lots.sale_number,
|
||||||
|
purchase_pnl_lots.sale_reference,
|
||||||
|
purchase_pnl_lots.sale_line_id,
|
||||||
|
purchase_pnl_lots.sale_line_finished,
|
||||||
|
purchase_pnl_lots.valued_lot_id,
|
||||||
|
purchase_pnl_lots.valued_lot_type,
|
||||||
|
purchase_pnl_lots.lot_qt_id,
|
||||||
|
purchase_pnl_lots.pnl_quantity,
|
||||||
|
purchase_pnl_lots.quantity_unit,
|
||||||
|
purchase_pnl_lots.product_id,
|
||||||
|
purchase_pnl_lots.from_location_id,
|
||||||
|
purchase_pnl_lots.to_location_id,
|
||||||
|
purchase_pnl_lots.shipment_id,
|
||||||
|
purchase_pnl_lots.bl_date,
|
||||||
|
purchase_pnl_lots.delivery_date_from,
|
||||||
|
purchase_pnl_lots.delivery_date_to
|
||||||
|
FROM purchase_pnl_lots
|
||||||
|
UNION ALL
|
||||||
|
SELECT sale_pnl_direct_lots.pnl_side,
|
||||||
|
sale_pnl_direct_lots.purchase_id,
|
||||||
|
sale_pnl_direct_lots.purchase_number,
|
||||||
|
sale_pnl_direct_lots.purchase_reference,
|
||||||
|
sale_pnl_direct_lots.purchase_line_id,
|
||||||
|
sale_pnl_direct_lots.purchase_line_finished,
|
||||||
|
sale_pnl_direct_lots.sale_id,
|
||||||
|
sale_pnl_direct_lots.sale_number,
|
||||||
|
sale_pnl_direct_lots.sale_reference,
|
||||||
|
sale_pnl_direct_lots.sale_line_id,
|
||||||
|
sale_pnl_direct_lots.sale_line_finished,
|
||||||
|
sale_pnl_direct_lots.valued_lot_id,
|
||||||
|
sale_pnl_direct_lots.valued_lot_type,
|
||||||
|
sale_pnl_direct_lots.lot_qt_id,
|
||||||
|
sale_pnl_direct_lots.pnl_quantity,
|
||||||
|
sale_pnl_direct_lots.quantity_unit,
|
||||||
|
sale_pnl_direct_lots.product_id,
|
||||||
|
sale_pnl_direct_lots.from_location_id,
|
||||||
|
sale_pnl_direct_lots.to_location_id,
|
||||||
|
sale_pnl_direct_lots.shipment_id,
|
||||||
|
sale_pnl_direct_lots.bl_date,
|
||||||
|
sale_pnl_direct_lots.delivery_date_from,
|
||||||
|
sale_pnl_direct_lots.delivery_date_to
|
||||||
|
FROM sale_pnl_direct_lots
|
||||||
|
UNION ALL
|
||||||
|
SELECT sale_pnl_matched_virtual_lots.pnl_side,
|
||||||
|
sale_pnl_matched_virtual_lots.purchase_id,
|
||||||
|
sale_pnl_matched_virtual_lots.purchase_number,
|
||||||
|
sale_pnl_matched_virtual_lots.purchase_reference,
|
||||||
|
sale_pnl_matched_virtual_lots.purchase_line_id,
|
||||||
|
sale_pnl_matched_virtual_lots.purchase_line_finished,
|
||||||
|
sale_pnl_matched_virtual_lots.sale_id,
|
||||||
|
sale_pnl_matched_virtual_lots.sale_number,
|
||||||
|
sale_pnl_matched_virtual_lots.sale_reference,
|
||||||
|
sale_pnl_matched_virtual_lots.sale_line_id,
|
||||||
|
sale_pnl_matched_virtual_lots.sale_line_finished,
|
||||||
|
sale_pnl_matched_virtual_lots.valued_lot_id,
|
||||||
|
sale_pnl_matched_virtual_lots.valued_lot_type,
|
||||||
|
sale_pnl_matched_virtual_lots.lot_qt_id,
|
||||||
|
sale_pnl_matched_virtual_lots.pnl_quantity,
|
||||||
|
sale_pnl_matched_virtual_lots.quantity_unit,
|
||||||
|
sale_pnl_matched_virtual_lots.product_id,
|
||||||
|
sale_pnl_matched_virtual_lots.from_location_id,
|
||||||
|
sale_pnl_matched_virtual_lots.to_location_id,
|
||||||
|
sale_pnl_matched_virtual_lots.shipment_id,
|
||||||
|
sale_pnl_matched_virtual_lots.bl_date,
|
||||||
|
sale_pnl_matched_virtual_lots.delivery_date_from,
|
||||||
|
sale_pnl_matched_virtual_lots.delivery_date_to
|
||||||
|
FROM sale_pnl_matched_virtual_lots
|
||||||
|
UNION ALL
|
||||||
|
SELECT sale_pnl_unmatched_lots.pnl_side,
|
||||||
|
sale_pnl_unmatched_lots.purchase_id,
|
||||||
|
sale_pnl_unmatched_lots.purchase_number,
|
||||||
|
sale_pnl_unmatched_lots.purchase_reference,
|
||||||
|
sale_pnl_unmatched_lots.purchase_line_id,
|
||||||
|
sale_pnl_unmatched_lots.purchase_line_finished,
|
||||||
|
sale_pnl_unmatched_lots.sale_id,
|
||||||
|
sale_pnl_unmatched_lots.sale_number,
|
||||||
|
sale_pnl_unmatched_lots.sale_reference,
|
||||||
|
sale_pnl_unmatched_lots.sale_line_id,
|
||||||
|
sale_pnl_unmatched_lots.sale_line_finished,
|
||||||
|
sale_pnl_unmatched_lots.valued_lot_id,
|
||||||
|
sale_pnl_unmatched_lots.valued_lot_type,
|
||||||
|
sale_pnl_unmatched_lots.lot_qt_id,
|
||||||
|
sale_pnl_unmatched_lots.pnl_quantity,
|
||||||
|
sale_pnl_unmatched_lots.quantity_unit,
|
||||||
|
sale_pnl_unmatched_lots.product_id,
|
||||||
|
sale_pnl_unmatched_lots.from_location_id,
|
||||||
|
sale_pnl_unmatched_lots.to_location_id,
|
||||||
|
sale_pnl_unmatched_lots.shipment_id,
|
||||||
|
sale_pnl_unmatched_lots.bl_date,
|
||||||
|
sale_pnl_unmatched_lots.delivery_date_from,
|
||||||
|
sale_pnl_unmatched_lots.delivery_date_to
|
||||||
|
FROM sale_pnl_unmatched_lots
|
||||||
|
), pnl_lot_rows_with_finished AS (
|
||||||
|
SELECT pnl_lot_rows.pnl_side,
|
||||||
|
pnl_lot_rows.purchase_id,
|
||||||
|
pnl_lot_rows.purchase_number,
|
||||||
|
pnl_lot_rows.purchase_reference,
|
||||||
|
pnl_lot_rows.purchase_line_id,
|
||||||
|
pnl_lot_rows.purchase_line_finished,
|
||||||
|
pnl_lot_rows.sale_id,
|
||||||
|
pnl_lot_rows.sale_number,
|
||||||
|
pnl_lot_rows.sale_reference,
|
||||||
|
pnl_lot_rows.sale_line_id,
|
||||||
|
pnl_lot_rows.sale_line_finished,
|
||||||
|
pnl_lot_rows.valued_lot_id,
|
||||||
|
pnl_lot_rows.valued_lot_type,
|
||||||
|
pnl_lot_rows.lot_qt_id,
|
||||||
|
pnl_lot_rows.pnl_quantity,
|
||||||
|
pnl_lot_rows.quantity_unit,
|
||||||
|
pnl_lot_rows.product_id,
|
||||||
|
pnl_lot_rows.from_location_id,
|
||||||
|
pnl_lot_rows.to_location_id,
|
||||||
|
pnl_lot_rows.shipment_id,
|
||||||
|
pnl_lot_rows.bl_date,
|
||||||
|
pnl_lot_rows.delivery_date_from,
|
||||||
|
pnl_lot_rows.delivery_date_to,
|
||||||
|
CASE
|
||||||
|
WHEN (pnl_lot_rows.pnl_side = 'purchase'::text) THEN pnl_lot_rows.purchase_line_finished
|
||||||
|
WHEN (pnl_lot_rows.pnl_side = 'sale'::text) THEN pnl_lot_rows.sale_line_finished
|
||||||
|
ELSE false
|
||||||
|
END AS valued_line_finished,
|
||||||
|
CASE
|
||||||
|
WHEN (((pnl_lot_rows.valued_lot_type)::text = 'virtual'::text) AND (((pnl_lot_rows.pnl_side = 'purchase'::text) AND (pnl_lot_rows.purchase_line_finished IS TRUE)) OR ((pnl_lot_rows.pnl_side = 'sale'::text) AND (pnl_lot_rows.sale_line_finished IS TRUE)))) THEN true
|
||||||
|
ELSE false
|
||||||
|
END AS ignored_by_finished_rule
|
||||||
|
FROM pnl_lot_rows
|
||||||
|
)
|
||||||
|
SELECT pnl_side,
|
||||||
|
purchase_id,
|
||||||
|
purchase_number,
|
||||||
|
purchase_reference,
|
||||||
|
purchase_line_id,
|
||||||
|
purchase_line_finished,
|
||||||
|
sale_id,
|
||||||
|
sale_number,
|
||||||
|
sale_reference,
|
||||||
|
sale_line_id,
|
||||||
|
sale_line_finished,
|
||||||
|
valued_lot_id,
|
||||||
|
valued_lot_type,
|
||||||
|
valued_line_finished,
|
||||||
|
ignored_by_finished_rule,
|
||||||
|
sum(pnl_quantity) AS pnl_quantity_raw,
|
||||||
|
sum(
|
||||||
|
CASE
|
||||||
|
WHEN ignored_by_finished_rule THEN (0)::numeric
|
||||||
|
ELSE pnl_quantity
|
||||||
|
END) AS pnl_quantity_after_finished_rule,
|
||||||
|
quantity_unit,
|
||||||
|
product_id,
|
||||||
|
from_location_id,
|
||||||
|
to_location_id,
|
||||||
|
shipment_id,
|
||||||
|
bl_date,
|
||||||
|
delivery_date_from,
|
||||||
|
delivery_date_to
|
||||||
|
FROM pnl_lot_rows_with_finished
|
||||||
|
GROUP BY pnl_side, purchase_id, purchase_number, purchase_reference, purchase_line_id, purchase_line_finished, sale_id, sale_number, sale_reference, sale_line_id, sale_line_finished, valued_lot_type, valued_lot_id, valued_line_finished, ignored_by_finished_rule, quantity_unit, product_id, from_location_id, to_location_id, shipment_id, bl_date, delivery_date_from, delivery_date_to;;
|
||||||
@@ -1024,3 +1024,74 @@ AND (B.Description LIKE '%2025%' OR B.Description LIKE '%2026%')
|
|||||||
--AND D.Reference = 2097
|
--AND D.Reference = 2097
|
||||||
ORDER BY 1,2
|
ORDER BY 1,2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Run that script to generate CSV for price_curve MTM used in physical contract in 2025 and 2026
|
||||||
|
SELECT DISTINCT
|
||||||
|
CONCAT(
|
||||||
|
ISNULL(S.Description, '') , ' ' ,
|
||||||
|
M.MaturityYear , '-',
|
||||||
|
RIGHT(CONCAT('0', M.MaturityPeriod),2)
|
||||||
|
)AS price_index,
|
||||||
|
Q.QuoteDate AS price_date,
|
||||||
|
Q.Value AS high_price,
|
||||||
|
Q.Value AS low_price,
|
||||||
|
Q.Value AS open_price,
|
||||||
|
Q.Value AS price_value
|
||||||
|
FROM dbo.ExpenseRevenue AS ERMtM
|
||||||
|
INNER JOIN dbo.Deal AS D ON ERMtM.DealId = D.Id
|
||||||
|
INNER JOIN dbo.PriceFormulaElement AS PFEMtM ON PFEMtM.ExpenseRevenueId = ERMtM.Id AND PFEMtM.FormulaType <> 'Adjustment'
|
||||||
|
INNER JOIN price.Maturity AS M ON PFEMtM.MaturityId = M.Id
|
||||||
|
INNER JOIN price.Symbol AS S ON M.SymbolId = S.Id
|
||||||
|
INNER JOIN dbo.Book AS B ON D.BookId = B.Id
|
||||||
|
LEFT JOIN price.Quote AS Q ON M.Id = Q.MaturityId
|
||||||
|
WHERE 1=1
|
||||||
|
AND ERMtM.FormulaGroup = 2
|
||||||
|
AND PFEMtM.FormulaType LIKE 'MtM%'
|
||||||
|
AND S.Description LIKE 'Freight%'
|
||||||
|
AND (B.Description LIKE '%2026%')
|
||||||
|
ORDER BY 1,2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Run that script to generate CSV for price_curve MTM used in physical contract in 2025 and 2026
|
||||||
|
SELECT DISTINCT
|
||||||
|
D.Reference,
|
||||||
|
PFEMtM.FormulaType,
|
||||||
|
CONCAT(
|
||||||
|
ISNULL(S.Description, '') , ' ' ,
|
||||||
|
M.MaturityYear , '-',
|
||||||
|
RIGHT(CONCAT('0', M.MaturityPeriod),2)
|
||||||
|
)AS price_index,
|
||||||
|
--Q.QuoteDate AS price_date,
|
||||||
|
--Q.Value AS high_price,
|
||||||
|
--Q.Value AS low_price,
|
||||||
|
--Q.Value AS open_price,
|
||||||
|
--Q.Value AS price_value,
|
||||||
|
|
||||||
|
PFEMtM.FirstDate,
|
||||||
|
PFEMtM.LastDate,
|
||||||
|
PFEMtM.TriggerDate,
|
||||||
|
PFEMtM.NbDaysBefore,
|
||||||
|
PFEMtM.NbDaysAfter,
|
||||||
|
|
||||||
|
PFEMtM.*
|
||||||
|
FROM dbo.ExpenseRevenue AS ERMtM
|
||||||
|
INNER JOIN dbo.Deal AS D ON ERMtM.DealId = D.Id
|
||||||
|
INNER JOIN dbo.PriceFormulaElement AS PFEMtM ON PFEMtM.ExpenseRevenueId = ERMtM.Id AND PFEMtM.FormulaType <> 'Adjustment'
|
||||||
|
INNER JOIN price.Maturity AS M ON PFEMtM.MaturityId = M.Id
|
||||||
|
INNER JOIN price.Symbol AS S ON M.SymbolId = S.Id
|
||||||
|
INNER JOIN dbo.Book AS B ON D.BookId = B.Id
|
||||||
|
LEFT JOIN price.Quote AS Q ON M.Id = Q.MaturityId
|
||||||
|
WHERE 1=1
|
||||||
|
--AND ERMtM.FormulaGroup = 1
|
||||||
|
--AND PFEMtM.FormulaType NOT LIKE 'MtM%'
|
||||||
|
--AND S.Description NOT LIKE 'Freight%'
|
||||||
|
--AND S.Description NOT LIKE 'Discount%'
|
||||||
|
--AND S.Description NOT LIKE 'BAF%'
|
||||||
|
AND (B.Description LIKE '%2026%')
|
||||||
|
--AND D.Reference = 2097
|
||||||
|
ORDER BY 1,2
|
||||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ PURCHASE_FEES_CSV = 'Reference Data\python_project\loaders\Purchase_Fees 2.csv'
|
|||||||
SALE_CONTRACTS_CSV = 'Reference Data\python_project\loaders\Sale_Contracts_with_mapping.csv'
|
SALE_CONTRACTS_CSV = 'Reference Data\python_project\loaders\Sale_Contracts_with_mapping.csv'
|
||||||
SALE_FEES_CSV = 'Reference Data\python_project\loaders\sale_fees.csv'
|
SALE_FEES_CSV = 'Reference Data\python_project\loaders\sale_fees.csv'
|
||||||
PRICES_CSV = 'Reference Data\python_project\loaders\Prices.csv'
|
PRICES_CSV = 'Reference Data\python_project\loaders\Prices.csv'
|
||||||
|
PRICE_INDEXES_CSV = 'Reference Data\python_project\loaders\Price_Indexes.csv'
|
||||||
|
|
||||||
|
|
||||||
# XML-RPC Configuration (for Proteus interaction)
|
# XML-RPC Configuration (for Proteus interaction)
|
||||||
|
|||||||
@@ -643,6 +643,56 @@ def ensure_party_is_supplier(party, auto_enable=True):
|
|||||||
print(f" Please manually add SUPPLIER category to '{party.rec_name}' in Tryton UI")
|
print(f" Please manually add SUPPLIER category to '{party.rec_name}' in Tryton UI")
|
||||||
return party, False
|
return party, False
|
||||||
|
|
||||||
|
def ensure_party_has_category(party, category_name, auto_enable=True):
|
||||||
|
"""Ensure a party has a given category by name, optionally creating the category and adding it."""
|
||||||
|
if not party:
|
||||||
|
return party, False
|
||||||
|
|
||||||
|
Category = Model.get('party.category')
|
||||||
|
|
||||||
|
# Find or create the category
|
||||||
|
categories = Category.find([('name', '=', category_name)])
|
||||||
|
if not categories:
|
||||||
|
all_cats = Category.find([])
|
||||||
|
categories = [c for c in all_cats if c.name.upper() == category_name.upper()]
|
||||||
|
|
||||||
|
if not categories:
|
||||||
|
if not auto_enable:
|
||||||
|
print(f" ⚠ Category '{category_name}' not found in the system")
|
||||||
|
return party, False
|
||||||
|
# Create the category
|
||||||
|
try:
|
||||||
|
new_cat = Category()
|
||||||
|
new_cat.name = category_name
|
||||||
|
new_cat.save()
|
||||||
|
categories = [new_cat]
|
||||||
|
print(f" ✓ Category '{category_name}' created")
|
||||||
|
except Exception as e:
|
||||||
|
print(f" ✗ Could not create category '{category_name}': {e}")
|
||||||
|
return party, False
|
||||||
|
|
||||||
|
category = categories[0]
|
||||||
|
|
||||||
|
# Check if party already has the category
|
||||||
|
if hasattr(party, 'categories') and party.categories:
|
||||||
|
for cat in party.categories:
|
||||||
|
if cat.id == category.id:
|
||||||
|
return party, True
|
||||||
|
|
||||||
|
if not auto_enable:
|
||||||
|
print(f" ⚠ Party '{party.rec_name}' does not have '{category_name}' category")
|
||||||
|
return party, False
|
||||||
|
|
||||||
|
try:
|
||||||
|
party.categories.append(category)
|
||||||
|
party.save()
|
||||||
|
print(f" ✓ '{category_name}' category added to party '{party.rec_name}'")
|
||||||
|
return party, True
|
||||||
|
except Exception as e:
|
||||||
|
print(f" ✗ Could not add '{category_name}' category to '{party.rec_name}': {e}")
|
||||||
|
return party, False
|
||||||
|
|
||||||
|
|
||||||
#===================================== Client Functions =====================================
|
#===================================== Client Functions =====================================
|
||||||
|
|
||||||
def find_client_category():
|
def find_client_category():
|
||||||
|
|||||||
568
Reference Data/python_project/loaders/Price_Indexes.csv
Normal file
568
Reference Data/python_project/loaders/Price_Indexes.csv
Normal file
@@ -0,0 +1,568 @@
|
|||||||
|
price_index,price_desc,price_currency,price_curve_type,price_type,price_unit,active,pricing_period_label
|
||||||
|
BAF Thailand 2026-01,BAF Thailand 2026-01,1,future,1,37,TRUE,JAN26
|
||||||
|
BAF Thailand 2026-06,BAF Thailand 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
BAF Thailand 2026-07,BAF Thailand 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
BAF Thailand 2026-08,BAF Thailand 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
BAF Thailand 2026-09,BAF Thailand 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
BAF Thailand 2026-10,BAF Thailand 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
BAF Thailand 2026-11,BAF Thailand 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
BAF Thailand 2026-12,BAF Thailand 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
BAF Thailand 2027-01,BAF Thailand 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
BAF Thailand 2027-02,BAF Thailand 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
BAF Thailand 2027-03,BAF Thailand 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
BAF Thailand 2027-04,BAF Thailand 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
BAF Thailand 2027-05,BAF Thailand 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Brasil 2026-06,CFR Brasil 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Brasil 2026-07,CFR Brasil 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Brasil 2026-08,CFR Brasil 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Brasil 2026-09,CFR Brasil 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Brasil 2026-10,CFR Brasil 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Brasil 2026-11,CFR Brasil 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Brasil 2026-12,CFR Brasil 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Brasil 2027-01,CFR Brasil 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Brasil 2027-02,CFR Brasil 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Brasil 2027-03,CFR Brasil 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Brasil 2027-04,CFR Brasil 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Brasil 2027-05,CFR Brasil 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Chile 2026-06,CFR Chile 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Chile 2026-07,CFR Chile 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Chile 2026-08,CFR Chile 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Chile 2026-09,CFR Chile 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Chile 2026-10,CFR Chile 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Chile 2026-11,CFR Chile 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Chile 2026-12,CFR Chile 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Chile 2027-01,CFR Chile 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Chile 2027-02,CFR Chile 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Chile 2027-03,CFR Chile 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Chile 2027-04,CFR Chile 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Chile 2027-05,CFR Chile 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR CIL Formula 2026-06,CFR CIL Formula 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR CIL Formula 2026-07,CFR CIL Formula 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR CIL Formula 2026-08,CFR CIL Formula 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR CIL Formula 2026-09,CFR CIL Formula 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR CIL Formula 2026-10,CFR CIL Formula 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR CIL Formula 2026-11,CFR CIL Formula 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR CIL Formula 2026-12,CFR CIL Formula 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR CIL Formula 2027-01,CFR CIL Formula 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR CIL Formula 2027-02,CFR CIL Formula 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR CIL Formula 2027-03,CFR CIL Formula 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR CIL Formula 2027-04,CFR CIL Formula 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR CIL Formula 2027-05,CFR CIL Formula 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Gladstone 2026-06,CFR Gladstone 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Gladstone 2026-07,CFR Gladstone 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Gladstone 2026-08,CFR Gladstone 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Gladstone 2026-09,CFR Gladstone 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Gladstone 2026-10,CFR Gladstone 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Gladstone 2026-11,CFR Gladstone 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Gladstone 2026-12,CFR Gladstone 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Gladstone 2027-01,CFR Gladstone 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Gladstone 2027-02,CFR Gladstone 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Gladstone 2027-03,CFR Gladstone 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Gladstone 2027-04,CFR Gladstone 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Gladstone 2027-05,CFR Gladstone 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR IFFCO Formula 2026-06,CFR IFFCO Formula 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR IFFCO Formula 2026-07,CFR IFFCO Formula 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR IFFCO Formula 2026-08,CFR IFFCO Formula 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR IFFCO Formula 2026-09,CFR IFFCO Formula 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR IFFCO Formula 2026-10,CFR IFFCO Formula 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR IFFCO Formula 2026-11,CFR IFFCO Formula 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR IFFCO Formula 2026-12,CFR IFFCO Formula 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR IFFCO Formula 2027-01,CFR IFFCO Formula 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR IFFCO Formula 2027-02,CFR IFFCO Formula 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR IFFCO Formula 2027-03,CFR IFFCO Formula 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR IFFCO Formula 2027-04,CFR IFFCO Formula 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR IFFCO Formula 2027-05,CFR IFFCO Formula 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR India 2026-06,CFR India 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR India 2026-07,CFR India 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR India 2026-08,CFR India 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR India 2026-09,CFR India 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR India 2026-10,CFR India 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR India 2026-11,CFR India 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR India 2026-12,CFR India 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR India 2027-01,CFR India 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR India 2027-02,CFR India 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR India 2027-03,CFR India 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR India 2027-04,CFR India 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR India 2027-05,CFR India 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR KZ Formula Chile 2026-06,CFR KZ Formula Chile 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR KZ Formula Chile 2026-07,CFR KZ Formula Chile 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR KZ Formula Chile 2026-08,CFR KZ Formula Chile 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR KZ Formula Chile 2026-09,CFR KZ Formula Chile 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR KZ Formula Chile 2026-10,CFR KZ Formula Chile 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR KZ Formula Chile 2026-11,CFR KZ Formula Chile 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR KZ Formula Chile 2026-12,CFR KZ Formula Chile 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR KZ Formula Chile 2027-01,CFR KZ Formula Chile 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR KZ Formula Chile 2027-02,CFR KZ Formula Chile 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR KZ Formula Chile 2027-03,CFR KZ Formula Chile 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR KZ Formula Chile 2027-04,CFR KZ Formula Chile 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR KZ Formula Chile 2027-05,CFR KZ Formula Chile 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR KZ Formula East Coast India 2026-06,CFR KZ Formula East Coast India 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR KZ Formula East Coast India 2026-07,CFR KZ Formula East Coast India 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR KZ Formula East Coast India 2026-08,CFR KZ Formula East Coast India 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR KZ Formula East Coast India 2026-09,CFR KZ Formula East Coast India 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR KZ Formula East Coast India 2026-10,CFR KZ Formula East Coast India 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR KZ Formula East Coast India 2026-11,CFR KZ Formula East Coast India 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR KZ Formula East Coast India 2026-12,CFR KZ Formula East Coast India 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR KZ Formula East Coast India 2027-01,CFR KZ Formula East Coast India 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR KZ Formula East Coast India 2027-02,CFR KZ Formula East Coast India 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR KZ Formula East Coast India 2027-03,CFR KZ Formula East Coast India 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR KZ Formula East Coast India 2027-04,CFR KZ Formula East Coast India 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR KZ Formula East Coast India 2027-05,CFR KZ Formula East Coast India 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR KZ Formula US Gulf 2026-06,CFR KZ Formula US Gulf 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR KZ Formula US Gulf 2026-07,CFR KZ Formula US Gulf 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR KZ Formula US Gulf 2026-08,CFR KZ Formula US Gulf 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR KZ Formula US Gulf 2026-09,CFR KZ Formula US Gulf 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR KZ Formula US Gulf 2026-10,CFR KZ Formula US Gulf 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR KZ Formula US Gulf 2026-11,CFR KZ Formula US Gulf 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR KZ Formula US Gulf 2026-12,CFR KZ Formula US Gulf 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR KZ Formula US Gulf 2027-01,CFR KZ Formula US Gulf 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR KZ Formula US Gulf 2027-02,CFR KZ Formula US Gulf 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR KZ Formula US Gulf 2027-03,CFR KZ Formula US Gulf 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR KZ Formula US Gulf 2027-04,CFR KZ Formula US Gulf 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR KZ Formula US Gulf 2027-05,CFR KZ Formula US Gulf 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR KZ Formula US West Coast 2026-06,CFR KZ Formula US West Coast 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR KZ Formula US West Coast 2026-07,CFR KZ Formula US West Coast 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR KZ Formula US West Coast 2026-08,CFR KZ Formula US West Coast 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR KZ Formula US West Coast 2026-09,CFR KZ Formula US West Coast 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR KZ Formula US West Coast 2026-10,CFR KZ Formula US West Coast 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR KZ Formula US West Coast 2026-11,CFR KZ Formula US West Coast 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR KZ Formula US West Coast 2026-12,CFR KZ Formula US West Coast 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR KZ Formula US West Coast 2027-01,CFR KZ Formula US West Coast 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR KZ Formula US West Coast 2027-02,CFR KZ Formula US West Coast 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR KZ Formula US West Coast 2027-03,CFR KZ Formula US West Coast 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR KZ Formula US West Coast 2027-04,CFR KZ Formula US West Coast 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR KZ Formula US West Coast 2027-05,CFR KZ Formula US West Coast 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR LXML Fixed price 2026-06,CFR LXML Fixed price 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR LXML Fixed price 2026-07,CFR LXML Fixed price 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR LXML Fixed price 2026-08,CFR LXML Fixed price 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR LXML Fixed price 2026-09,CFR LXML Fixed price 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR LXML Fixed price 2026-10,CFR LXML Fixed price 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR LXML Fixed price 2026-11,CFR LXML Fixed price 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR LXML Fixed price 2026-12,CFR LXML Fixed price 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR LXML Fixed price 2027-01,CFR LXML Fixed price 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR LXML Fixed price 2027-02,CFR LXML Fixed price 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR LXML Fixed price 2027-03,CFR LXML Fixed price 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR LXML Fixed price 2027-04,CFR LXML Fixed price 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR LXML Fixed price 2027-05,CFR LXML Fixed price 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Mahachai 2026-06,CFR Mahachai 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Mahachai 2026-07,CFR Mahachai 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Mahachai 2026-08,CFR Mahachai 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Mahachai 2026-09,CFR Mahachai 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Mahachai 2026-10,CFR Mahachai 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Mahachai 2026-11,CFR Mahachai 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Mahachai 2026-12,CFR Mahachai 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Mahachai 2027-01,CFR Mahachai 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Mahachai 2027-02,CFR Mahachai 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Mahachai 2027-03,CFR Mahachai 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Mahachai 2027-04,CFR Mahachai 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Mahachai 2027-05,CFR Mahachai 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Prommitr 2026-05,CFR Prommitr 2026-05,1,future,1,37,TRUE,MAY26
|
||||||
|
CFR Prommitr 2026-06,CFR Prommitr 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Prommitr 2026-07,CFR Prommitr 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Prommitr 2026-08,CFR Prommitr 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Prommitr 2026-09,CFR Prommitr 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Prommitr 2026-10,CFR Prommitr 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Prommitr 2026-11,CFR Prommitr 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Prommitr 2026-12,CFR Prommitr 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Prommitr 2027-01,CFR Prommitr 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Prommitr 2027-02,CFR Prommitr 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Prommitr 2027-03,CFR Prommitr 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Prommitr 2027-04,CFR Prommitr 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Prommitr 2027-05,CFR Prommitr 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR SEA 2026-06,CFR SEA 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR SEA 2026-07,CFR SEA 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR SEA 2026-08,CFR SEA 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR SEA 2026-09,CFR SEA 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR SEA 2026-10,CFR SEA 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR SEA 2026-11,CFR SEA 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR SEA 2026-12,CFR SEA 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR SEA 2027-01,CFR SEA 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR SEA 2027-02,CFR SEA 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR SEA 2027-03,CFR SEA 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR SEA 2027-04,CFR SEA 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR SEA 2027-05,CFR SEA 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Stockton 2026-06,CFR Stockton 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Stockton 2026-07,CFR Stockton 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Stockton 2026-08,CFR Stockton 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Stockton 2026-09,CFR Stockton 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Stockton 2026-10,CFR Stockton 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Stockton 2026-11,CFR Stockton 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Stockton 2026-12,CFR Stockton 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Stockton 2027-01,CFR Stockton 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Stockton 2027-02,CFR Stockton 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Stockton 2027-03,CFR Stockton 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Stockton 2027-04,CFR Stockton 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Stockton 2027-05,CFR Stockton 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Stockton fixed margin 2026-06,CFR Stockton fixed margin 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Stockton fixed margin 2026-07,CFR Stockton fixed margin 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Stockton fixed margin 2026-08,CFR Stockton fixed margin 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Stockton fixed margin 2026-09,CFR Stockton fixed margin 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Stockton fixed margin 2026-10,CFR Stockton fixed margin 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Stockton fixed margin 2026-11,CFR Stockton fixed margin 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Stockton fixed margin 2026-12,CFR Stockton fixed margin 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Stockton fixed margin 2027-01,CFR Stockton fixed margin 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Stockton fixed margin 2027-02,CFR Stockton fixed margin 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Stockton fixed margin 2027-03,CFR Stockton fixed margin 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Stockton fixed margin 2027-04,CFR Stockton fixed margin 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Stockton fixed margin 2027-05,CFR Stockton fixed margin 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-06,CFR Tampa based on AC + 3 commission ITSA 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-07,CFR Tampa based on AC + 3 commission ITSA 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-08,CFR Tampa based on AC + 3 commission ITSA 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-09,CFR Tampa based on AC + 3 commission ITSA 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-10,CFR Tampa based on AC + 3 commission ITSA 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-11,CFR Tampa based on AC + 3 commission ITSA 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2026-12,CFR Tampa based on AC + 3 commission ITSA 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2027-01,CFR Tampa based on AC + 3 commission ITSA 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2027-02,CFR Tampa based on AC + 3 commission ITSA 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2027-03,CFR Tampa based on AC + 3 commission ITSA 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2027-04,CFR Tampa based on AC + 3 commission ITSA 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Tampa based on AC + 3 commission ITSA 2027-05,CFR Tampa based on AC + 3 commission ITSA 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-06,CFR Tampa based on Boliden + 3 commission ITSA 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-07,CFR Tampa based on Boliden + 3 commission ITSA 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-08,CFR Tampa based on Boliden + 3 commission ITSA 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-09,CFR Tampa based on Boliden + 3 commission ITSA 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-10,CFR Tampa based on Boliden + 3 commission ITSA 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-11,CFR Tampa based on Boliden + 3 commission ITSA 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2026-12,CFR Tampa based on Boliden + 3 commission ITSA 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2027-01,CFR Tampa based on Boliden + 3 commission ITSA 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2027-02,CFR Tampa based on Boliden + 3 commission ITSA 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2027-03,CFR Tampa based on Boliden + 3 commission ITSA 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2027-04,CFR Tampa based on Boliden + 3 commission ITSA 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Tampa based on Boliden + 3 commission ITSA 2027-05,CFR Tampa based on Boliden + 3 commission ITSA 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Turkey 2026-06,CFR Turkey 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Turkey 2026-07,CFR Turkey 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Turkey 2026-08,CFR Turkey 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Turkey 2026-09,CFR Turkey 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Turkey 2026-10,CFR Turkey 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Turkey 2026-11,CFR Turkey 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Turkey 2026-12,CFR Turkey 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Turkey 2027-01,CFR Turkey 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Turkey 2027-02,CFR Turkey 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Turkey 2027-03,CFR Turkey 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Turkey 2027-04,CFR Turkey 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Turkey 2027-05,CFR Turkey 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR Ucha 2026-06,CFR Ucha 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR Ucha 2026-07,CFR Ucha 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR Ucha 2026-08,CFR Ucha 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR Ucha 2026-09,CFR Ucha 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR Ucha 2026-10,CFR Ucha 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR Ucha 2026-11,CFR Ucha 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR Ucha 2026-12,CFR Ucha 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR Ucha 2027-01,CFR Ucha 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR Ucha 2027-02,CFR Ucha 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR Ucha 2027-03,CFR Ucha 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR Ucha 2027-04,CFR Ucha 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR Ucha 2027-05,CFR Ucha 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CFR US Gulf 2026-06,CFR US Gulf 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CFR US Gulf 2026-07,CFR US Gulf 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CFR US Gulf 2026-08,CFR US Gulf 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CFR US Gulf 2026-09,CFR US Gulf 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CFR US Gulf 2026-10,CFR US Gulf 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CFR US Gulf 2026-11,CFR US Gulf 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CFR US Gulf 2026-12,CFR US Gulf 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CFR US Gulf 2027-01,CFR US Gulf 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CFR US Gulf 2027-02,CFR US Gulf 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CFR US Gulf 2027-03,CFR US Gulf 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CFR US Gulf 2027-04,CFR US Gulf 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CFR US Gulf 2027-05,CFR US Gulf 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
CIF PTTAC 2026-06,CIF PTTAC 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
CIF PTTAC 2026-07,CIF PTTAC 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
CIF PTTAC 2026-08,CIF PTTAC 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
CIF PTTAC 2026-09,CIF PTTAC 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
CIF PTTAC 2026-10,CIF PTTAC 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
CIF PTTAC 2026-11,CIF PTTAC 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
CIF PTTAC 2026-12,CIF PTTAC 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
CIF PTTAC 2027-01,CIF PTTAC 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
CIF PTTAC 2027-02,CIF PTTAC 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
CIF PTTAC 2027-03,CIF PTTAC 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
CIF PTTAC 2027-04,CIF PTTAC 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
CIF PTTAC 2027-05,CIF PTTAC 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Discount FOB MMC Thailand 2026-06,Discount FOB MMC Thailand 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Discount FOB MMC Thailand 2026-07,Discount FOB MMC Thailand 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Discount FOB MMC Thailand 2026-08,Discount FOB MMC Thailand 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Discount FOB MMC Thailand 2026-09,Discount FOB MMC Thailand 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Discount FOB MMC Thailand 2026-10,Discount FOB MMC Thailand 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Discount FOB MMC Thailand 2026-11,Discount FOB MMC Thailand 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Discount FOB MMC Thailand 2026-12,Discount FOB MMC Thailand 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Discount FOB MMC Thailand 2027-01,Discount FOB MMC Thailand 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Discount FOB MMC Thailand 2027-02,Discount FOB MMC Thailand 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Discount FOB MMC Thailand 2027-03,Discount FOB MMC Thailand 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Discount FOB MMC Thailand 2027-04,Discount FOB MMC Thailand 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Discount FOB MMC Thailand 2027-05,Discount FOB MMC Thailand 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB Atlantic Copper 2026-06,FOB Atlantic Copper 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB Atlantic Copper 2026-07,FOB Atlantic Copper 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB Atlantic Copper 2026-08,FOB Atlantic Copper 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB Atlantic Copper 2026-09,FOB Atlantic Copper 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB Atlantic Copper 2026-10,FOB Atlantic Copper 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB Atlantic Copper 2026-11,FOB Atlantic Copper 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB Atlantic Copper 2026-12,FOB Atlantic Copper 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB Atlantic Copper 2027-01,FOB Atlantic Copper 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB Atlantic Copper 2027-02,FOB Atlantic Copper 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB Atlantic Copper 2027-03,FOB Atlantic Copper 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB Atlantic Copper 2027-04,FOB Atlantic Copper 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB Atlantic Copper 2027-05,FOB Atlantic Copper 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB Boliden 2026-06,FOB Boliden 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB Boliden 2026-07,FOB Boliden 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB Boliden 2026-08,FOB Boliden 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB Boliden 2026-09,FOB Boliden 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB Boliden 2026-10,FOB Boliden 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB Boliden 2026-11,FOB Boliden 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB Boliden 2026-12,FOB Boliden 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB Boliden 2027-01,FOB Boliden 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB Boliden 2027-02,FOB Boliden 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB Boliden 2027-03,FOB Boliden 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB Boliden 2027-04,FOB Boliden 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB Boliden 2027-05,FOB Boliden 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB China 2026-06,FOB China 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB China 2026-07,FOB China 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB China 2026-08,FOB China 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB China 2026-09,FOB China 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB China 2026-10,FOB China 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB China 2026-11,FOB China 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB China 2026-12,FOB China 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB China 2027-01,FOB China 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB China 2027-02,FOB China 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB China 2027-03,FOB China 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB China 2027-04,FOB China 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB China 2027-05,FOB China 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB Japan/South Korea 2026-06,FOB Japan/South Korea 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB Japan/South Korea 2026-07,FOB Japan/South Korea 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB Japan/South Korea 2026-08,FOB Japan/South Korea 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB Japan/South Korea 2026-09,FOB Japan/South Korea 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB Japan/South Korea 2026-10,FOB Japan/South Korea 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB Japan/South Korea 2026-11,FOB Japan/South Korea 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB Japan/South Korea 2026-12,FOB Japan/South Korea 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB Japan/South Korea 2027-01,FOB Japan/South Korea 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB Japan/South Korea 2027-02,FOB Japan/South Korea 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB Japan/South Korea 2027-03,FOB Japan/South Korea 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB Japan/South Korea 2027-04,FOB Japan/South Korea 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB Japan/South Korea 2027-05,FOB Japan/South Korea 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB NWE 2026-06,FOB NWE 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB NWE 2026-07,FOB NWE 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB NWE 2026-08,FOB NWE 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB NWE 2026-09,FOB NWE 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB NWE 2026-10,FOB NWE 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB NWE 2026-11,FOB NWE 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB NWE 2026-12,FOB NWE 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB NWE 2027-01,FOB NWE 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB NWE 2027-02,FOB NWE 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB NWE 2027-03,FOB NWE 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB NWE 2027-04,FOB NWE 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB NWE 2027-05,FOB NWE 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB Peifeng 2026-06,FOB Peifeng 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB Peifeng 2026-07,FOB Peifeng 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB Peifeng 2026-08,FOB Peifeng 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB Peifeng 2026-09,FOB Peifeng 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB Peifeng 2026-10,FOB Peifeng 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB Peifeng 2026-11,FOB Peifeng 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB Peifeng 2026-12,FOB Peifeng 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB Peifeng 2027-01,FOB Peifeng 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB Peifeng 2027-02,FOB Peifeng 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB Peifeng 2027-03,FOB Peifeng 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB Peifeng 2027-04,FOB Peifeng 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB Peifeng 2027-05,FOB Peifeng 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB PPC Thailand 2026-06,FOB PPC Thailand 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB PPC Thailand 2026-07,FOB PPC Thailand 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB PPC Thailand 2026-08,FOB PPC Thailand 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB PPC Thailand 2026-09,FOB PPC Thailand 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB PPC Thailand 2026-10,FOB PPC Thailand 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB PPC Thailand 2026-11,FOB PPC Thailand 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB PPC Thailand 2026-12,FOB PPC Thailand 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB PPC Thailand 2027-01,FOB PPC Thailand 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB PPC Thailand 2027-02,FOB PPC Thailand 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB PPC Thailand 2027-03,FOB PPC Thailand 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB PPC Thailand 2027-04,FOB PPC Thailand 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB PPC Thailand 2027-05,FOB PPC Thailand 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-06,FOB Toho/Furu price formula: CFR India -60 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-07,FOB Toho/Furu price formula: CFR India -60 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-08,FOB Toho/Furu price formula: CFR India -60 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-09,FOB Toho/Furu price formula: CFR India -60 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-10,FOB Toho/Furu price formula: CFR India -60 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-11,FOB Toho/Furu price formula: CFR India -60 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2026-12,FOB Toho/Furu price formula: CFR India -60 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2027-01,FOB Toho/Furu price formula: CFR India -60 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2027-02,FOB Toho/Furu price formula: CFR India -60 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2027-03,FOB Toho/Furu price formula: CFR India -60 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2027-04,FOB Toho/Furu price formula: CFR India -60 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
FOB Toho/Furu price formula: CFR India -60 2027-05,FOB Toho/Furu price formula: CFR India -60 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight Boliden Premium 2026-06,Freight Boliden Premium 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight Boliden Premium 2026-07,Freight Boliden Premium 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight Boliden Premium 2026-08,Freight Boliden Premium 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight Boliden Premium 2026-09,Freight Boliden Premium 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight Boliden Premium 2026-10,Freight Boliden Premium 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight Boliden Premium 2026-11,Freight Boliden Premium 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight Boliden Premium 2026-12,Freight Boliden Premium 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight Boliden Premium 2027-01,Freight Boliden Premium 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight Boliden Premium 2027-02,Freight Boliden Premium 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight Boliden Premium 2027-03,Freight Boliden Premium 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight Boliden Premium 2027-04,Freight Boliden Premium 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight Boliden Premium 2027-05,Freight Boliden Premium 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / Adelaide 2026-06,Freight FE / Adelaide 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / Adelaide 2026-07,Freight FE / Adelaide 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / Adelaide 2026-08,Freight FE / Adelaide 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / Adelaide 2026-09,Freight FE / Adelaide 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / Adelaide 2026-10,Freight FE / Adelaide 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / Adelaide 2026-11,Freight FE / Adelaide 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / Adelaide 2026-12,Freight FE / Adelaide 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / Adelaide 2027-01,Freight FE / Adelaide 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / Adelaide 2027-02,Freight FE / Adelaide 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / Adelaide 2027-03,Freight FE / Adelaide 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / Adelaide 2027-04,Freight FE / Adelaide 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / Adelaide 2027-05,Freight FE / Adelaide 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / Brasil 2026-06,Freight FE / Brasil 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / Brasil 2026-07,Freight FE / Brasil 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / Brasil 2026-08,Freight FE / Brasil 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / Brasil 2026-09,Freight FE / Brasil 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / Brasil 2026-10,Freight FE / Brasil 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / Brasil 2026-11,Freight FE / Brasil 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / Brasil 2026-12,Freight FE / Brasil 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / Brasil 2027-01,Freight FE / Brasil 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / Brasil 2027-02,Freight FE / Brasil 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / Brasil 2027-03,Freight FE / Brasil 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / Brasil 2027-04,Freight FE / Brasil 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / Brasil 2027-05,Freight FE / Brasil 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / Chile 2026-06,Freight FE / Chile 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / Chile 2026-07,Freight FE / Chile 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / Chile 2026-08,Freight FE / Chile 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / Chile 2026-09,Freight FE / Chile 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / Chile 2026-10,Freight FE / Chile 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / Chile 2026-11,Freight FE / Chile 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / Chile 2026-12,Freight FE / Chile 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / Chile 2027-01,Freight FE / Chile 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / Chile 2027-02,Freight FE / Chile 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / Chile 2027-03,Freight FE / Chile 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / Chile 2027-04,Freight FE / Chile 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / Chile 2027-05,Freight FE / Chile 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / EC India 2026-06,Freight FE / EC India 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / EC India 2026-07,Freight FE / EC India 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / EC India 2026-08,Freight FE / EC India 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / EC India 2026-09,Freight FE / EC India 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / EC India 2026-10,Freight FE / EC India 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / EC India 2026-11,Freight FE / EC India 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / EC India 2026-12,Freight FE / EC India 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / EC India 2027-01,Freight FE / EC India 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / EC India 2027-02,Freight FE / EC India 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / EC India 2027-03,Freight FE / EC India 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / EC India 2027-04,Freight FE / EC India 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / EC India 2027-05,Freight FE / EC India 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / Gladstone 2026-06,Freight FE / Gladstone 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / Gladstone 2026-07,Freight FE / Gladstone 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / Gladstone 2026-08,Freight FE / Gladstone 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / Gladstone 2026-09,Freight FE / Gladstone 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / Gladstone 2026-10,Freight FE / Gladstone 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / Gladstone 2026-11,Freight FE / Gladstone 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / Gladstone 2026-12,Freight FE / Gladstone 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / Gladstone 2027-01,Freight FE / Gladstone 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / Gladstone 2027-02,Freight FE / Gladstone 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / Gladstone 2027-03,Freight FE / Gladstone 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / Gladstone 2027-04,Freight FE / Gladstone 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / Gladstone 2027-05,Freight FE / Gladstone 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / Stockton 2026-06,Freight FE / Stockton 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / Stockton 2026-07,Freight FE / Stockton 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / Stockton 2026-08,Freight FE / Stockton 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / Stockton 2026-09,Freight FE / Stockton 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / Stockton 2026-10,Freight FE / Stockton 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / Stockton 2026-11,Freight FE / Stockton 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / Stockton 2026-12,Freight FE / Stockton 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / Stockton 2027-01,Freight FE / Stockton 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / Stockton 2027-02,Freight FE / Stockton 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / Stockton 2027-03,Freight FE / Stockton 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / Stockton 2027-04,Freight FE / Stockton 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / Stockton 2027-05,Freight FE / Stockton 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight FE / US Gulf 2026-06,Freight FE / US Gulf 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight FE / US Gulf 2026-07,Freight FE / US Gulf 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight FE / US Gulf 2026-08,Freight FE / US Gulf 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight FE / US Gulf 2026-09,Freight FE / US Gulf 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight FE / US Gulf 2026-10,Freight FE / US Gulf 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight FE / US Gulf 2026-11,Freight FE / US Gulf 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight FE / US Gulf 2026-12,Freight FE / US Gulf 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight FE / US Gulf 2027-01,Freight FE / US Gulf 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight FE / US Gulf 2027-02,Freight FE / US Gulf 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight FE / US Gulf 2027-03,Freight FE / US Gulf 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight FE / US Gulf 2027-04,Freight FE / US Gulf 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight FE / US Gulf 2027-05,Freight FE / US Gulf 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight J-SK / Thailand 2026-05,Freight J-SK / Thailand 2026-05,1,future,1,37,TRUE,MAY26
|
||||||
|
Freight J-SK / Thailand 2026-06,Freight J-SK / Thailand 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight J-SK / Thailand 2026-07,Freight J-SK / Thailand 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight J-SK / Thailand 2026-08,Freight J-SK / Thailand 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight J-SK / Thailand 2026-09,Freight J-SK / Thailand 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight J-SK / Thailand 2026-10,Freight J-SK / Thailand 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight J-SK / Thailand 2026-11,Freight J-SK / Thailand 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight J-SK / Thailand 2026-12,Freight J-SK / Thailand 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight J-SK / Thailand 2027-01,Freight J-SK / Thailand 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight J-SK / Thailand 2027-02,Freight J-SK / Thailand 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight J-SK / Thailand 2027-03,Freight J-SK / Thailand 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight J-SK / Thailand 2027-04,Freight J-SK / Thailand 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight J-SK / Thailand 2027-05,Freight J-SK / Thailand 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight NWE / Brasil 2026-06,Freight NWE / Brasil 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight NWE / Brasil 2026-07,Freight NWE / Brasil 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight NWE / Brasil 2026-08,Freight NWE / Brasil 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight NWE / Brasil 2026-09,Freight NWE / Brasil 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight NWE / Brasil 2026-10,Freight NWE / Brasil 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight NWE / Brasil 2026-11,Freight NWE / Brasil 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight NWE / Brasil 2026-12,Freight NWE / Brasil 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight NWE / Brasil 2027-01,Freight NWE / Brasil 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight NWE / Brasil 2027-02,Freight NWE / Brasil 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight NWE / Brasil 2027-03,Freight NWE / Brasil 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight NWE / Brasil 2027-04,Freight NWE / Brasil 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight NWE / Brasil 2027-05,Freight NWE / Brasil 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight NWE / Chile 2026-06,Freight NWE / Chile 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight NWE / Chile 2026-07,Freight NWE / Chile 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight NWE / Chile 2026-08,Freight NWE / Chile 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight NWE / Chile 2026-09,Freight NWE / Chile 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight NWE / Chile 2026-10,Freight NWE / Chile 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight NWE / Chile 2026-11,Freight NWE / Chile 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight NWE / Chile 2026-12,Freight NWE / Chile 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight NWE / Chile 2027-01,Freight NWE / Chile 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight NWE / Chile 2027-02,Freight NWE / Chile 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight NWE / Chile 2027-03,Freight NWE / Chile 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight NWE / Chile 2027-04,Freight NWE / Chile 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight NWE / Chile 2027-05,Freight NWE / Chile 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight NWE / Turkey 2026-06,Freight NWE / Turkey 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight NWE / Turkey 2026-07,Freight NWE / Turkey 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight NWE / Turkey 2026-08,Freight NWE / Turkey 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight NWE / Turkey 2026-09,Freight NWE / Turkey 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight NWE / Turkey 2026-10,Freight NWE / Turkey 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight NWE / Turkey 2026-11,Freight NWE / Turkey 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight NWE / Turkey 2026-12,Freight NWE / Turkey 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight NWE / Turkey 2027-01,Freight NWE / Turkey 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight NWE / Turkey 2027-02,Freight NWE / Turkey 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight NWE / Turkey 2027-03,Freight NWE / Turkey 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight NWE / Turkey 2027-04,Freight NWE / Turkey 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight NWE / Turkey 2027-05,Freight NWE / Turkey 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Freight NWE / US Gulf 2026-06,Freight NWE / US Gulf 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Freight NWE / US Gulf 2026-07,Freight NWE / US Gulf 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Freight NWE / US Gulf 2026-08,Freight NWE / US Gulf 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Freight NWE / US Gulf 2026-09,Freight NWE / US Gulf 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Freight NWE / US Gulf 2026-10,Freight NWE / US Gulf 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Freight NWE / US Gulf 2026-11,Freight NWE / US Gulf 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Freight NWE / US Gulf 2026-12,Freight NWE / US Gulf 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Freight NWE / US Gulf 2027-01,Freight NWE / US Gulf 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Freight NWE / US Gulf 2027-02,Freight NWE / US Gulf 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Freight NWE / US Gulf 2027-03,Freight NWE / US Gulf 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Freight NWE / US Gulf 2027-04,Freight NWE / US Gulf 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Freight NWE / US Gulf 2027-05,Freight NWE / US Gulf 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
Historical CFR CODELCO CAK 24 2026-06,Historical CFR CODELCO CAK 24 2026-06,1,future,1,37,TRUE,JUN26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-07,Historical CFR CODELCO CAK 24 2026-07,1,future,1,37,TRUE,JUL26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-08,Historical CFR CODELCO CAK 24 2026-08,1,future,1,37,TRUE,AUG26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-09,Historical CFR CODELCO CAK 24 2026-09,1,future,1,37,TRUE,SEP26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-10,Historical CFR CODELCO CAK 24 2026-10,1,future,1,37,TRUE,OCT26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-11,Historical CFR CODELCO CAK 24 2026-11,1,future,1,37,TRUE,NOV26
|
||||||
|
Historical CFR CODELCO CAK 24 2026-12,Historical CFR CODELCO CAK 24 2026-12,1,future,1,37,TRUE,DEC26
|
||||||
|
Historical CFR CODELCO CAK 24 2027-01,Historical CFR CODELCO CAK 24 2027-01,1,future,1,37,TRUE,JAN27
|
||||||
|
Historical CFR CODELCO CAK 24 2027-02,Historical CFR CODELCO CAK 24 2027-02,1,future,1,37,TRUE,FEB27
|
||||||
|
Historical CFR CODELCO CAK 24 2027-03,Historical CFR CODELCO CAK 24 2027-03,1,future,1,37,TRUE,MAR27
|
||||||
|
Historical CFR CODELCO CAK 24 2027-04,Historical CFR CODELCO CAK 24 2027-04,1,future,1,37,TRUE,APR27
|
||||||
|
Historical CFR CODELCO CAK 24 2027-05,Historical CFR CODELCO CAK 24 2027-05,1,future,1,37,TRUE,MAY27
|
||||||
|
KZ Spot October 2022 2026-06,KZ Spot October 2022 2026-06,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-07,KZ Spot October 2022 2026-07,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-08,KZ Spot October 2022 2026-08,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-09,KZ Spot October 2022 2026-09,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-10,KZ Spot October 2022 2026-10,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-11,KZ Spot October 2022 2026-11,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2026-12,KZ Spot October 2022 2026-12,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2027-01,KZ Spot October 2022 2027-01,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2027-02,KZ Spot October 2022 2027-02,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2027-03,KZ Spot October 2022 2027-03,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2027-04,KZ Spot October 2022 2027-04,1,future,1,37,TRUE,#VALUE!
|
||||||
|
KZ Spot October 2022 2027-05,KZ Spot October 2022 2027-05,1,future,1,37,TRUE,#VALUE!
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,9 @@
|
|||||||
source_id,source_line_id,number,reference,our_reference,party_name,currency_code,purchase_date,payment_term,warehouse_code,weight_basis,tol_min_pct,tol_max_pct,tol_min_qty,tol_max_qty,from_location_name,to_location_name,incoterm_name,invoice_method,description,comment,line_type,line_product_code,origin,line_quantity,line_unit_code,line_price,line_description,line_from_del,line_to_del,pricing_trigger,pricing_estimated_date,trader,operator,concentration,book,strategy,period_at,demurrage,laytime_hours,nor_extra_hours,pumping_rate,use_only_min_max,drop_remaining_quantity,,,,,,,,
|
source_id,source_line_id,number,reference,our_reference,party_name,currency_code,purchase_date,payment_term,warehouse_code,weight_basis,tol_min_pct,tol_max_pct,tol_min_qty,tol_max_qty,from_location_name,to_location_name,incoterm_name,invoice_method,description,comment,line_type,line_product_code,origin,line_quantity,line_unit_code,line_price,line_description,line_from_del,line_to_del,pricing_trigger,pricing_estimated_date,trader,operator,concentration,book,strategy,period_at,demurrage,laytime_hours,nor_extra_hours,pumping_rate,use_only_min_max,drop_remaining_quantity,,,,,,,,
|
||||||
5E71530B-DEF7-4E7A-9245-6C2C2901230E,5E71530B-DEF7-4E7A-9245-6C2C2901230E,2195,25036A,P26.006,SUMITOMO CORPORATION - PPC,USD,4/14/2026,NET ,,NCSW,10,10,9000,11000,Saganoseki,Stockton,FOB,manual,,2195 / H2SO4 FY 2026 / Default,line,JP-H2SO4,Japan,10000,Mt,71,10000 Mt of sulphuric acid - Tel-quel,5/13/2026,5/27/2026,bldate,5/13/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Default,Laycan,,0,6,300,0,0,,,,,,,,
|
9AB92763-78F2-4F6D-BF54-EA7C4C0EBC54,9AB92763-78F2-4F6D-BF54-EA7C4C0EBC54,2207,MMC-NFC June shipment,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,6000,6000,Naoshima,Map Ta Phut,FOB,manual,,2207 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,6000,Mt,350,6000 Mt of sulphuric acid - Tel-quel,6/1/2026,6/30/2026,bldate,6/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
B9C5037D-BBA0-4888-B5DF-9EF37E105A83,B9C5037D-BBA0-4888-B5DF-9EF37E105A83,2209,MMC-NFC July shipment,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,5000,5000,Naoshima,Map Ta Phut,FOB,manual,,2209 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,5000,Mt,330,5000 Mt of sulphuric acid - Tel-quel,7/1/2026,7/31/2026,bldate,7/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
F71468D6-1F9D-4CDB-B257-3C710E948A11,F71468D6-1F9D-4CDB-B257-3C710E948A11,2211,MMC-NFC Sept shipment,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,5000,5000,Naoshima,Map Ta Phut,FOB,manual,,2211 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,5000,Mt,330,5000 Mt of sulphuric acid - Tel-quel,9/1/2026,9/30/2026,bldate,9/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
A2576307-F2C8-4694-8400-5984F287610D,A2576307-F2C8-4694-8400-5984F287610D,2213,MMC-NFC Oct shipment ,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,4500,4500,Naoshima,Map Ta Phut,FOB,manual,,2213 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,4500,Mt,280,4500 Mt of sulphuric acid - Tel-quel,10/1/2026,10/31/2026,bldate,10/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
12925A43-BE8E-4D3F-BC87-AD8BC332BD09,12925A43-BE8E-4D3F-BC87-AD8BC332BD09,2215,MMC-NFC Nov shipment ,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,FOB,manual,,2215 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,230,7500 Mt of sulphuric acid - Tel-quel,11/1/2026,11/30/2026,bldate,11/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
12925A43-BE8E-4D3F-BC87-AD8BC332BD09,12925A43-BE8E-4D3F-BC87-AD8BC332BD09,2215,MMC-NFC Nov shipment ,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET ,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,FOB,manual,,2215 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,230,7500 Mt of sulphuric acid - Tel-quel,11/1/2026,11/30/2026,bldate,11/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
14F3FCF4-0670-4E7A-88D1-36D9A83BB4DA,14F3FCF4-0670-4E7A-88D1-36D9A83BB4DA,2217,MMC-NFC Jan shipment,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET 7,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,FOB,manual,,2217 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,180,7500 Mt of sulphuric acid - Tel-quel,1/1/2027,1/31/2027,bldate,1/1/2027,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
14F3FCF4-0670-4E7A-88D1-36D9A83BB4DA,14F3FCF4-0670-4E7A-88D1-36D9A83BB4DA,2217,MMC-NFC Jan shipment,P25.018,SUMITOMO CORPORATION - MMC,USD,4/27/2026,NET 7,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,FOB,manual,,2217 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,180,7500 Mt of sulphuric acid - Tel-quel,1/1/2027,1/31/2027,bldate,1/1/2027,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,300,1,0,,,,,,,,
|
||||||
|
|||||||
|
@@ -1,4 +1,7 @@
|
|||||||
source_id,source_line_id,number,reference,our_reference,party_name,currency_code,sale_date,payment_term,warehouse_code,weight_basis,tol_min_pct,tol_max_pct,tol_min_qty,tol_max_qty,from_location_name,to_location_name,incoterm_name,invoice_method,description,comment,line_type,line_product_code,origin,line_quantity,line_unit_code,line_price,line_description,line_from_del,line_to_del,pricing_trigger,pricing_estimated_date,trader,operator,concentration,book,strategy,period_at,demurrage,laytime_hours,nor_extra_hours,pumping_rate,use_only_min_max,drop_remaining_quantity,,,,,,,,
|
source_id,source_line_id,number,reference,our_reference,party_name,currency_code,sale_date,payment_term,warehouse_code,weight_basis,tol_min_pct,tol_max_pct,tol_min_qty,tol_max_qty,from_location_name,to_location_name,incoterm_name,invoice_method,description,comment,line_type,line_product_code,origin,line_quantity,line_unit_code,line_price,line_description,line_from_del,line_to_del,pricing_trigger,pricing_estimated_date,trader,operator,concentration,book,strategy,period_at,demurrage,laytime_hours,nor_extra_hours,pumping_rate,use_only_min_max,drop_remaining_quantity,,,,,,,,
|
||||||
4D63D146-99BF-4AC8-8967-93183E7D1649,4D63D146-99BF-4AC8-8967-93183E7D1649,2194,25036B,S26.014,"INTERACID NORTH AMERICA, INC (Stockton)",USD,4/14/2026,NET 30,,NCSW,10,10,9000,11000,Saganoseki,Santa Rosalia,CFR,manual,,2194 / H2SO4 FY 2026 / Default,line,JP-H2SO4,Japan,10000,Mt,138.5,10000 Mt of sulphuric acid - Tel-quel,5/13/2026,5/27/2026,bldate,5/13/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Default,Laycan,,0,6,350,0,0,,,,,,,,
|
BFED11C9-15EF-4BA0-8E6A-E1E2D6E79B26,BFED11C9-15EF-4BA0-8E6A-E1E2D6E79B26,2208,NFC - PROMMITR June,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET ,,NCSW,0,0,6000,6000,Naoshima,Map Ta Phut,CFR,manual,,2208 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,6000,Mt,353.4,6000 Mt of sulphuric acid - Tel-quel,6/1/2026,6/30/2026,bldate,6/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
21A4E4A7-9B90-4561-A3F5-DB3833B6B888,21A4E4A7-9B90-4561-A3F5-DB3833B6B888,2210,NFC - PROMMITR July,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET ,,NCSW,0,0,5000,5000,Naoshima,Map Ta Phut,CFR,manual,,2210 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,5000,Mt,353.4,5000 Mt of sulphuric acid - Tel-quel,7/1/2026,7/31/2026,bldate,7/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
D944B68B-EE3F-4472-A7BF-1CE1EBD16478,D944B68B-EE3F-4472-A7BF-1CE1EBD16478,2212,NFC - PROMMITR Sept,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET ,,NCSW,0,0,5000,5000,Naoshima,Map Ta Phut,CFR,manual,,2212 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,5000,Mt,305.9,5000 Mt of sulphuric acid - Tel-quel,9/1/2026,9/30/2026,bldate,9/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
|
1176C64A-F52C-4440-BC1A-0407F7FC6710,1176C64A-F52C-4440-BC1A-0407F7FC6710,2214,NFC - PROMMITR Oct,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET ,,NCSW,0,0,4500,4500,Naoshima,Map Ta Phut,CFR,manual,,2214 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,4500,Mt,282.15,4500 Mt of sulphuric acid - Tel-quel,10/1/2026,10/31/2026,bldate,10/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
|
3FE19BA4-0D56-421C-844D-B566ED19D8DC,3FE19BA4-0D56-421C-844D-B566ED19D8DC,2216,NFC - PROMMITR Nov,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET ,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,CFR,manual,,2216 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,258.4,7500 Mt of sulphuric acid - Tel-quel,11/1/2026,11/30/2026,bldate,11/1/2026,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
|
BF9B66A7-4BAA-47B8-A0BF-42B5F9537AD5,BF9B66A7-4BAA-47B8-A0BF-42B5F9537AD5,2218,NFC - PROMMITR January,S25.022,NFC PUBLIC COMPANY LTD - PROMMITR,USD,4/27/2026,NET 30,,NCSW,0,0,7500,7500,Naoshima,Map Ta Phut,CFR,manual,,2218 / H2SO4 FY 2026 / Thailand FY26,line,JP-H2SO4,Japan,7500,Mt,210.9,7500 Mt of sulphuric acid - Tel-quel,1/1/2027,1/31/2027,bldate,1/1/2027,Stephane Monnard, ,0,H2SO4 FY 2026,Thailand FY26,Laycan,,0,6,250,1,0,,,,,,,,
|
||||||
|
|||||||
|
223
Reference Data/python_project/scripts/import_price_index.py
Normal file
223
Reference Data/python_project/scripts/import_price_index.py
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
# Add parent directory to Python path so we can import helpers
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
parent_dir = Path(__file__).parent.parent
|
||||||
|
sys.path.insert(0, str(parent_dir))
|
||||||
|
|
||||||
|
import csv
|
||||||
|
from proteus import Model
|
||||||
|
|
||||||
|
from helpers.config import (
|
||||||
|
PRICE_INDEXES_CSV,
|
||||||
|
connect_to_tryton,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
CSV_FILE_PATH = PRICE_INDEXES_CSV
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Main import function
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
def import_price_indexes(csv_file):
|
||||||
|
PriceIndex = Model.get('price.price')
|
||||||
|
ProductMonth = Model.get('product.month')
|
||||||
|
Currency = Model.get('currency.currency')
|
||||||
|
PriceFixType = Model.get('price.fixtype')
|
||||||
|
ProductUom = Model.get('product.uom')
|
||||||
|
|
||||||
|
print(f"{'='*70}")
|
||||||
|
print(f"IMPORTING PRICE INDEXES FROM CSV")
|
||||||
|
print(f"{'='*70}\n")
|
||||||
|
print(f"Reading from: {csv_file}\n")
|
||||||
|
|
||||||
|
imported_count = 0
|
||||||
|
skipped_count = 0
|
||||||
|
error_count = 0
|
||||||
|
ignored = [] # list of (row_num, price_index, reason)
|
||||||
|
errors = [] # list of error strings
|
||||||
|
|
||||||
|
# Build lookup maps upfront to avoid repeated DB calls
|
||||||
|
print("Loading existing price indexes...")
|
||||||
|
all_indexes = PriceIndex.find([])
|
||||||
|
index_map = {pi.price_index: pi for pi in all_indexes}
|
||||||
|
print(f" Found {len(index_map)} price indexes in database\n")
|
||||||
|
|
||||||
|
print("Loading product months...")
|
||||||
|
all_months = ProductMonth.find([])
|
||||||
|
month_map = {pm.month_name: pm for pm in all_months}
|
||||||
|
print(f" Found {len(month_map)} product months in database\n")
|
||||||
|
|
||||||
|
print("Loading reference data (currencies, price types, units)...")
|
||||||
|
currency_map = {c.id: c for c in Currency.find([])}
|
||||||
|
fixtype_map = {pft.id: pft for pft in PriceFixType.find([])}
|
||||||
|
uom_map = {u.id: u for u in ProductUom.find([])}
|
||||||
|
print()
|
||||||
|
|
||||||
|
row_num = 0
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(csv_file, 'r', encoding='utf-8-sig') as file:
|
||||||
|
reader = csv.DictReader(file)
|
||||||
|
|
||||||
|
for row in reader:
|
||||||
|
row_num += 1
|
||||||
|
index_name = row.get('price_index', '').strip()
|
||||||
|
|
||||||
|
try:
|
||||||
|
print(f"{'='*70}")
|
||||||
|
print(f"Row {row_num}: {index_name}")
|
||||||
|
print(f"{'='*70}")
|
||||||
|
|
||||||
|
if not index_name:
|
||||||
|
raise ValueError("price_index is empty")
|
||||||
|
|
||||||
|
# Already exists → skip silently
|
||||||
|
if index_name in index_map:
|
||||||
|
print(f" ⏭ Already exists in database — skipping\n")
|
||||||
|
ignored.append((row_num, index_name, "Already exists in price_price"))
|
||||||
|
skipped_count += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Lookup pricing period in product_month
|
||||||
|
period_label = row.get('pricing_period_label', '').strip()
|
||||||
|
if not period_label:
|
||||||
|
msg = "pricing_period_label is empty"
|
||||||
|
print(f" ✗ {msg} — not imported\n")
|
||||||
|
ignored.append((row_num, index_name, msg))
|
||||||
|
skipped_count += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
product_month = month_map.get(period_label)
|
||||||
|
if not product_month:
|
||||||
|
# Case-insensitive fallback
|
||||||
|
for k, v in month_map.items():
|
||||||
|
if k and k.upper() == period_label.upper():
|
||||||
|
product_month = v
|
||||||
|
break
|
||||||
|
|
||||||
|
if not product_month:
|
||||||
|
msg = f"pricing_period_label '{period_label}' not found in product_month"
|
||||||
|
print(f" ✗ {msg} — not imported\n")
|
||||||
|
ignored.append((row_num, index_name, msg))
|
||||||
|
skipped_count += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Resolve FK: currency
|
||||||
|
raw_currency = row.get('price_currency', '').strip()
|
||||||
|
currency = None
|
||||||
|
if raw_currency:
|
||||||
|
try:
|
||||||
|
currency = currency_map.get(int(raw_currency))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
pass
|
||||||
|
if not currency:
|
||||||
|
raise ValueError(f"price_currency id '{raw_currency}' not found in currency_currency")
|
||||||
|
|
||||||
|
# Resolve FK: price type (optional)
|
||||||
|
raw_type = row.get('price_type', '').strip()
|
||||||
|
price_type = None
|
||||||
|
if raw_type:
|
||||||
|
try:
|
||||||
|
price_type = fixtype_map.get(int(raw_type))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Resolve FK: unit of measure (optional)
|
||||||
|
raw_unit = row.get('price_unit', '').strip()
|
||||||
|
price_unit = None
|
||||||
|
if raw_unit:
|
||||||
|
try:
|
||||||
|
price_unit = uom_map.get(int(raw_unit))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Scalar fields
|
||||||
|
price_desc = row.get('price_desc', '').strip()
|
||||||
|
price_curve_type = row.get('price_curve_type', '').strip()
|
||||||
|
active_raw = row.get('active', 'TRUE').strip().upper()
|
||||||
|
active = active_raw in ('TRUE', '1', 'YES')
|
||||||
|
|
||||||
|
# Create the record
|
||||||
|
print(f" Creating price index...")
|
||||||
|
record = PriceIndex()
|
||||||
|
record.price_index = index_name
|
||||||
|
record.price_desc = price_desc
|
||||||
|
record.price_currency = currency
|
||||||
|
record.price_curve_type = price_curve_type
|
||||||
|
record.price_period = product_month
|
||||||
|
record.active = active
|
||||||
|
if price_type:
|
||||||
|
record.price_type = price_type
|
||||||
|
if price_unit:
|
||||||
|
record.price_unit = price_unit
|
||||||
|
record.save()
|
||||||
|
|
||||||
|
print(f" ✓ Created (ID: {record.id})")
|
||||||
|
print(f" Index : {index_name}")
|
||||||
|
print(f" Period : {period_label} (ID: {product_month.id})")
|
||||||
|
print(f" Desc : {price_desc}")
|
||||||
|
print()
|
||||||
|
imported_count += 1
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
error_msg = f"Row {row_num} - {index_name or 'Unknown'}: {str(e)}"
|
||||||
|
errors.append(error_msg)
|
||||||
|
error_count += 1
|
||||||
|
print(f" ✗ Error on row {row_num}: {e}\n")
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"✗ Error: CSV file not found at {csv_file}")
|
||||||
|
print(f"Please update PRICE_INDEXES_CSV in helpers/config.py with the correct path.")
|
||||||
|
return
|
||||||
|
except Exception as e:
|
||||||
|
print(f"✗ Fatal error: {e}")
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
return
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
print(f"\n{'='*70}")
|
||||||
|
print("IMPORT SUMMARY")
|
||||||
|
print(f"{'='*70}")
|
||||||
|
print(f"Total rows processed : {row_num}")
|
||||||
|
print(f"Successfully imported : {imported_count}")
|
||||||
|
print(f"Skipped / Not imported : {skipped_count}")
|
||||||
|
print(f"Errors : {error_count}")
|
||||||
|
|
||||||
|
if ignored:
|
||||||
|
print(f"\nIgnored / Not imported ({len(ignored)}):")
|
||||||
|
for r, name, reason in ignored:
|
||||||
|
print(f" - Row {r:>4} [{name}]: {reason}")
|
||||||
|
|
||||||
|
if errors:
|
||||||
|
print(f"\nErrors ({len(errors)}):")
|
||||||
|
for err in errors:
|
||||||
|
print(f" - {err}")
|
||||||
|
|
||||||
|
print(f"\n{'='*70}")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Entry point
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
def main():
|
||||||
|
print("=" * 70)
|
||||||
|
print("TRYTON PRICE INDEX IMPORT SCRIPT")
|
||||||
|
print("Using Proteus with XML-RPC Connection")
|
||||||
|
print("=" * 70)
|
||||||
|
print()
|
||||||
|
|
||||||
|
if not connect_to_tryton():
|
||||||
|
return 1
|
||||||
|
|
||||||
|
import_price_indexes(CSV_FILE_PATH)
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
exit(main())
|
||||||
@@ -6,6 +6,7 @@ parent_dir = Path(__file__).parent.parent
|
|||||||
sys.path.insert(0, str(parent_dir))
|
sys.path.insert(0, str(parent_dir))
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from proteus import Model
|
from proteus import Model
|
||||||
|
|
||||||
@@ -97,7 +98,11 @@ def import_prices(csv_file):
|
|||||||
price_index = index_map[index_name]
|
price_index = index_map[index_name]
|
||||||
|
|
||||||
# -- Parse fields -----------------------------------
|
# -- Parse fields -----------------------------------
|
||||||
price_date = parse_date(row.get('price_date', ''))
|
raw_date = row.get('price_date', '').strip()
|
||||||
|
try:
|
||||||
|
price_date = datetime.strptime(raw_date, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
price_date = parse_date(raw_date)
|
||||||
high_price = parse_decimal(row.get('high_price', ''), 'high_price')
|
high_price = parse_decimal(row.get('high_price', ''), 'high_price')
|
||||||
low_price = parse_decimal(row.get('low_price', ''), 'low_price')
|
low_price = parse_decimal(row.get('low_price', ''), 'low_price')
|
||||||
open_price = parse_decimal(row.get('open_price', ''), 'open_price')
|
open_price = parse_decimal(row.get('open_price', ''), 'open_price')
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ sys.path.insert(0, str(parent_dir))
|
|||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import csv
|
import csv
|
||||||
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from proteus import Model
|
from proteus import Model
|
||||||
|
|
||||||
@@ -34,7 +35,8 @@ from helpers.tryton_helpers import (
|
|||||||
get_party_invoice_address,
|
get_party_invoice_address,
|
||||||
find_purchase_contract_by_number,
|
find_purchase_contract_by_number,
|
||||||
find_or_create_analytic_dimension_value,
|
find_or_create_analytic_dimension_value,
|
||||||
link_analytic_dimensions_to_purchase
|
link_analytic_dimensions_to_purchase,
|
||||||
|
ensure_party_has_category
|
||||||
)
|
)
|
||||||
|
|
||||||
# Import migration mapping helper
|
# Import migration mapping helper
|
||||||
@@ -324,7 +326,11 @@ def import_purchases(csv_file):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Parse other fields
|
# Parse other fields
|
||||||
purchase_date = parse_date(row.get('purchase_date'))
|
raw_purchase_date = row.get('purchase_date', '').strip()
|
||||||
|
try:
|
||||||
|
purchase_date = datetime.strptime(raw_purchase_date, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
purchase_date = parse_date(raw_purchase_date)
|
||||||
party_name = row.get('party_name', '').strip()
|
party_name = row.get('party_name', '').strip()
|
||||||
|
|
||||||
# Find related records
|
# Find related records
|
||||||
@@ -409,17 +415,21 @@ def import_purchases(csv_file):
|
|||||||
purchase.state = DEFAULT_STATE
|
purchase.state = DEFAULT_STATE
|
||||||
purchase.invoice_method = DEFAULT_INVOICE_METHOD
|
purchase.invoice_method = DEFAULT_INVOICE_METHOD
|
||||||
|
|
||||||
# Retrieve trader
|
# Retrieve trader (optional)
|
||||||
trader = find_party_by_name(trader_name)
|
if trader_name:
|
||||||
if not party:
|
trader = find_party_by_name(trader_name)
|
||||||
raise ValueError(f"Trader not found: {trader_name}")
|
if not trader:
|
||||||
purchase.trader = trader
|
raise ValueError(f"Trader not found: {trader_name}")
|
||||||
|
trader, _ = ensure_party_has_category(trader, 'TRADER')
|
||||||
|
purchase.trader = Party(trader.id)
|
||||||
|
|
||||||
# Retrieve operator
|
# Retrieve operator (optional)
|
||||||
operator = find_party_by_name(operator_name)
|
if operator_name:
|
||||||
if not party:
|
operator = find_party_by_name(operator_name)
|
||||||
raise ValueError(f"Operator not found: {operator_name}")
|
if not operator:
|
||||||
purchase.operator = operator
|
raise ValueError(f"Operator not found: {operator_name}")
|
||||||
|
operator, _ = ensure_party_has_category(operator, 'OPERATOR')
|
||||||
|
purchase.operator = Party(operator.id)
|
||||||
|
|
||||||
|
|
||||||
# Save the purchase
|
# Save the purchase
|
||||||
@@ -460,8 +470,17 @@ def import_purchases(csv_file):
|
|||||||
unit = find_uom_by_code(row.get('line_unit_code', ''))
|
unit = find_uom_by_code(row.get('line_unit_code', ''))
|
||||||
|
|
||||||
# Parse shipping dates
|
# Parse shipping dates
|
||||||
from_del = parse_date(row.get('line_from_del', ''))
|
raw_from_del = row.get('line_from_del', '').strip()
|
||||||
to_del = parse_date(row.get('line_to_del', ''))
|
try:
|
||||||
|
from_del = datetime.strptime(raw_from_del, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
from_del = parse_date(raw_from_del)
|
||||||
|
|
||||||
|
raw_to_del = row.get('line_to_del', '').strip()
|
||||||
|
try:
|
||||||
|
to_del = datetime.strptime(raw_to_del, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
to_del = parse_date(raw_to_del)
|
||||||
|
|
||||||
# Create line
|
# Create line
|
||||||
line = PurchaseLine()
|
line = PurchaseLine()
|
||||||
@@ -500,7 +519,11 @@ def import_purchases(csv_file):
|
|||||||
|
|
||||||
# Create pricing estimate if applicable
|
# Create pricing estimate if applicable
|
||||||
pricing_trigger = row.get('pricing_trigger', '').strip()
|
pricing_trigger = row.get('pricing_trigger', '').strip()
|
||||||
pricing_estimated_date = parse_date(row.get('pricing_estimated_date', ''))
|
raw_pricing_date = row.get('pricing_estimated_date', '').strip()
|
||||||
|
try:
|
||||||
|
pricing_estimated_date = datetime.strptime(raw_pricing_date, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
pricing_estimated_date = parse_date(raw_pricing_date)
|
||||||
if pricing_trigger:
|
if pricing_trigger:
|
||||||
pricing_data = {
|
pricing_data = {
|
||||||
'trigger': pricing_trigger,
|
'trigger': pricing_trigger,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ sys.path.insert(0, str(parent_dir))
|
|||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import csv
|
import csv
|
||||||
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from proteus import Model
|
from proteus import Model
|
||||||
|
|
||||||
@@ -323,7 +324,11 @@ def import_sales(csv_file):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Parse other fields
|
# Parse other fields
|
||||||
sale_date = parse_date(row.get('sale_date'))
|
raw_sale_date = row.get('sale_date', '').strip()
|
||||||
|
try:
|
||||||
|
sale_date = datetime.strptime(raw_sale_date, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
sale_date = parse_date(raw_sale_date)
|
||||||
party_name = row.get('party_name', '').strip()
|
party_name = row.get('party_name', '').strip()
|
||||||
|
|
||||||
# Find related records
|
# Find related records
|
||||||
@@ -460,8 +465,17 @@ def import_sales(csv_file):
|
|||||||
unit = find_uom_by_code(row.get('line_unit_code', ''))
|
unit = find_uom_by_code(row.get('line_unit_code', ''))
|
||||||
|
|
||||||
# Parse shipping dates
|
# Parse shipping dates
|
||||||
from_del = parse_date(row.get('line_from_del', ''))
|
raw_from_del = row.get('line_from_del', '').strip()
|
||||||
to_del = parse_date(row.get('line_to_del', ''))
|
try:
|
||||||
|
from_del = datetime.strptime(raw_from_del, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
from_del = parse_date(raw_from_del)
|
||||||
|
|
||||||
|
raw_to_del = row.get('line_to_del', '').strip()
|
||||||
|
try:
|
||||||
|
to_del = datetime.strptime(raw_to_del, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
to_del = parse_date(raw_to_del)
|
||||||
|
|
||||||
# Create line
|
# Create line
|
||||||
line = SaleLine()
|
line = SaleLine()
|
||||||
@@ -499,7 +513,11 @@ def import_sales(csv_file):
|
|||||||
|
|
||||||
# Create pricing estimate if applicable
|
# Create pricing estimate if applicable
|
||||||
pricing_trigger = row.get('pricing_trigger', '').strip()
|
pricing_trigger = row.get('pricing_trigger', '').strip()
|
||||||
pricing_estimated_date = parse_date(row.get('pricing_estimated_date', ''))
|
raw_pricing_date = row.get('pricing_estimated_date', '').strip()
|
||||||
|
try:
|
||||||
|
pricing_estimated_date = datetime.strptime(raw_pricing_date, '%m/%d/%Y').date()
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
pricing_estimated_date = parse_date(raw_pricing_date)
|
||||||
if pricing_trigger:
|
if pricing_trigger:
|
||||||
pricing_data = {
|
pricing_data = {
|
||||||
'trigger': pricing_trigger,
|
'trigger': pricing_trigger,
|
||||||
|
|||||||
Reference in New Issue
Block a user