This commit is contained in:
Laurent Destailleur 2022-12-09 15:30:12 +01:00
parent 7e80c626df
commit b4c16e73b2
4 changed files with 28 additions and 9 deletions

View File

@ -234,7 +234,7 @@ class CommActionRapport
$sql = "SELECT s.nom as thirdparty, s.rowid as socid, s.client,";
$sql .= " a.id, a.datep as dp, a.datep2 as dp2,";
$sql .= " a.fk_contact, a.note, a.percent as percent, a.label, a.fk_project,";
$sql .= " a.fk_contact, a.note, a.percent as percent, a.fulldayevent, a.label, a.fk_project,";
$sql .= " c.code, c.libelle,";
$sql .= " u.login";
$sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a";

View File

@ -50,7 +50,6 @@ if ($user->socid > 0) {
}
$object = new Dolresource($db);
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
@ -246,7 +245,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) {
print '</td></tr>';
// Other attributes
$parameters = array('objectsrc' => $objectsrc);
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {

View File

@ -44,21 +44,39 @@ class Dolresource extends CommonObject
*/
public $picto = 'resource';
/**
* @var int ID
*/
public $fk_code_type_resource;
public $type_label;
public $description;
public $fk_country;
// Variable for a link of resource
/**
* @var int ID
*/
public $resource_id;
public $resource_type;
public $element_id;
public $element_type;
public $busy;
public $mandatory;
/**
* @var int ID
*/
public $fk_user_create;
public $type_label;
public $tms = '';
/**
* @var array Cache of type of resources. TODO Use $conf->cache['type_of_resources'] instead
*/
public $cache_code_type_resource = array();
/**
@ -66,6 +84,7 @@ class Dolresource extends CommonObject
*/
public $oldcopy;
/**
* Constructor
*
@ -339,10 +358,10 @@ class Dolresource extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load object in memory from database
* Load data of link in memory from database
*
* @param int $id id object
* @return int <0 if KO, >0 if OK
* @param int $id Id of link element_resources
* @return int <0 if KO, >0 if OK
*/
public function fetch_element_resource($id)
{

View File

@ -33,6 +33,7 @@ $langs->loadLangs(array("resource", "companies", "other"));
// Get parameters
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
$lineid = GETPOST('lineid', 'int');
$element = GETPOST('element', 'alpha');