Add scripts for importing prices and sale contract fees; update purchase fees script

- Implemented `import_prices.py` to import price index values from a CSV file with migration mapping.
- Created `import_sale_fees.py` for importing sale contract line fees, including detailed logging and error handling.
- Modified `import_purchase_fees.py` to change fee type from 'ordered' to 'budgeted' and added fee ID logging.
This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-03-24 14:13:23 +01:00
parent 078843f991
commit 4bac53b01c
28 changed files with 9619 additions and 249 deletions

View File

@@ -0,0 +1,33 @@
contract_number,contract_ref,line_sequence,product,supplier,currency,p_r,mode,price,unit
1990,24998,1,Commission,SUMITOMO CORPORATION INDONESIA (SSRI),USD,PAY,Per qt,0.5,MT
1990,24998,1,LC Fees,UBS SWITZERLAND AG,USD,PAY,Per qt,0.25,MT
2010,25019A,1,Commission,SUMITOMO AUSTRALIA,USD,PAY,Per qt,0.7,MT
2011,25022A,1,Commission,SUMITOMO CORPORATION INDIA PVT LTD,USD,PAY,Per qt,0.75,MT
2023,25006,1,LC Fees,UBS SWITZERLAND AG,USD,PAY,Per qt,0.35,MT
2023,25006,1,Insurance,Marsh / Navigators Insurance Company,USD,PAY,Per qt,0.05,MT
2024,25002B,1,Commission,SUMITOMO CORPORATION INDIA PVT LTD,USD,PAY,Per qt,0.75,MT
2024,25002B,1,LC Fees,UBS SWITZERLAND AG,USD,PAY,Per qt,0.25,MT
2025,25011B,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2026,25011C,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2035,25020B,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2042,25009,1,Commission,SUMITOMO CORPORATION INDONESIA (SSRI),USD,PAY,Per qt,0.49,MT
2042,25009,1,LC Fees,UBS SWITZERLAND AG,USD,PAY,Per qt,0.35,MT
2055,25012,1,Finance,TBD Supplier,USD,PAY,Per qt,0.3,MT
2056,25026C,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2074,25026A,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2075,25020C,1,Finance,TBD Supplier,USD,PAY,Per qt,0.25,MT
2079,BHP Q3 2026 contract,1,Other,TBD Supplier,USD,PAY,Per qt,1,MT
2080,BHP Q4 2026 contract,1,Other,TBD Supplier,USD,PAY,Per qt,1,MT
2092,25028B,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2102,Las Cenizas / Franke 2H 2026 contract,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2103,Las Cenizas / Franke 2H 2026 contract,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2104,Las Cenizas / Franke 2H 2026 contract,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2121,Grace (MDL) spot contract 2026,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2152,25020E,1,Finance,TBD Supplier,USD,PAY,Per qt,0.25,MT
2154,25022BC,1,Commission,TBD Supplier,USD,PAY,Per qt,0.75,MT
2163,25026B,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2164,25027,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2165,25028C,1,Finance,TBD Supplier,USD,PAY,Per qt,0.2,MT
2168,Cosaych 2026 contract,1,Finance,TBD Supplier,USD,PAY,Per qt,0.15,MT
2170,PPC FD MAY TO INDIA,1,Commission,SUMITOMO CORPORATION INDIA PVT LTD,USD,PAY,Per qt,0.75,MT
2170,PPC FD MAY TO INDIA,1,LC Fees,UBS SWITZERLAND AG,USD,PAY,Per qt,0.5,MT
1 contract_number contract_ref line_sequence product supplier currency p_r mode price unit
2 1990 24998 1 Commission SUMITOMO CORPORATION INDONESIA (SSRI) USD PAY Per qt 0.5 MT
3 1990 24998 1 LC Fees UBS SWITZERLAND AG USD PAY Per qt 0.25 MT
4 2010 25019A 1 Commission SUMITOMO AUSTRALIA USD PAY Per qt 0.7 MT
5 2011 25022A 1 Commission SUMITOMO CORPORATION INDIA PVT LTD USD PAY Per qt 0.75 MT
6 2023 25006 1 LC Fees UBS SWITZERLAND AG USD PAY Per qt 0.35 MT
7 2023 25006 1 Insurance Marsh / Navigators Insurance Company USD PAY Per qt 0.05 MT
8 2024 25002B 1 Commission SUMITOMO CORPORATION INDIA PVT LTD USD PAY Per qt 0.75 MT
9 2024 25002B 1 LC Fees UBS SWITZERLAND AG USD PAY Per qt 0.25 MT
10 2025 25011B 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
11 2026 25011C 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
12 2035 25020B 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
13 2042 25009 1 Commission SUMITOMO CORPORATION INDONESIA (SSRI) USD PAY Per qt 0.49 MT
14 2042 25009 1 LC Fees UBS SWITZERLAND AG USD PAY Per qt 0.35 MT
15 2055 25012 1 Finance TBD Supplier USD PAY Per qt 0.3 MT
16 2056 25026C 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
17 2074 25026A 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
18 2075 25020C 1 Finance TBD Supplier USD PAY Per qt 0.25 MT
19 2079 BHP Q3 2026 contract 1 Other TBD Supplier USD PAY Per qt 1 MT
20 2080 BHP Q4 2026 contract 1 Other TBD Supplier USD PAY Per qt 1 MT
21 2092 25028B 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
22 2102 Las Cenizas / Franke 2H 2026 contract 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
23 2103 Las Cenizas / Franke 2H 2026 contract 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
24 2104 Las Cenizas / Franke 2H 2026 contract 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
25 2121 Grace (MDL) spot contract 2026 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
26 2152 25020E 1 Finance TBD Supplier USD PAY Per qt 0.25 MT
27 2154 25022BC 1 Commission TBD Supplier USD PAY Per qt 0.75 MT
28 2163 25026B 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
29 2164 25027 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
30 2165 25028C 1 Finance TBD Supplier USD PAY Per qt 0.2 MT
31 2168 Cosaych 2026 contract 1 Finance TBD Supplier USD PAY Per qt 0.15 MT
32 2170 PPC FD MAY TO INDIA 1 Commission SUMITOMO CORPORATION INDIA PVT LTD USD PAY Per qt 0.75 MT
33 2170 PPC FD MAY TO INDIA 1 LC Fees UBS SWITZERLAND AG USD PAY Per qt 0.5 MT