From 343c460b86186afae6216284cfb1fad68cefd422 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Mon, 20 Jan 2014 12:09:43 -0500 Subject: [PATCH] Change digikey customer reference column to P/N_LSI --- bomgen/Bomgen/digikey.inc.php | 8 +++++--- bomgen/bomgen.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bomgen/Bomgen/digikey.inc.php b/bomgen/Bomgen/digikey.inc.php index 0e7cc13..0591315 100644 --- a/bomgen/Bomgen/digikey.inc.php +++ b/bomgen/Bomgen/digikey.inc.php @@ -9,6 +9,8 @@ * (at your option) any later version. */ +define("CUSTOMER_REFERENCE_COL_NAME", COMPANY_PN_COL_NAME); + /* Exportation BOM digikey. */ function export_bom_digikey(&$data, $num, $col_num_to_id, $col_id_to_num, $filename) { @@ -29,8 +31,8 @@ function export_bom_digikey(&$data, $num, $col_num_to_id, $col_id_to_num, $filen if ($pn == "") { $pn = "MISSING"; } - } else if ($col_num_to_id[$c] == DESIGNATOR_COL_NAME) { - $refdes = $row[$c]; + } else if ($col_num_to_id[$c] == CUSTOMER_REFERENCE_COL_NAME) { + $customer_ref = $row[$c]; } else if ($col_num_to_id[$c] == "Manufacturer") { $manuf = $row[$c]; } @@ -39,7 +41,7 @@ function export_bom_digikey(&$data, $num, $col_num_to_id, $col_id_to_num, $filen } if ($pn != "MISSING") { - $line = $qty . CSV_DK_DELIM . $manuf . CSV_DK_DELIM . $pn . CSV_DK_DELIM . $refdes . "\r\n"; + $line = $qty . CSV_DK_DELIM . $manuf . CSV_DK_DELIM . $pn . CSV_DK_DELIM . $customer_ref . "\r\n"; fwrite($handle, $line); } } diff --git a/bomgen/bomgen.php b/bomgen/bomgen.php index 4883b72..b5b8c23 100755 --- a/bomgen/bomgen.php +++ b/bomgen/bomgen.php @@ -12,11 +12,11 @@ * (at your option) any later version. */ +require_once 'Bomgen/conf.inc.php'; require_once 'Spreadsheet/Excel/Writer.php'; require_once 'Bomgen/functions.inc.php'; require_once 'Bomgen/refdes.inc.php'; require_once 'Bomgen/digikey.inc.php'; -require_once 'Bomgen/conf.inc.php'; $debug = 0; -- 2.20.1