From 7e439a824848546a539229f3fd19de4e5fabcf1d Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 10 May 2022 15:50:01 +0200 Subject: [PATCH] add of selectimportfieldsource in lang --- htdocs/imports/import.php | 8 +++++--- htdocs/langs/en_US/exports.lang | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index d4b7ad4e4b6..15d83cfe8e7 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -791,8 +791,10 @@ if ($step == 4 && $datatoimport) { // Put into array fieldssource starting with 1. $i = 1; foreach ($arrayrecord as $key => $val) { - $fieldssource[$i]['example1'] = dol_trunc($val['val'], 24); - $i++; + if ($val["type"] != -1) { + $fieldssource[$i]['example1'] = dol_trunc($val['val'], 24); + $i++; + } } $obj->import_close_file(); } @@ -994,7 +996,7 @@ if ($step == 4 && $datatoimport) { print '
'; print ''; - $s = $langs->trans("SelectImportFields", '{s1}'); + $s = $langs->trans("SelectImportFieldsSource", '{s1}'); $s = str_replace('{s1}', img_picto('', 'grip_title', '', false, 0, 0, '', '', 0), $s); print $s; print ' '; diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index 44cb98d3679..e7ac91e5722 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -136,4 +136,5 @@ NbUpdate=Number of updated lines: %s MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number WarningFirstImportedLine=The first line(s) will not be imported with the current selection -NotUsedFields=Fields of database not used \ No newline at end of file +NotUsedFields=Fields of database not used +SelectImportFieldsSource = Choose the source file fields you want to import and their target field in database by choosing the fields in each select boxes, or select a predefined import profile: