From: Hugo Villeneuve Date: Mon, 20 Jan 2014 17:09:43 +0000 (-0500) Subject: Change digikey customer reference column to P/N_LSI X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=343c460b86186afae6216284cfb1fad68cefd422;p=eda-utils.git Change digikey customer reference column to P/N_LSI --- 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;