Merge branch 'develop#1' of github.com:Hystepik/dolibarr into develop#1

This commit is contained in:
lmarcouiller 2021-12-20 14:41:08 +01:00
commit 11eac8eee9
3 changed files with 17 additions and 1 deletions

View File

@ -136,7 +136,7 @@ $step = (GETPOST('step') ? GETPOST('step') : 1);
$import_name = GETPOST('import_name');
$hexa = GETPOST('hexa');
$importmodelid = GETPOST('importmodelid');
$excludefirstline = (GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 1);
$excludefirstline = (GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 2);
$endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : '');
$updatekeys = (GETPOST('updatekeys', 'array') ? GETPOST('updatekeys', 'array') : array());
$separator = (GETPOST('separator', 'nohtml') ? GETPOST('separator', 'nohtml') : (!empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? $conf->global->IMPORT_CSV_SEPARATOR_TO_USE : ','));
@ -1526,6 +1526,20 @@ if ($step == 5 && $datatoimport) {
if ($action == 'launchsimu') {
print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>';
}
if ($excludefirstline == 2) {
print $form->textwithpicto("", $langs->trans("WarningFirstImportedLine", $excludefirstline), 1, 'warning', "warningexcludefirstline");
print '<script>
$( document ).ready(function() {
$("input[name=\'excludefirstline\']").on("change",function(){
if($(this).val() <= 1){
$(".warningexcludefirstline").hide();
}else{
$(".warningexcludefirstline").show();
}
})
});
</script>';
}
print '</td></tr>';
// Keys for data UPDATE (not INSERT of new data)

View File

@ -135,3 +135,4 @@ NbInsert=Number of inserted lines: %s
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

View File

@ -135,3 +135,4 @@ NbInsert=Nombre de lignes insérées: %s
NbUpdate=Nombre de lignes mises à jour: %s
MultipleRecordFoundWithTheseFilters=Plusieurs enregistrements ont été trouvés avec ces filtres: %s
StocksWithBatch=Stocks et entrepôts des produits avec numéro de lot/série
WarningFirstImportedLine=Les première(s) ligne(s) ne seront pas importée(s) avec cette selection