forked from Wavyzz/dolibarr
FIX Missing extrafields into export of agenda record
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
|
||||
// $keyforselect = name of main table
|
||||
// keyforelement = name of picto
|
||||
// $keyforaliasextra = a key to avoid conflict with extrafields of other objects
|
||||
|
||||
if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra))
|
||||
{
|
||||
//print $keyforselet.' - '.$keyforelement.' - '.$keyforaliasextra;
|
||||
|
||||
@@ -454,8 +454,12 @@ class modAgenda extends DolibarrModules
|
||||
'p.ref' => 'project',
|
||||
);
|
||||
|
||||
$keyforselect = 'actioncomm'; $keyforelement = 'action'; $keyforaliasextra = 'extra';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
|
||||
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'actioncomm as ac';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_extrafields as extra ON ac.id = extra.fk_object';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_actioncomm as cac on ac.fk_action = cac.id';
|
||||
if (!empty($user) && empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_resources acr on ac.id = acr.fk_actioncomm';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp on ac.fk_contact = sp.rowid';
|
||||
|
||||
Reference in New Issue
Block a user