diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 60c3cc4882b..e2613e235ae 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1447,13 +1447,13 @@ if ($id > 0 || ! empty($ref))
{
$var=true;
- $propal->showAddFreeProductForm($propal);
+ $propal->showAddFreeProductForm();
// Add predefined products/services
if ($conf->product->enabled || $conf->service->enabled)
{
$var=!$var;
- $propal->showAddPredefinedProductForm($propal);
+ $propal->showAddPredefinedProductForm();
}
// Add hook of other modules
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index f8f09e42dee..9f6d13a1c42 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1936,143 +1936,15 @@ else
*/
if ($commande->statut == 0 && $user->rights->commande->creer && $_GET["action"] <> 'editline')
{
- 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
- print '';
-
- // Ajout de produits/services predefinis
+
+ $commande->showAddFreeProductForm(1);
+
+ // Add predefined products/services
if ($conf->product->enabled || $conf->service->enabled)
{
- print '';
- print '| ';
- print $langs->trans("AddNewLine").' - ';
- if ($conf->service->enabled)
- {
- print $langs->trans('RecordedProductsAndServices');
- }
- else
- {
- print $langs->trans('RecordedProducts');
- }
- print ' | ';
- print ''.$langs->trans('Qty').' | ';
- print ''.$langs->trans('ReductionShort').' | ';
- print ' | ';
- print '
';
-
- print '';
+ $commande->showAddPredefinedProductForm(1);
}
}
print '';
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 16186ebc1c4..5540a6c4909 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1153,7 +1153,7 @@ class CommonObject
/**
* Show add free products/services form
*/
- function showAddFreeProductForm($object)
+ function showAddFreeProductForm($dateSelector=0)
{
global $conf,$langs;
global $html,$bc,$var;
@@ -1164,7 +1164,7 @@ class CommonObject
/**
* Show add predefined products/services form
*/
- function showAddPredefinedProductForm($object)
+ function showAddPredefinedProductForm($dateSelector=0)
{
global $conf,$langs;
global $html,$bc,$var;
diff --git a/htdocs/core/tpl/addfreeproductform.tpl.php b/htdocs/core/tpl/addfreeproductform.tpl.php
index c5d3c4d189a..34f57ecb034 100644
--- a/htdocs/core/tpl/addfreeproductform.tpl.php
+++ b/htdocs/core/tpl/addfreeproductform.tpl.php
@@ -35,10 +35,10 @@ if ($conf->global->PRODUIT_USE_MARKUP) $colspan = 'colspan="2"';
|
-
diff --git a/htdocs/core/tpl/addpredefinedproductform.tpl.php b/htdocs/core/tpl/addpredefinedproductform.tpl.php
index d69feb9c4da..13d2c39bb16 100644
--- a/htdocs/core/tpl/addpredefinedproductform.tpl.php
+++ b/htdocs/core/tpl/addpredefinedproductform.tpl.php
@@ -43,10 +43,10 @@ $colspan = 'colspan="3"';
|
-