diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 1d4218d1cb9..b1c59e430f2 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -164,18 +164,21 @@ dol_fiche_end(); $listofreferent=array( 'propal'=>array( + 'name'=>"Proposalq", 'title'=>"ListProposalsAssociatedProject", 'class'=>'Propal', 'table'=>'propal', 'datefieldname'=>'datep', 'test'=>$conf->propal->enabled && $user->rights->propale->lire), 'order'=>array( + 'name'=>"CustomerOrderq", 'title'=>"ListOrdersAssociatedProject", 'class'=>'Commande', 'table'=>'commande', 'datefieldname'=>'date_commande', 'test'=>$conf->commande->enabled && $user->rights->commande->lire), 'invoice'=>array( + 'name'=>"CustomerInvoiceq", 'title'=>"ListInvoicesAssociatedProject", 'class'=>'Facture', 'margin'=>'add', @@ -183,18 +186,21 @@ $listofreferent=array( 'datefieldname'=>'datef', 'test'=>$conf->facture->enabled && $user->rights->facture->lire), 'invoice_predefined'=>array( + 'name'=>"PredefinedInvoices", 'title'=>"ListPredefinedInvoicesAssociatedProject", 'class'=>'FactureRec', 'table'=>'facture_rec', 'datefieldname'=>'datec', 'test'=>$conf->facture->enabled && $user->rights->facture->lire), 'order_supplier'=>array( + 'name'=>"SuplierOrders", 'title'=>"ListSupplierOrdersAssociatedProject", 'class'=>'CommandeFournisseur', 'table'=>'commande_fournisseur', 'datefieldname'=>'date_commande', 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire), 'invoice_supplier'=>array( + 'name'=>"BillsSuppliers", 'title'=>"ListSupplierInvoicesAssociatedProject", 'class'=>'FactureFournisseur', 'margin'=>'minus', @@ -202,12 +208,14 @@ $listofreferent=array( 'datefieldname'=>'datef', 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire), 'contract'=>array( + 'name'=>"Contracts", 'title'=>"ListContractAssociatedProject", 'class'=>'Contrat', 'table'=>'contrat', 'datefieldname'=>'date_contrat', 'test'=>$conf->contrat->enabled && $user->rights->contrat->lire), 'intervention'=>array( + 'name'=>"Interventions", 'title'=>"ListFichinterAssociatedProject", 'class'=>'Fichinter', 'table'=>'fichinter', @@ -215,6 +223,7 @@ $listofreferent=array( 'disableamount'=>1, 'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire), 'trip'=>array( + 'name'=>"TripAndExpenses", 'title'=>"ListTripAssociatedProject", 'class'=>'Deplacement', 'table'=>'deplacement', @@ -223,6 +232,7 @@ $listofreferent=array( 'disableamount'=>1, 'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire), 'agenda'=>array( + 'name'=>"Agenda", 'title'=>"ListActionsAssociatedProject", 'class'=>'ActionComm', 'table'=>'actioncomm', @@ -445,8 +455,13 @@ foreach ($listofreferent as $key => $value) } } -// Margin display of the project -print_titre("Margin"); +// Profit for all project +$langs->load("suppliers"); +$langs->load("bills"); +$langs->load("orders"); +$langs->load("proposals"); +$langs->load("margin"); +print_titre($langs->trans("Profit")); print ''; print ''; print ''; @@ -455,9 +470,9 @@ print ''; print ''; print ''; - foreach ($listofreferent as $key => $value) { + $name=$langs->trans($value['name']); $title=$value['title']; $classname=$value['class']; $tablename=$value['table']; @@ -486,7 +501,7 @@ foreach ($listofreferent as $key => $value) } print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 73400bbcc6e..2dc0adaa500 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -295,9 +295,6 @@ if ($id > 0 || ! empty($ref)) //$arrayofuseridoftask=$object->getListContactId('internal'); $head=task_prepare_head($object); - dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask'); - - if ($action == 'edit' && $user->rights->projet->creer) { @@ -307,6 +304,8 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; + dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask'); + print '
'.$langs->trans("Element").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
'.$classname.''.$name.''.$i.''.price($total_ht).''.price($total_ttc).'
'; // Ref @@ -372,10 +371,12 @@ if ($id > 0 || ! empty($ref)) print '
'; - print '

'; + dol_fiche_end(); + + print '
'; print '   '; print ''; - print '
'; + print '
'; print ''; } @@ -387,6 +388,8 @@ if ($id > 0 || ! empty($ref)) $param=($withproject?'&withproject=1':''); $linkback=$withproject?''.$langs->trans("BackToList").'':''; + dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask'); + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete"); @@ -471,12 +474,11 @@ if ($id > 0 || ! empty($ref)) print ''; + dol_fiche_end(); } - dol_fiche_end(); - - if ($_GET["action"] != 'edit') + if ($action != 'edit') { /* * Actions