Added new event from member module to possible agenda tracked events.
This commit is contained in:
parent
7a98515bf4
commit
40f94a5668
@ -24,7 +24,9 @@ For users:
|
|||||||
- Add juridical status and number of employees in third party
|
- Add juridical status and number of employees in third party
|
||||||
export definition.
|
export definition.
|
||||||
- A lot of enhancements and translation in withdraw module.
|
- A lot of enhancements and translation in withdraw module.
|
||||||
|
- Full support of Mysql option mode=strict.
|
||||||
|
- Added new event from member module to possible agenda tracked events.
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- The errors language file contains only error or warning messages with
|
- The errors language file contains only error or warning messages with
|
||||||
prefix Error or Warning.
|
prefix Error or Warning.
|
||||||
@ -33,6 +35,7 @@ For translators:
|
|||||||
For developers:
|
For developers:
|
||||||
- Update skeletons.
|
- Update skeletons.
|
||||||
- Add an experimental Cash Desk module.
|
- Add an experimental Cash Desk module.
|
||||||
|
- Added new triggers events in agenda module.
|
||||||
- All submodules are moved in the includes directory.
|
- All submodules are moved in the includes directory.
|
||||||
- Removed some deprecated files.
|
- Removed some deprecated files.
|
||||||
|
|
||||||
|
|||||||
@ -18,19 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/actioncomm.class.php
|
* \file htdocs/actioncomm.class.php
|
||||||
\ingroup commercial
|
* \ingroup commercial
|
||||||
\brief Fichier de la classe des actions commerciales
|
* \brief Fichier de la classe des actions commerciales
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/cactioncomm.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/cactioncomm.class.php');
|
||||||
|
|
||||||
|
|
||||||
/** \class ActionComm
|
/** \class ActionComm
|
||||||
\brief Classe permettant la gestion des actions commerciales
|
* \brief Classe permettant la gestion des actions commerciales
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ActionComm
|
class ActionComm
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
@ -133,7 +131,7 @@ class ActionComm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin("ActionComm::add");
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm";
|
||||||
$sql.= "(datec,";
|
$sql.= "(datec,";
|
||||||
@ -143,7 +141,9 @@ class ActionComm
|
|||||||
$sql.= "datea2,";
|
$sql.= "datea2,";
|
||||||
$sql.= "durationp,";
|
$sql.= "durationp,";
|
||||||
$sql.= "durationa,";
|
$sql.= "durationa,";
|
||||||
$sql.= "fk_action,fk_soc,note,";
|
$sql.= "fk_action,";
|
||||||
|
$sql.= "fk_soc,";
|
||||||
|
$sql.= "note,";
|
||||||
$sql.= "fk_contact,";
|
$sql.= "fk_contact,";
|
||||||
$sql.= "fk_user_author,";
|
$sql.= "fk_user_author,";
|
||||||
$sql.= "fk_user_action,";
|
$sql.= "fk_user_action,";
|
||||||
@ -158,7 +158,9 @@ class ActionComm
|
|||||||
$sql.= (strval($this->dateend)!=''?"'".$this->db->idate($this->dateend)."'":"null").",";
|
$sql.= (strval($this->dateend)!=''?"'".$this->db->idate($this->dateend)."'":"null").",";
|
||||||
$sql.= ($this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
|
$sql.= ($this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
|
||||||
$sql.= ($this->durationa >= 0 && $this->durationa != ''?"'".$this->durationa."'":"null").",";
|
$sql.= ($this->durationa >= 0 && $this->durationa != ''?"'".$this->durationa."'":"null").",";
|
||||||
$sql.= "'".$this->type_id."', '".$this->societe->id."' ,'".addslashes($this->note)."',";
|
$sql.= " '".$this->type_id."',";
|
||||||
|
$sql.= ($this->societe->id>0?" '".$this->societe->id."'":"null").",";
|
||||||
|
$sql.= " '".addslashes($this->note)."',";
|
||||||
$sql.= ($this->contact->id > 0?"'".$this->contact->id."'":"null").",";
|
$sql.= ($this->contact->id > 0?"'".$this->contact->id."'":"null").",";
|
||||||
$sql.= ($user->id > 0 ? "'".$user->id."'":"null").",";
|
$sql.= ($user->id > 0 ? "'".$user->id."'":"null").",";
|
||||||
$sql.= ($this->usertodo->id > 0?"'".$this->usertodo->id."'":"null").",";
|
$sql.= ($this->usertodo->id > 0?"'".$this->usertodo->id."'":"null").",";
|
||||||
@ -185,13 +187,13 @@ class ActionComm
|
|||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit("ActionComm::add");
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror().' sql='.$sql;
|
$this->error=$this->db->lasterror().' sql='.$sql;
|
||||||
$this->db->rollback();
|
$this->db->rollback("ActionComm::add");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -130,7 +130,7 @@ if (sizeof($array_options)>0)
|
|||||||
print "<td>".$adho->attribute_label[$key]." </td>\n";
|
print "<td>".$adho->attribute_label[$key]." </td>\n";
|
||||||
print "<td>$key</td>\n";
|
print "<td>$key</td>\n";
|
||||||
print "<td>$value</td>\n";
|
print "<td>$value</td>\n";
|
||||||
print "<td align=\"center\"><a href=\"options.php?action=edit&attrname=$key\">".img_edit()."</a>";
|
print "<td align=\"right\"><a href=\"options.php?action=edit&attrname=$key\">".img_edit()."</a>";
|
||||||
print " <a href=\"options.php?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
print " <a href=\"options.php?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
// $i++;
|
// $i++;
|
||||||
|
|||||||
@ -53,8 +53,10 @@ $eventstolog=array(
|
|||||||
array('id'=>'BILL_SUPPLIER_VALIDATE', 'test'=>$conf->fournisseur->enabled),
|
array('id'=>'BILL_SUPPLIER_VALIDATE', 'test'=>$conf->fournisseur->enabled),
|
||||||
// array('id'=>'PAYMENT_CUSTOMER_CREATE','test'=>$conf->facture->enabled),
|
// array('id'=>'PAYMENT_CUSTOMER_CREATE','test'=>$conf->facture->enabled),
|
||||||
// array('id'=>'PAYMENT_SUPPLIER_CREATE','test'=>$conf->fournisseur->enabled),
|
// array('id'=>'PAYMENT_SUPPLIER_CREATE','test'=>$conf->fournisseur->enabled),
|
||||||
// array('id'=>'MEMBER_VALIDATE', 'test'=>$conf->adherent->enabled),
|
array('id'=>'MEMBER_VALIDATE', 'test'=>$conf->adherent->enabled),
|
||||||
// array('id'=>'MEMBER_SUBSCRIPTION', 'test'=>$conf->adherent->enabled),
|
array('id'=>'MEMBER_SUBSCRIPTION', 'test'=>$conf->adherent->enabled),
|
||||||
|
array('id'=>'MEMBER_RESILIATE', 'test'=>$conf->adherent->enabled),
|
||||||
|
array('id'=>'MEMBER_DELETE', 'test'=>$conf->adherent->enabled),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,6 +68,8 @@ $day=isset($_REQUEST["day"])?$_REQUEST["day"]:0;
|
|||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -413,7 +415,7 @@ if ($_GET["action"] != 'show_day')
|
|||||||
{
|
{
|
||||||
$style='cal_other_month';
|
$style='cal_other_month';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events ($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $style, $actionarray,3);
|
show_day_events ($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $style, $actionarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
/* Show days of the current month */
|
/* Show days of the current month */
|
||||||
@ -429,7 +431,7 @@ if ($_GET["action"] != 'show_day')
|
|||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
|
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday, $month, $year, $style, $actionarray, 3);
|
show_day_events($db, $tmpday, $month, $year, $style, $actionarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
/* Show days after the current month (next month) */
|
/* Show days after the current month (next month) */
|
||||||
@ -437,7 +439,7 @@ if ($_GET["action"] != 'show_day')
|
|||||||
{
|
{
|
||||||
$style='cal_other_month';
|
$style='cal_other_month';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $style, $actionarray, 3);
|
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $style, $actionarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
}
|
}
|
||||||
$tmpday++;
|
$tmpday++;
|
||||||
@ -448,6 +450,7 @@ if ($_GET["action"] != 'show_day')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Code to show just one day
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
$timestamp=dolibarr_mktime(12,0,0,$month,$_GET["day"],$year);
|
$timestamp=dolibarr_mktime(12,0,0,$month,$_GET["day"],$year);
|
||||||
$arraytimestamp=adodb_getdate(dolibarr_mktime(12,0,0,$month,$_GET["day"],$year));
|
$arraytimestamp=adodb_getdate(dolibarr_mktime(12,0,0,$month,$_GET["day"],$year));
|
||||||
@ -458,7 +461,7 @@ else
|
|||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events ($db, $_GET["day"], $month, $year, $style, $actionarray);
|
show_day_events ($db, $_GET["day"], $month, $year, $style, $actionarray, 0, 0);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
@ -480,16 +483,17 @@ llxFooter('$Date$ - $Revision$');
|
|||||||
* @param unknown_type $year Year
|
* @param unknown_type $year Year
|
||||||
* @param unknown_type $style Style to use for this day
|
* @param unknown_type $style Style to use for this day
|
||||||
* @param unknown_type $actionarray Array of actions
|
* @param unknown_type $actionarray Array of actions
|
||||||
* @param unknown_type $maxPrint Nb of actions to show each day on month view
|
* @param unknown_type $maxPrint Nb of actions to show each day on month view (0 means non limit)
|
||||||
|
* @param unknown_type nbofchartoshow Nb of characters to show for event line
|
||||||
*/
|
*/
|
||||||
function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPrint=-1)
|
function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPrint=0, $nbofchartoshow=14)
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs;
|
global $user, $conf, $langs;
|
||||||
global $filtera, $filtert, $filted;
|
global $filtera, $filtert, $filted;
|
||||||
global $theme_datacolor;
|
global $theme_datacolor;
|
||||||
if ($_GET["action"] == 'maxPrint')
|
if ($_GET["action"] == 'maxPrint')
|
||||||
{
|
{
|
||||||
$maxPrint=-1;
|
$maxPrint=0;
|
||||||
}
|
}
|
||||||
$curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year);
|
$curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year);
|
||||||
|
|
||||||
@ -517,7 +521,7 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
|
|||||||
foreach ($actionarray[$daykey] as $index => $action)
|
foreach ($actionarray[$daykey] as $index => $action)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($i < $maxPrint || $maxPrint == -1)
|
if ($i < $maxPrint || $maxPrint == 0)
|
||||||
{
|
{
|
||||||
$ponct=($action->date_start_in_calendar == $action->date_end_in_calendar);
|
$ponct=($action->date_start_in_calendar == $action->date_end_in_calendar);
|
||||||
// Show rect of event
|
// Show rect of event
|
||||||
@ -562,11 +566,11 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
|
|||||||
print dolibarr_print_date($action->date_end_in_calendar,'%H:%M');
|
print dolibarr_print_date($action->date_end_in_calendar,'%H:%M');
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print $action->getNomUrl(0,14,'cal_event');
|
print $action->getNomUrl(0,$nbofchartoshow,'cal_event');
|
||||||
}
|
}
|
||||||
else // It's a birthday
|
else // It's a birthday
|
||||||
{
|
{
|
||||||
print $action->getNomUrl(0,14,'cal_event','birthday');
|
print $action->getNomUrl(0,$nbofchartoshow,'cal_event','birthday');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" nowrap="nowrap">';
|
print '<td align="right" nowrap="nowrap">';
|
||||||
|
|||||||
@ -402,11 +402,18 @@ class InterfaceLogevents
|
|||||||
// Members
|
// Members
|
||||||
elseif ($action == 'MEMBER_CREATE')
|
elseif ($action == 'MEMBER_CREATE')
|
||||||
{
|
{
|
||||||
$this->date=time();
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
|
||||||
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("NewMemberCreated",$object->id);
|
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("NewMemberCreated",$object->id);
|
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
}
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
}
|
||||||
elseif ($action == 'MEMBER_VALIDATE')
|
elseif ($action == 'MEMBER_VALIDATE')
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
@ -415,8 +422,8 @@ class InterfaceLogevents
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -429,8 +436,8 @@ class InterfaceLogevents
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||||
@ -445,8 +452,8 @@ class InterfaceLogevents
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -459,8 +466,8 @@ class InterfaceLogevents
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -473,8 +480,8 @@ class InterfaceLogevents
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|||||||
@ -104,8 +104,8 @@ class InterfaceActionsAuto
|
|||||||
|
|
||||||
// Following properties must be filled:
|
// Following properties must be filled:
|
||||||
// $object->actiontypecode;
|
// $object->actiontypecode;
|
||||||
// $object->actionmsg (label)
|
// $object->actionmsg (note, long text)
|
||||||
// $object->actionmsg2 (note)
|
// $object->actionmsg2 (label, short text)
|
||||||
// $object->sendtoid
|
// $object->sendtoid
|
||||||
// $object->socid
|
// $object->socid
|
||||||
// Optionnal:
|
// Optionnal:
|
||||||
@ -328,7 +328,87 @@ class InterfaceActionsAuto
|
|||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Members
|
||||||
|
elseif ($action == 'MEMBER_VALIDATE')
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
|
$object->actiontypecode='AC_OTH';
|
||||||
|
$object->actionmsg2=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
|
$object->sendtoid=0;
|
||||||
|
$object->facid=0; // Supplier invoice not yet supported
|
||||||
|
$object->orderrowid=$object->propalrowid=0;
|
||||||
|
$ok=1;
|
||||||
|
}
|
||||||
|
elseif ($action == 'MEMBER_SUBSCRIPTION')
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
|
$object->actiontypecode='AC_OTH';
|
||||||
|
$object->actionmsg2=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day');
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
|
$object->sendtoid=0;
|
||||||
|
$object->facid=$object->orderrowid=$object->propalrowid=0;
|
||||||
|
$ok=1;
|
||||||
|
}
|
||||||
|
elseif ($action == 'MEMBER_MODIFY')
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'MEMBER_RESILIATE')
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
|
$object->actiontypecode='AC_OTH';
|
||||||
|
$object->actionmsg2=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
|
$object->sendtoid=0;
|
||||||
|
$object->facid=$object->orderrowid=$object->propalrowid=0;
|
||||||
|
$ok=1;
|
||||||
|
}
|
||||||
|
elseif ($action == 'MEMBER_DELETE')
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
|
$object->actiontypecode='AC_OTH';
|
||||||
|
$object->actionmsg2=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
|
$object->sendtoid=0;
|
||||||
|
$object->facid=$object->orderrowid=$object->propalrowid=0;
|
||||||
|
$ok=1;
|
||||||
|
}
|
||||||
|
|
||||||
// If not found
|
// If not found
|
||||||
/*
|
/*
|
||||||
else
|
else
|
||||||
|
|||||||
@ -101,6 +101,12 @@ class InterfaceLdapsynchro
|
|||||||
|
|
||||||
if (! $conf->ldap->enabled) return 0; // Module non actif
|
if (! $conf->ldap->enabled) return 0; // Module non actif
|
||||||
|
|
||||||
|
if (! function_exists('ldap_connect'))
|
||||||
|
{
|
||||||
|
dolibarr_syslog("Warning, module LDAP is enabled but LDAP functions not available in this PHP", LOG_WARNING);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Users
|
// Users
|
||||||
if ($action == 'USER_CREATE')
|
if ($action == 'USER_CREATE')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -288,7 +288,18 @@ class InterfacePhenixsynchro
|
|||||||
// Members
|
// Members
|
||||||
elseif ($action == 'MEMBER_CREATE')
|
elseif ($action == 'MEMBER_CREATE')
|
||||||
{
|
{
|
||||||
}
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
|
||||||
|
$this->date=time();
|
||||||
|
$this->duree=0;
|
||||||
|
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
|
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
}
|
||||||
elseif ($action == 'MEMBER_VALIDATE')
|
elseif ($action == 'MEMBER_VALIDATE')
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
@ -297,8 +308,8 @@ class InterfacePhenixsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -311,8 +322,8 @@ class InterfacePhenixsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||||
@ -327,8 +338,8 @@ class InterfacePhenixsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -341,8 +352,8 @@ class InterfacePhenixsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -355,8 +366,8 @@ class InterfacePhenixsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|||||||
@ -265,7 +265,18 @@ class InterfaceWebcalsynchro
|
|||||||
// Members
|
// Members
|
||||||
elseif ($action == 'MEMBER_CREATE')
|
elseif ($action == 'MEMBER_CREATE')
|
||||||
{
|
{
|
||||||
}
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("members");
|
||||||
|
|
||||||
|
$this->date=time();
|
||||||
|
$this->duree=0;
|
||||||
|
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
|
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
}
|
||||||
elseif ($action == 'MEMBER_VALIDATE')
|
elseif ($action == 'MEMBER_VALIDATE')
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
@ -274,8 +285,8 @@ class InterfaceWebcalsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -288,8 +299,8 @@ class InterfaceWebcalsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||||
@ -304,8 +315,8 @@ class InterfaceWebcalsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -318,8 +329,8 @@ class InterfaceWebcalsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
@ -332,8 +343,8 @@ class InterfaceWebcalsynchro
|
|||||||
|
|
||||||
$this->date=time();
|
$this->date=time();
|
||||||
$this->duree=0;
|
$this->duree=0;
|
||||||
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
|
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|||||||
@ -95,7 +95,8 @@ class Interfaces
|
|||||||
dolibarr_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO);
|
dolibarr_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
|
||||||
|
dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||||
include_once($this->dir."/".$file);
|
include_once($this->dir."/".$file);
|
||||||
$objMod = new $modName($this->db);
|
$objMod = new $modName($this->db);
|
||||||
if ($objMod)
|
if ($objMod)
|
||||||
|
|||||||
@ -118,6 +118,7 @@ SupplierPaymentDoneInDolibarr=Supplier payment %s done in Dolibarr
|
|||||||
MemberValidatedInDolibarr=Member %s validated in Dolibarr
|
MemberValidatedInDolibarr=Member %s validated in Dolibarr
|
||||||
MemberResiliatedInDolibarr=Member %s resiliated in Dolibarr
|
MemberResiliatedInDolibarr=Member %s resiliated in Dolibarr
|
||||||
MemberDeletedInDolibarr=Member %s deleted from Dolibarr
|
MemberDeletedInDolibarr=Member %s deleted from Dolibarr
|
||||||
|
MemberSubscriptionAddedInDolibarr=Subscription for member %s added in Dolibarr
|
||||||
##### Export #####
|
##### Export #####
|
||||||
ExportsArea=Exports area
|
ExportsArea=Exports area
|
||||||
AvailableFormats=Available formats
|
AvailableFormats=Available formats
|
||||||
|
|||||||
@ -120,6 +120,7 @@ SupplierPaymentDoneInDolibarr=Paiement fournisseur %s dans Dolibarr
|
|||||||
MemberValidatedInDolibarr=Adhérent %s validé dans Dolibarr
|
MemberValidatedInDolibarr=Adhérent %s validé dans Dolibarr
|
||||||
MemberResiliatedInDolibarr=Adhérent %s résilié dans Dolibarr
|
MemberResiliatedInDolibarr=Adhérent %s résilié dans Dolibarr
|
||||||
MemberDeletedInDolibarr=Adhérent %s supprimé de Dolibarr
|
MemberDeletedInDolibarr=Adhérent %s supprimé de Dolibarr
|
||||||
|
MemberSubscriptionAddedInDolibarr=Souscription adhérent %s ajoutée dans Dolibarr
|
||||||
##### Export #####
|
##### Export #####
|
||||||
ExportsArea=Espace exports
|
ExportsArea=Espace exports
|
||||||
AvailableFormats=Formats disponibles
|
AvailableFormats=Formats disponibles
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user