* (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)
{
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];
}
}
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);
}
}