Merge pull request #18796 from altairis-noe/warehouse_project_elements
FIX: add warehouse in projects' overview count
This commit is contained in:
commit
6f9fc205ef
@ -126,7 +126,7 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))
|
||||
|| !empty($conf->propal->enabled) || !empty($conf->commande->enabled)
|
||||
|| !empty($conf->facture->enabled) || !empty($conf->contrat->enabled)
|
||||
|| !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled)) {
|
||||
|| !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->stock->enabled)) {
|
||||
$nbElements = 0;
|
||||
// Enable caching of thirdrparty count Contacts
|
||||
$cachekey = 'count_elements_project_'.$project->id;
|
||||
@ -134,6 +134,9 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
if (!is_null($dataretrieved)) {
|
||||
$nbElements = $dataretrieved;
|
||||
} else {
|
||||
if (!empty($conf->stock->enabled)) {
|
||||
$nbElements += $project->getElementCount('stock', 'entrepot', 'fk_project');
|
||||
}
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
$nbElements += $project->getElementCount('propal', 'propal');
|
||||
}
|
||||
|
||||
@ -36,6 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->stock->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
}
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user