|
@@ -158,7 +158,8 @@ if (empty($user->societe_id))
|
|
|
! empty($conf->facture->enabled) && $user->rights->facture->lire,
|
|
|
! empty($conf->contrat->enabled) && $user->rights->contrat->activer,
|
|
|
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire,
|
|
|
- ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire);
|
|
|
+ ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire,
|
|
|
+ ! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire);
|
|
|
// Class file containing the method load_state_board for each line
|
|
|
$includes=array(DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
|
|
DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
|
@@ -171,7 +172,8 @@ if (empty($user->societe_id))
|
|
|
DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
|
|
|
DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
|
|
|
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
|
|
|
- DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php");
|
|
|
+ DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
|
|
|
+ DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php");
|
|
|
// Name class containing the method load_state_board for each line
|
|
|
$classes=array('Client',
|
|
|
'Client',
|
|
@@ -184,7 +186,8 @@ if (empty($user->societe_id))
|
|
|
'Facture',
|
|
|
'Contrat',
|
|
|
'CommandeFournisseur',
|
|
|
- 'FactureFournisseur');
|
|
|
+ 'FactureFournisseur',
|
|
|
+ 'ExpenseReport');
|
|
|
// Cle array returned by the method load_state_board for each line
|
|
|
$keys=array('customers',
|
|
|
'prospects',
|
|
@@ -197,7 +200,8 @@ if (empty($user->societe_id))
|
|
|
'invoices',
|
|
|
'Contracts',
|
|
|
'supplier_orders',
|
|
|
- 'supplier_invoices');
|
|
|
+ 'supplier_invoices',
|
|
|
+ 'expensereports');
|
|
|
// Dashboard Icon lines
|
|
|
$icons=array('company',
|
|
|
'company',
|
|
@@ -210,7 +214,8 @@ if (empty($user->societe_id))
|
|
|
'bill',
|
|
|
'order',
|
|
|
'order',
|
|
|
- 'bill');
|
|
|
+ 'bill',
|
|
|
+ 'trip');
|
|
|
// Translation keyword
|
|
|
$titres=array("ThirdPartyCustomersStats",
|
|
|
"ThirdPartyProspectsStats",
|
|
@@ -223,7 +228,8 @@ if (empty($user->societe_id))
|
|
|
"BillsCustomers",
|
|
|
"Contracts",
|
|
|
"SuppliersOrders",
|
|
|
- "SuppliersInvoices");
|
|
|
+ "SuppliersInvoices",
|
|
|
+ "ExpenseReports");
|
|
|
// Dashboard Link lines
|
|
|
$links=array(DOL_URL_ROOT.'/comm/list.php',
|
|
|
DOL_URL_ROOT.'/comm/prospect/list.php',
|
|
@@ -236,7 +242,8 @@ if (empty($user->societe_id))
|
|
|
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy',
|
|
|
DOL_URL_ROOT.'/contrat/list.php',
|
|
|
DOL_URL_ROOT.'/fourn/commande/list.php',
|
|
|
- DOL_URL_ROOT.'/fourn/facture/list.php');
|
|
|
+ DOL_URL_ROOT.'/fourn/facture/list.php',
|
|
|
+ DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm');
|
|
|
// Translation lang files
|
|
|
$langfile=array("companies",
|
|
|
"prospects",
|
|
@@ -247,7 +254,8 @@ if (empty($user->societe_id))
|
|
|
"propal",
|
|
|
"orders",
|
|
|
"bills",
|
|
|
- "contracts");
|
|
|
+ "contracts",
|
|
|
+ "trips");
|
|
|
|
|
|
|
|
|
// Loop and displays each line of table
|
|
@@ -402,6 +410,15 @@ if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire && ! $use
|
|
|
$dashboardlines[] = $board->load_board($user);
|
|
|
}
|
|
|
|
|
|
+// Number of expense reports to pay
|
|
|
+if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
|
|
|
+{
|
|
|
+ include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
|
|
+ $board=new ExpenseReport($db);
|
|
|
+
|
|
|
+ $dashboardlines[] = $board->load_board($user);
|
|
|
+}
|
|
|
+
|
|
|
// Calculate total nb of late
|
|
|
$totallate=0;
|
|
|
$var=true;
|