From 50edf63448a9ab4bbb4f7e635616b1b497e22406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 24 Sep 2015 21:05:58 +0200 Subject: [PATCH] [Qual] Replaced deprecated displayMarginInfos() --- htdocs/comm/askpricesupplier/card.php | 4 +++- htdocs/comm/propal.php | 4 +++- htdocs/commande/card.php | 4 +++- htdocs/compta/facture.php | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php index 22732c1a19d..ab015103afa 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 24b7ab16d69..86895d7ca68 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 83b86ee5525..9caed2f22a2 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 6b0af5f7043..0e04b8f26d5 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 '';