From 04f64dd252d16b4092be1a1de59a68c22dc8eeaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2022 18:54:50 +0200 Subject: [PATCH] Look and feel v16 --- htdocs/projet/card.php | 9 +++++---- htdocs/projet/contact.php | 3 +++ htdocs/projet/element.php | 5 ++++- htdocs/projet/tasks/comment.php | 9 ++++----- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 2db236ff606..873cb7ce82d 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1105,21 +1105,22 @@ if ($action == 'create' && $user->rights->projet->creer) { // Opportunity Amount print ''.$langs->trans("OpportunityAmount").''; - /*if ($object->opp_status) - { - print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); - }*/ if (strcmp($object->opp_amount, '')) { print ''.price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency).''; + if (strcmp($object->opp_percent, '')) { + print '       '.$langs->trans("Weighted").': '.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).''; + } } print ''; // Opportunity Weighted Amount + /* print ''.$langs->trans('OpportunityWeightedAmount').''; if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) { print ''.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).''; } print ''; + */ } // Date start - end diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 6eaae5c473d..3230c325039 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -377,6 +377,9 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("OpportunityAmount").''; if (strcmp($object->opp_amount, '')) { print ''.price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency).''; + if (strcmp($object->opp_percent, '')) { + print '       '.$langs->trans("Weighted").': '.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).''; + } } print ''; } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 64f7a221449..caad4374da0 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -299,6 +299,9 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print ''.$langs->trans("OpportunityAmount").''; if (strcmp($object->opp_amount, '')) { print ''.price($object->opp_amount, '', $langs, 1, 0, 0, $conf->currency).''; + if (strcmp($object->opp_percent, '')) { + print '       '.$langs->trans("Weighted").': '.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).''; + } } print ''; } @@ -698,7 +701,7 @@ if (!$showdatefilter) { print $form->selectDate($datee, 'datee', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print ''; print '
'; - print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index c5f655f8e46..e2686ded9f2 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -205,19 +205,18 @@ if ($id > 0 || !empty($ref)) { // Opportunity percent print ''.$langs->trans("OpportunityProbability").''; - if (strcmp($object->opp_percent, '')) { + if (strcmp($projectstatic->opp_percent, '')) { print price($projectstatic->opp_percent, 0, $langs, 1, 0).' %'; } print ''; // Opportunity Amount print ''.$langs->trans("OpportunityAmount").''; - /*if ($object->opp_status) - { - print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); - }*/ if (strcmp($projectstatic->opp_amount, '')) { print price($projectstatic->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + if (strcmp($projectstatic->opp_percent, '')) { + print '       '.$langs->trans("Weighted").': '.price($projectstatic->opp_amount * $projectstatic->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).''; + } } print ''; }