Merge branch 'develop' of github.com:Dolibarr/dolibarr into New_look_and_feel_appli
This commit is contained in:
commit
71a623dd53
@ -112,6 +112,7 @@ NEW: When you create product or service, sell accountancy account by default is
|
|||||||
NEW: Widget birthdays of the month.
|
NEW: Widget birthdays of the month.
|
||||||
NEW: Option in workflow module to set a reception billed on validate supplier bill.
|
NEW: Option in workflow module to set a reception billed on validate supplier bill.
|
||||||
NEW: Autocompletion on lists should be available on mobile applications.
|
NEW: Autocompletion on lists should be available on mobile applications.
|
||||||
|
NEW: Add mass action to close several members.
|
||||||
|
|
||||||
For Developers:
|
For Developers:
|
||||||
NEW: Module "DebugBar" is available as a stable module.
|
NEW: Module "DebugBar" is available as a stable module.
|
||||||
|
|||||||
@ -1567,7 +1567,7 @@ else
|
|||||||
$formquestion=array();
|
$formquestion=array();
|
||||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
|
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
|
||||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||||
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ResiliateMember"), $langs->trans("ConfirmResiliateMember"), "confirm_resign", $formquestion, 'no', 1, 220);
|
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ResiliateMember"), $langs->trans("ConfirmResiliateMember"), "confirm_resign", $formquestion, 'no', 1, 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm remove member
|
// Confirm remove member
|
||||||
|
|||||||
@ -189,6 +189,42 @@ if (empty($reshook))
|
|||||||
$search_array_options=array();
|
$search_array_options=array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close
|
||||||
|
if ($massaction == 'close' && $user->rights->adherent->creer)
|
||||||
|
{
|
||||||
|
$tmpmember = new Adherent($db);
|
||||||
|
$error=0;
|
||||||
|
$nbclose=0;
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
|
foreach($toselect as $idtoclose)
|
||||||
|
{
|
||||||
|
$tmpmember->fetch($idtoclose);
|
||||||
|
$result=$tmpmember->resiliate($user);
|
||||||
|
|
||||||
|
if ($result < 0 && ! count($tmpmember->errors))
|
||||||
|
{
|
||||||
|
setEventMessages($tmpmember->error, $tmpmember->errors, 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($result > 0) $nbclose++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("XMembersClosed", $nbclose), null, 'mesgs');
|
||||||
|
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Mass actions
|
// Mass actions
|
||||||
$objectclass='Adherent';
|
$objectclass='Adherent';
|
||||||
$objectlabel='Members';
|
$objectlabel='Members';
|
||||||
@ -326,12 +362,11 @@ if ($search_type > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
if ($sall != "") $param.="&sall=".urlencode($sall);
|
if ($sall != "") $param.="&sall=".urlencode($sall);
|
||||||
if ($statut != "") $param.="&statut=".urlencode($statut);
|
if ($statut != "") $param.="&statut=".urlencode($statut);
|
||||||
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
||||||
if ($search_nom) $param.="&search_nom=".urlencode($search_nom);
|
|
||||||
if ($search_civility) $param.="&search_civility=".urlencode($search_civility);
|
if ($search_civility) $param.="&search_civility=".urlencode($search_civility);
|
||||||
if ($search_firstname) $param.="&search_firstname=".urlencode($search_firstname);
|
if ($search_firstname) $param.="&search_firstname=".urlencode($search_firstname);
|
||||||
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
||||||
@ -358,6 +393,7 @@ $arrayofmassactions = array(
|
|||||||
//'presend'=>$langs->trans("SendByMail"),
|
//'presend'=>$langs->trans("SendByMail"),
|
||||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
|
if ($user->rights->adherent->creer) $arrayofmassactions['close']=$langs->trans("Resiliate");
|
||||||
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||||
@ -455,7 +491,7 @@ if (! empty($arrayfields['d.lastname']['checked']))
|
|||||||
if (! empty($arrayfields['d.gender']['checked']))
|
if (! empty($arrayfields['d.gender']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
|
$arraygender=array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||||
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
|
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,20 @@ class ActionComm extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $datec;
|
public $datec;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date end record (datef)
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $datef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Duration (duree)
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $duree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date modification record (tms)
|
* Date modification record (tms)
|
||||||
*
|
*
|
||||||
|
|||||||
@ -698,9 +698,9 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$langs->load("dict");
|
$langs->load("dict");
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch id=".$id, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::fetch id=" . $id . " ref_ext=" . $ref_ext . " email=" . $email, LOG_DEBUG);
|
||||||
|
|
||||||
if (empty($id) && empty($ref_ext))
|
if (empty($id) && empty($ref_ext) && empty($email))
|
||||||
{
|
{
|
||||||
$this->error='BadParameter';
|
$this->error='BadParameter';
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -1044,9 +1044,9 @@ function unActivateModule($value, $requiredby = 1)
|
|||||||
$result=$objMod->remove();
|
$result=$objMod->remove();
|
||||||
if ($result <= 0) $ret=$objMod->error;
|
if ($result <= 0) $ret=$objMod->error;
|
||||||
}
|
}
|
||||||
else
|
else // We come here when we try to unactivate a module when module does not exists anymore in sources
|
||||||
{
|
{
|
||||||
//print $dir.$modFile;
|
//print $dir.$modFile;exit;
|
||||||
// TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded
|
// TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
||||||
$genericMod = new DolibarrModules($db);
|
$genericMod = new DolibarrModules($db);
|
||||||
@ -1054,11 +1054,11 @@ function unActivateModule($value, $requiredby = 1)
|
|||||||
$genericMod->rights_class=strtolower(preg_replace('/^mod/i', '', $modName));
|
$genericMod->rights_class=strtolower(preg_replace('/^mod/i', '', $modName));
|
||||||
$genericMod->const_name='MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', $modName));
|
$genericMod->const_name='MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', $modName));
|
||||||
dol_syslog("modules::unActivateModule Failed to find module file, we use generic function with name " . $modName);
|
dol_syslog("modules::unActivateModule Failed to find module file, we use generic function with name " . $modName);
|
||||||
$genericMod->_remove(array());
|
$genericMod->remove('');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Desactivation des modules qui dependent de lui
|
// Disable modules that depends on module we disable
|
||||||
if (! $ret && $requiredby)
|
if (! $ret && $requiredby && is_object($objMod) && is_array($objMod->requiredby))
|
||||||
{
|
{
|
||||||
$countrb=count($objMod->requiredby);
|
$countrb=count($objMod->requiredby);
|
||||||
for ($i = 0; $i < $countrb; $i++)
|
for ($i = 0; $i < $countrb; $i++)
|
||||||
|
|||||||
@ -1287,13 +1287,14 @@ class EmailCollector extends CommonObject
|
|||||||
if (empty($contactid)) // Try to find contact using email
|
if (empty($contactid)) // Try to find contact using email
|
||||||
{
|
{
|
||||||
$result = $contactstatic->fetch(0, null, '', $from);
|
$result = $contactstatic->fetch(0, null, '', $from);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$contactid = $contactstatic->id;
|
$contactid = $contactstatic->id;
|
||||||
$contactfoundby = 'email of contact ('.$from.')';
|
$contactfoundby = 'email of contact ('.$from.')';
|
||||||
if ($contactstatic->fk_soc > 0)
|
if ($contactstatic->socid > 0)
|
||||||
{
|
{
|
||||||
$result = $thirdpartystatic->fetch($contactstatic->fk_soc);
|
$result = $thirdpartystatic->fetch($contactstatic->socid);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$thirdpartyid = $thirdpartystatic->id;
|
$thirdpartyid = $thirdpartystatic->id;
|
||||||
@ -1309,7 +1310,6 @@ class EmailCollector extends CommonObject
|
|||||||
if ($result > 0) $thirdpartyfoundby = 'email ('.$from.')';
|
if ($result > 0) $thirdpartyfoundby = 'email ('.$from.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Do operations
|
// Do operations
|
||||||
foreach($this->actions as $operation)
|
foreach($this->actions as $operation)
|
||||||
{
|
{
|
||||||
@ -1492,7 +1492,6 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
// Insert record of emails sent
|
// Insert record of emails sent
|
||||||
$actioncomm = new ActionComm($this->db);
|
$actioncomm = new ActionComm($this->db);
|
||||||
|
|
||||||
$actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
|
$actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
|
||||||
$actioncomm->code = 'AC_'.$actioncode;
|
$actioncomm->code = 'AC_'.$actioncode;
|
||||||
$actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from;
|
$actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from;
|
||||||
@ -1503,6 +1502,7 @@ class EmailCollector extends CommonObject
|
|||||||
$actioncomm->percentage = -1; // Not applicable
|
$actioncomm->percentage = -1; // Not applicable
|
||||||
$actioncomm->socid = $thirdpartystatic->id;
|
$actioncomm->socid = $thirdpartystatic->id;
|
||||||
$actioncomm->contactid = $contactstatic->id;
|
$actioncomm->contactid = $contactstatic->id;
|
||||||
|
$actioncomm->socpeopleassigned = (!empty($contactstatic->id) ? array($contactstatic->id => '') : array());
|
||||||
$actioncomm->authorid = $user->id; // User saving action
|
$actioncomm->authorid = $user->id; // User saving action
|
||||||
$actioncomm->userownerid = $user->id; // Owner of action
|
$actioncomm->userownerid = $user->id; // Owner of action
|
||||||
// Fields when action is an email (content should be added into note)
|
// Fields when action is an email (content should be added into note)
|
||||||
|
|||||||
@ -92,3 +92,10 @@ INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, m
|
|||||||
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL);
|
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL);
|
||||||
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
|
||||||
|
|
||||||
|
-- Supplier proposal
|
||||||
|
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||||
|
|
||||||
|
|||||||
@ -369,3 +369,9 @@ ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_projet integer DEFAU
|
|||||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_reception integer DEFAULT NULL;
|
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_reception integer DEFAULT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
|
||||||
|
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
|
||||||
|
|
||||||
@ -197,3 +197,4 @@ SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subsc
|
|||||||
SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5')
|
SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5')
|
||||||
MembershipPaid=Membership paid for current period (until %s)
|
MembershipPaid=Membership paid for current period (until %s)
|
||||||
YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email
|
YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email
|
||||||
|
XMembersClosed=%s member(s) closed
|
||||||
Loading…
Reference in New Issue
Block a user