mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Updates for delimiter detection
This commit is contained in:
parent
974b342333
commit
79c293ec93
@ -140,6 +140,10 @@ class BaseImport
|
||||
$delimiters = [',', '.', ';', '|'];
|
||||
$bestDelimiter = ',';
|
||||
$count = 0;
|
||||
|
||||
// 10-01-2024 - A better way to resolve the csv file delimiter.
|
||||
$csvfile = substr($csvfile, 0, strpos($csvfile, "\n"));
|
||||
|
||||
foreach ($delimiters as $delimiter) {
|
||||
|
||||
if (substr_count(strstr($csvfile, "\n", true), $delimiter) >= $count) {
|
||||
|
Loading…
Reference in New Issue
Block a user