diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index 02480058498dd..4255f124c1ccc 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -487,7 +487,7 @@ function price2numjs(num)
function setforfree() {
jQuery("#search_idprod").val('');
jQuery("#idprod").val('');
- jQuery("#idprodfournprice").val('');
+ jQuery("#idprodfournprice").val('0'); // Set cursor on not selected product
jQuery("#search_idprodfournprice").val('');
jQuery("#prod_entry_mode_free").attr('checked',true);
jQuery("#prod_entry_mode_predef").attr('checked',false);
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index bcd98329e69df..22df11dd7ae7e 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -1734,17 +1734,6 @@
// Form to add new line
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer && $action <> 'edit_line')
{
- /*print '
';
- print '';
- print ''; // ancre
- print $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone").' | ';
- print ''.$langs->trans('VAT').' | ';
- print ''.$langs->trans('PriceUHT').' | ';
- print ''.$langs->trans('Qty').' | ';
- print ''.$langs->trans('ReductionShort').' | ';
- print ' | ';
- print '
';*/
-
// Add free products/services form
global $forceall, $senderissupplier, $dateSelector;
$forceall=1; $senderissupplier=1; $dateSelector=0;
@@ -1761,97 +1750,6 @@
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
}
}
-
-/*
- $var=true;
- print '';
- print '';
-
- $forceall=1;
- print $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall);
- if ($forceall || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))
- || (empty($conf->product->enabled) && empty($conf->service->enabled))) print ' ';
-
- if (is_object($hookmanager))
- {
- $parameters=array();
- $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
- }
-
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- $doleditor = new DolEditor('dp_desc', GETPOST('dp_desc'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70);
- $doleditor->Create();
-
- print ' | ';
- print '';
- print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$object->thirdparty,$mysoc);
- print ' | ';
- print ' | ';
- print ' | ';
- print '% | ';
- print ' | ';
- print '
';
-
- // Ajout de produits/services predefinis
- if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
- {
- print '';
-
- print '';
- print '';
- print $langs->trans("AddNewLine").' - ';
- if (! empty($conf->service->enabled))
- {
- print $langs->trans('RecordedProductsAndServices');
- }
- else
- {
- print $langs->trans('RecordedProducts');
- }
- print ' | ';
- print ''.$langs->trans('Qty').' | ';
- print ''.$langs->trans('ReductionShort').' | ';
- print ' | ';
- print '
';
-
- $var=!$var;
- print '';
- print '';
-
-
- $ajaxoptions=array(
- 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
- 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
- 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
- );
- $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions);
-
- if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print ' ';
-
- if (is_object($hookmanager))
- {
- $parameters=array('htmlname'=>'idprodfournprice');
- $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action);
- }
-
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- $doleditor = new DolEditor('np_desc', GETPOST('np_desc'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70);
- $doleditor->Create();
-
- print ' | ';
- print ' | ';
- print '% | ';
- print ' | ';
- print '
';
- }*/
}
print '';