diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 5e38198ab60..c97b841e3a1 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -82,7 +82,7 @@ $pid=GETPOST("projectid","int",3);
$status=GETPOST("status");
$type=GETPOST("type");
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
-$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
+$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') {
$action='show_month'; $day='';
@@ -236,7 +236,7 @@ if ($filterd) $param.="&filterd=".$filterd;
if ($socid) $param.="&socid=".$socid;
if ($showbirthday) $param.="&showbirthday=1";
if ($pid) $param.="&projectid=".$pid;
-if ($actioncode) $param.="&actioncode=".$actioncode;
+if ($actioncode != '') $param.="&actioncode=".$actioncode;
if ($type) $param.="&type=".$type;
if ($action == 'show_day' || $action == 'show_week') $param.='&action='.$action;
$param.="&maxprint=".$maxprint;
@@ -382,10 +382,10 @@ if ($resql)
$event->type_code=$obj->code;
$event->libelle=$obj->label;
$event->percentage=$obj->percent;
- $event->author->id=$obj->fk_user_author;
- $event->usertodo->id=$obj->fk_user_action;
- $event->userdone->id=$obj->fk_user_done;
-
+ $event->author->id=$obj->fk_user_author; // user id of creator
+ $event->usertodo->id=$obj->fk_user_action; // user id of owner
+ $event->userdone->id=$obj->fk_user_done; // deprecated
+ // $event->userstodo=... with s after user, in future version, will be an array with all id of user assigned to event
$event->priority=$obj->priority;
$event->fulldayevent=$obj->fulldayevent;
$event->location=$obj->location;
@@ -952,11 +952,10 @@ llxFooter();
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
{
global $user, $conf, $langs;
- global $filter, $filtera, $filtert, $filterd, $status;
+ global $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form
global $theme_datacolor;
global $cachethirdparties, $cachecontacts, $colorindexused;
-
print '
'."\n";
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
print '
';
@@ -1009,6 +1008,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|| (! empty($event->userdone->id) && $event->userdone->id == $user->id))
{
$nummytasks++; $cssclass='family_mytasks';
+ // TODO Set a color using user color
+ // Must defined rule to choose color of who to use.
+ // event->usertodo->id will still contains user id of owner
+ // event->userstodo will be an array in future.
+ // $color=$user->color;
}
else if ($event->type_code == 'ICALEVENT')
{
@@ -1179,9 +1183,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
}
else
{
- print ''.img_picto("all","1downarrow_selected.png").' ...';
print ' +'.(count($eventarray[$daykey])-$maxprint);
print '';
diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql
index 275abc53370..ea70aa02385 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm.sql
+++ b/htdocs/install/mysql/tables/llx_actioncomm.sql
@@ -32,21 +32,23 @@ create table llx_actioncomm
fk_action integer, -- type of action (optionnal link with llx_c_actioncomm or null)
code varchar(32) NULL, -- code of action for automatic action
- label varchar(128) NOT NULL, -- libelle de l'action
+ label varchar(128) NOT NULL, -- label/title of event
datec datetime, -- date creation
- tms timestamp, -- date modif
- fk_user_author integer, -- id user qui a cree l'action
- fk_user_mod integer, -- id dernier user qui a modifier l'action
+ tms timestamp, -- date modification
+ fk_user_author integer, -- user id of user that has created record
+ fk_user_mod integer, -- user id of user that has modified record
fk_project integer,
fk_soc integer,
fk_contact integer,
fk_parent integer NOT NULL default 0,
- fk_user_action integer, -- id de la personne qui doit effectuer l'action
- transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event.
- fk_user_done integer, -- id de la personne qui a effectue l'action
+ fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_actors)
+
+ transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_actors)
+ fk_user_done integer, -- user id of people that has made action (deprecated)
+
priority smallint,
fulldayevent smallint NOT NULL default 0,
punctual smallint NOT NULL default 1,
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 97ad7b33ef5..1ac8d9cbfd5 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -621,7 +621,7 @@ class Product extends CommonObject
}
// Delete all child tables
- $elements = array('product_fournisseur_price','product_price','product_lang','categorie_product');
+ $elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock');
foreach($elements as $table)
{
if (! $error)
@@ -644,7 +644,7 @@ class Product extends CommonObject
{
$sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product";
$sqlz.= " WHERE rowid = ".$id;
- dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
+ dol_syslog(get_class($this).'::delete sql='.$sqlz, LOG_DEBUG);
$resultz = $this->db->query($sqlz);
if ( ! $resultz )
{
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index 584f5773ede..6e4ada58b34 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -61,6 +61,7 @@ class MouvementStock
{
global $conf, $langs;
+ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$error = 0;
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");