diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index a14e006fd7c..48de12a678c 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -1652,7 +1652,7 @@ else
print '
';
print '| '.$langs->trans('Piece').' | ';
print ''.$langs->trans('Date').' | ';
- print ''.$langs->trans('Project').' | ';
+ if (! empty($conf->projet->enabled)) print ''.$langs->trans('Project').' | ';
print ''.$langs->trans('Type').' | ';
print ''.$langs->trans('Description').' | ';
print ''.$langs->trans('VAT').' | ';
@@ -1680,14 +1680,17 @@ else
print img_picto($langs->trans("Document"), "object_generic");
print ' '.$piece_comptable.'';
print ''.dol_print_date($db->jdate($objp->date), 'day').' | ';
- print '';
- if ($objp->projet_id > 0)
+ if (! empty($conf->projet->enabled))
{
- $projecttmp->id=$objp->projet_id;
- $projecttmp->ref=$objp->projet_ref;
- print $projecttmp->getNomUrl(1);
+ print ' | ';
+ if ($objp->projet_id > 0)
+ {
+ $projecttmp->id=$objp->projet_id;
+ $projecttmp->ref=$objp->projet_ref;
+ print $projecttmp->getNomUrl(1);
+ }
+ print ' | ';
}
- print '';
print ''.$langs->trans("TF_".strtoupper($objp->type_fees_libelle)).' | ';
print ''.$objp->comments.' | ';
print ''.vatrate($objp->vatrate,true).' | ';
@@ -1729,10 +1732,13 @@ else
print '';
// Select project
- print '';
- $formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 1, 1);
- print ' | ';
-
+ if (! empty($conf->projet->enabled))
+ {
+ print '';
+ $formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 1, 1);
+ print ' | ';
+ }
+
// Select type
print '';
select_type_fees_id($objp->type_fees_code,'fk_c_type_fees');
@@ -1790,7 +1796,7 @@ else
print ' |
';
print ' | ';
//print ''.$langs->trans('Date').' | ';
- print ''.$langs->trans('Project').' | ';
+ if (! empty($conf->projet->enabled)) print ''.$langs->trans('Project').' | ';
print ''.$langs->trans('Type').' | ';
print ''.$langs->trans('Description').' | ';
print ''.$langs->trans('VAT').' | ';
@@ -1810,10 +1816,13 @@ else
print '';
// Select project
- print '';
- $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1);
- print ' | ';
-
+ if (! empty($conf->projet->enabled))
+ {
+ print '';
+ $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1);
+ print ' | ';
+ }
+
// Select type
print '';
select_type_fees_id($fk_c_type_fees,'fk_c_type_fees',1);
|