diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php
index d47f147b1aa..5b8bd88a920 100644
--- a/htdocs/comm/askpricesupplier/card.php
+++ b/htdocs/comm/askpricesupplier/card.php
@@ -29,6 +29,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaskpricesupplier.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
require_once DOL_DOCUMENT_ROOT . '/comm/askpricesupplier/class/askpricesupplier.class.php';
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/modules/askpricesupplier/modules_askpricesupplier.php';
@@ -977,6 +978,7 @@ $form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formaskpricesupplier = new FormAskPriceSupplier($db);
+$formmargin = new FormMargin($this->db);
$companystatic = new Societe($db);
$now = dol_now();
@@ -1500,7 +1502,7 @@ if ($action == 'create')
// Margin Infos
if (! empty($conf->margin->enabled)) {
print '
';
- $object->displayMarginInfos();
+ $formmargin->displayMarginInfos($object);
print ' | ';
}
print '';
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 7e4547d2ded..e8f374c3b8d 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -35,6 +35,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formpropal.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/modules/propale/modules_propale.php';
@@ -1183,6 +1184,7 @@ $form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formpropal = new FormPropal($db);
+$formmargin = new FormMargin($this->db);
$companystatic = new Societe($db);
if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
@@ -1986,7 +1988,7 @@ if ($action == 'create')
// Margin Infos
if (! empty($conf->margin->enabled)) {
print '';
- $object->displayMarginInfos();
+ $formmargin->displayMarginInfos($object);
print ' | ';
}
print '';
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 1c3edf7d8b6..d5f3427b77c 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -36,6 +36,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formorder.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php';
require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
@@ -1222,6 +1223,7 @@ llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|
$form = new Form($db);
$formfile = new FormFile($db);
$formorder = new FormOrder($db);
+$formmargin = new FormMargin($db);
if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
/**
@@ -2084,7 +2086,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Margin Infos
if (! empty($conf->margin->enabled)) {
print '';
- $object->displayMarginInfos();
+ $formmargin->displayMarginInfos($object);
print ' | ';
} else
print ' | ';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 01b630f1449..e23f1f9414a 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -42,6 +42,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
@@ -1800,6 +1801,7 @@ if (empty($reshook))
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
+$formmargin = new FormMargin($this->db);
$bankaccountstatic = new Account($db);
if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
@@ -3166,7 +3168,7 @@ else if ($id > 0 || ! empty($ref))
if (! empty($conf->margin->enabled))
{
print '
';
- $object->displayMarginInfos($object->statut > 0);
+ $formmargin->displayMarginInfos($object, $object->statut > 0);
}
print '';