mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:45:23 +02:00
fix: force Column S for BB_FR reason column
This commit is contained in:
@@ -2260,14 +2260,16 @@ export const processBuyBoxExcel = async (fileOrBuffer: File | ArrayBuffer): Prom
|
||||
});
|
||||
}
|
||||
|
||||
// Fallback to previous hardcoded indices if header search fails
|
||||
if (reasonIdx === -1) {
|
||||
if (config.country === 'FR') reasonIdx = 18;
|
||||
else if (config.country === 'UK') reasonIdx = 9;
|
||||
else if (config.country === 'DE') reasonIdx = 13;
|
||||
else if (config.country === 'IT') reasonIdx = 12;
|
||||
else if (config.country === 'ES') reasonIdx = 13;
|
||||
else reasonIdx = 13;
|
||||
// Fallback to previous hardcoded indices if header search fails or for specific known sheet structures
|
||||
if (reasonIdx === -1 || (config.country === 'FR' && reasonIdx !== 18)) {
|
||||
if (config.country === 'FR') reasonIdx = 18; // Force Column S for FR
|
||||
else if (reasonIdx === -1) {
|
||||
if (config.country === 'UK') reasonIdx = 9;
|
||||
else if (config.country === 'DE') reasonIdx = 13;
|
||||
else if (config.country === 'IT') reasonIdx = 12;
|
||||
else if (config.country === 'ES') reasonIdx = 13;
|
||||
else reasonIdx = 13;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`[BuyBox] Sheet "${sheetName}" (Country: ${config.country}): HeaderRow=${headerRowIdx}, ASIN Col=${finalAsinIdx} ("${headers[finalAsinIdx]}"), Reason Col=${reasonIdx} ("${headers[reasonIdx] || 'N/A'}")`);
|
||||
|
||||
Reference in New Issue
Block a user