forked from Wavyzz/dolibarr
Amlioration de la gestion des actions pour grer date de planification differente de date de realisation.
This commit is contained in:
@@ -42,8 +42,9 @@ class ActionComm
|
|||||||
var $type;
|
var $type;
|
||||||
var $label;
|
var $label;
|
||||||
var $datec; // Date creation enregistrement
|
var $datec; // Date creation enregistrement
|
||||||
var $datep; // Date action 0%
|
var $datep; // Date action planifie debut
|
||||||
var $date; // Date action 100% (datea)
|
var $datef; // Date action planifie fin
|
||||||
|
var $date; // Date action realise completement (datea)
|
||||||
var $datem; // Date modif (tms)
|
var $datem; // Date modif (tms)
|
||||||
var $priority;
|
var $priority;
|
||||||
var $user;
|
var $user;
|
||||||
@@ -85,13 +86,13 @@ class ActionComm
|
|||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm";
|
||||||
$sql.= "(datec,";
|
$sql.= "(datec,";
|
||||||
if ($this->percent < 100) $sql.= "datep,";
|
if ($this->date_p) $sql.= "datep,";
|
||||||
if ($this->percent == 100) $sql.= "datea,";
|
if ($this->date_a) $sql.= "datea,";
|
||||||
$sql.= "fk_action,fk_soc,note,fk_contact,fk_user_author,fk_user_action,label,percent,priority,";
|
$sql.= "fk_action,fk_soc,note,fk_contact,fk_user_author,fk_user_action,label,percent,priority,";
|
||||||
$sql.= "fk_facture,propalrowid,fk_commande)";
|
$sql.= "fk_facture,propalrowid,fk_commande)";
|
||||||
$sql.= " VALUES (now(),";
|
$sql.= " VALUES (now(),";
|
||||||
if ($this->percent < 100) $sql.= "'".$this->db->idate($this->date)."',";
|
if ($this->date_p) $sql.= "'".$this->db->idate($this->date_p)."',";
|
||||||
if ($this->percent == 100) $sql.= "'".$this->db->idate($this->date)."',";
|
if ($this->date_a) $sql.= "'".$this->db->idate($this->date_a)."',";
|
||||||
$sql.= "'".$this->type_id."', '".$this->societe->id."' ,'".addslashes($this->note)."',";
|
$sql.= "'".$this->type_id."', '".$this->societe->id."' ,'".addslashes($this->note)."',";
|
||||||
$sql.= ($this->contact->id?$this->contact->id:"null").",";
|
$sql.= ($this->contact->id?$this->contact->id:"null").",";
|
||||||
$sql.= "'$author->id', '".$this->user->id ."', '".addslashes($this->label)."','".$this->percent."','".$this->priority."',";
|
$sql.= "'$author->id', '".$this->user->id ."', '".addslashes($this->label)."','".$this->percent."','".$this->priority."',";
|
||||||
|
|||||||
@@ -98,50 +98,58 @@ class CActioncomm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Renvoi la liste des types d'actions existant
|
* \brief Renvoi la liste des types d'actions existant
|
||||||
* \param active 1 ou 0 pour un filtre sur l'etat actif ou non ('' par defaut = pas de filtre)
|
* \param active 1 ou 0 pour un filtre sur l'etat actif ou non ('' par defaut = pas de filtre)
|
||||||
* \return array tableau des types d'actions actifs si ok, <0 si erreur
|
* \return array tableau des types d'actions actifs si ok, <0 si erreur
|
||||||
*/
|
*/
|
||||||
function liste_array($active='')
|
function liste_array($active='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs,$conf;
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
$ga = array();
|
$ga = array();
|
||||||
|
|
||||||
$sql = "SELECT id, code, libelle";
|
$sql = "SELECT id, code, libelle, module";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
||||||
if ($active != '') {
|
if ($active != '')
|
||||||
$sql.=" WHERE active=$active";
|
{
|
||||||
}
|
$sql.=" WHERE active=".$active;
|
||||||
$sql .= " ORDER BY id";
|
}
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$nump = $this->db->num_rows($resql);
|
$nump = $this->db->num_rows($resql);
|
||||||
|
if ($nump)
|
||||||
if ($nump)
|
{
|
||||||
{
|
$i = 0;
|
||||||
$i = 0;
|
while ($i < $nump)
|
||||||
while ($i < $nump)
|
{
|
||||||
{
|
$obj = $this->db->fetch_object($resql);
|
||||||
$obj = $this->db->fetch_object($resql);
|
$qualified=1;
|
||||||
|
if ($obj->module)
|
||||||
$transcode=$langs->trans("Action".$obj->code);
|
{
|
||||||
$ga[$obj->id] = ($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0;
|
||||||
$i++;
|
if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0;
|
||||||
}
|
if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0;
|
||||||
}
|
}
|
||||||
$this->liste_array=$ga;
|
if ($qualified)
|
||||||
return $ga;
|
{
|
||||||
}
|
$transcode=$langs->trans("Action".$obj->code);
|
||||||
else
|
$ga[$obj->id] = ($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||||
{
|
}
|
||||||
return -1;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->liste_array=$ga;
|
||||||
|
return $ga;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if ($_POST["action"] == 'add_action')
|
|||||||
$actioncomm->type_id = $_POST["actionid"];
|
$actioncomm->type_id = $_POST["actionid"];
|
||||||
$actioncomm->type_code = $cactioncomm->code;
|
$actioncomm->type_code = $cactioncomm->code;
|
||||||
$actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0;
|
$actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0;
|
||||||
$actioncomm->label = $_POST["label"];
|
$actioncomm->label = trim($_POST["label"]);
|
||||||
if (! $_POST["label"])
|
if (! $_POST["label"])
|
||||||
{
|
{
|
||||||
if ($_POST["actionid"] == 5 && $contact->fullname)
|
if ($_POST["actionid"] == 5 && $contact->fullname)
|
||||||
@@ -93,16 +93,28 @@ if ($_POST["action"] == 'add_action')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$actioncomm->date = mktime($_POST["heurehour"],
|
|
||||||
$_POST["heuremin"],
|
|
||||||
0,
|
|
||||||
$_POST["acmonth"],
|
|
||||||
$_POST["acday"],
|
|
||||||
$_POST["acyear"]);
|
|
||||||
$actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60;
|
|
||||||
$actioncomm->percent = isset($_POST["percentage"])?$_POST["percentage"]:0;
|
$actioncomm->percent = isset($_POST["percentage"])?$_POST["percentage"]:0;
|
||||||
|
if ($actioncomm->percent < 100)
|
||||||
|
{
|
||||||
|
$actioncomm->date_p = @mktime($_POST["heurephour"],
|
||||||
|
$_POST["heurepmin"],
|
||||||
|
0,
|
||||||
|
$_POST["apmonth"],
|
||||||
|
$_POST["apday"],
|
||||||
|
$_POST["apyear"]);
|
||||||
|
}
|
||||||
|
if ($actioncomm->percent == 100)
|
||||||
|
{
|
||||||
|
$actioncomm->date_a = @mktime($_POST["heuredhour"],
|
||||||
|
$_POST["heuredmin"],
|
||||||
|
0,
|
||||||
|
$_POST["admonth"],
|
||||||
|
$_POST["adday"],
|
||||||
|
$_POST["adyear"]);
|
||||||
|
}
|
||||||
|
$actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60;
|
||||||
$actioncomm->user = $user;
|
$actioncomm->user = $user;
|
||||||
$actioncomm->note = $_POST["note"];
|
$actioncomm->note = trim($_POST["note"]);
|
||||||
if (isset($_POST["contactid"])) $actioncomm->contact = $contact;
|
if (isset($_POST["contactid"])) $actioncomm->contact = $contact;
|
||||||
if (isset($_POST["socid"])) $actioncomm->societe = $societe;
|
if (isset($_POST["socid"])) $actioncomm->societe = $societe;
|
||||||
if ($_POST["todo_webcal"] == 'on') $actioncomm->use_webcal=1;
|
if ($_POST["todo_webcal"] == 'on') $actioncomm->use_webcal=1;
|
||||||
@@ -115,7 +127,8 @@ if ($_POST["action"] == 'add_action')
|
|||||||
if (! $actioncomm->error)
|
if (! $actioncomm->error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
Header("Location: ".$_POST["from"]);
|
if ($_POST["from"]) Header("Location: ".$_POST["from"]);
|
||||||
|
else Header("Location: ".DOL_URL_ROOT.'/comm/action/fiche.php?id='.$idaction);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -129,12 +142,13 @@ if ($_POST["action"] == 'add_action')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dolibarr_print_error($db);
|
$error=$actioncomm->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error('',"Le type d'action n'a pas <20>t<EFBFBD> choisi");
|
$_GET["action"] = 'create';
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Type")).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -187,200 +201,288 @@ $html = new Form($db);
|
|||||||
|
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
$caction = new CActioncomm($db);
|
$caction = new CActioncomm($db);
|
||||||
|
|
||||||
if ($_GET["contactid"])
|
|
||||||
{
|
|
||||||
$contact = new Contact($db);
|
|
||||||
$contact->fetch($_GET["contactid"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form name="action" action="fiche.php" method="post">';
|
if ($_GET["contactid"])
|
||||||
print '<input type="hidden" name="from" value="'.$_SERVER["HTTP_REFERER"].'">';
|
|
||||||
print '<input type="hidden" name="action" value="add_action">';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Si action de type Rendez-vous
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if ($_GET["actionid"] == 5)
|
|
||||||
{
|
|
||||||
print_titre ($langs->trans("AddActionRendezVous"));
|
|
||||||
print "<br>";
|
|
||||||
|
|
||||||
print '<input type="hidden" name="date" value="'.$db->idate(time()).'">'."\n";
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
// Type d'action
|
|
||||||
print '<input type="hidden" name="actionid" value="5">';
|
|
||||||
|
|
||||||
// Societe, contact
|
|
||||||
print '<tr><td nowrap>'.$langs->trans("ActionOnCompany").'</td><td>';
|
|
||||||
if ($_GET["socid"])
|
|
||||||
{
|
{
|
||||||
$societe = new Societe($db);
|
$contact = new Contact($db);
|
||||||
$societe->fetch($_GET["socid"]);
|
$contact->fetch($_GET["contactid"]);
|
||||||
print $societe->getNomUrl(1);
|
|
||||||
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
print '<form name="action" action="fiche.php" method="post">';
|
||||||
print $html->select_societes('','socid',1,1);
|
print '<input type="hidden" name="from" value="'.$_SERVER["HTTP_REFERER"].'">';
|
||||||
}
|
print '<input type="hidden" name="action" value="add_action">';
|
||||||
print '</td></tr>';
|
|
||||||
|
/*
|
||||||
// Si la societe est impos<6F>e, on propose ces contacts
|
* Si action de type Rendez-vous
|
||||||
if ($_GET["socid"])
|
*
|
||||||
|
*/
|
||||||
|
if ($_GET["actionid"] == 5)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td width="40%">';
|
print_titre ($langs->trans("AddActionRendezVous"));
|
||||||
$html->select_contacts($_GET["socid"],'','contactid',1,1);
|
print "<br>";
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
if ($mesg) print $mesg.'<br>';
|
||||||
$html->select_date('','ac','','','',"action");
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans("Hour").'</td><td>';
|
|
||||||
print_heure_select("heure",8,20);
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans("Duration").'</td><td>';
|
|
||||||
print_duree_select("duree");
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
add_row_for_webcal_link();
|
print '<input type="hidden" name="date" value="'.$db->idate(time()).'">'."\n";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
|
||||||
print '<textarea cols="60" rows="6" name="note"></textarea></td></tr>';
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
print '<table class="border" width="100%">';
|
||||||
* Si action de type autre que rendez-vous
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Click to dial
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if ($conf->clicktodial->enabled)
|
|
||||||
{
|
|
||||||
$user->fetch_clicktodial();
|
|
||||||
|
|
||||||
if ($_GET["call"] && $user->clicktodial_enabled == 1)
|
// Type d'action
|
||||||
{
|
print '<input type="hidden" name="actionid" value="5">';
|
||||||
|
|
||||||
print '<Script language=javascript>'."\n";
|
// Societe, contact
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionOnCompany").'</td><td>';
|
||||||
$url = CLICKTODIAL_URL ."?login=".$user->clicktodial_login."&password=".$user->clicktodial_password."&caller=".$user->clicktodial_poste ."&called=".$_GET["call"];
|
if ($_GET["socid"])
|
||||||
|
|
||||||
print 'window.open("'.$url.'","clicktodial", "toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=1,resizable=1,copyhistory=0,width=400,height=300,top=10,left=10");';
|
|
||||||
print "\n</script>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
print_titre ($langs->trans("AddAnAction"));
|
|
||||||
print "<br>";
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
// Type d'action actifs
|
|
||||||
print '<tr><td>'.$langs->trans("Action").'</td><td>';
|
|
||||||
if ($_GET["actionid"])
|
|
||||||
{
|
|
||||||
print '<input type="hidden" name="actionid" value="'.$_GET["actionid"].'">'."\n";
|
|
||||||
print $caction->get_nom($_GET["actionid"]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$html->select_array("actionid", $caction->liste_array(1), 0);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="30"></td></tr>';
|
|
||||||
|
|
||||||
// Societe, contact
|
|
||||||
print '<tr><td nowrap>'.$langs->trans("ActionOnCompany").'</td><td>';
|
|
||||||
if ($_GET["socid"])
|
|
||||||
{
|
|
||||||
$societe = new Societe($db);
|
|
||||||
$societe->fetch($_GET["socid"]);
|
|
||||||
print $societe->getNomUrl(1);
|
|
||||||
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $html->select_societes('','socid',1,1);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Si la societe est impos<6F>e, on propose ces contacts
|
|
||||||
if ($_GET["socid"])
|
|
||||||
{
|
|
||||||
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
|
|
||||||
$html->select_contacts($_GET["socid"],'','contactid',1,1);
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Avancement
|
|
||||||
if ($_GET["afaire"] == 1)
|
|
||||||
{
|
|
||||||
print '<input type="hidden" name="percentage" value="0">';
|
|
||||||
print '<input type="hidden" name="todo" value="on">';
|
|
||||||
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td>'.$langs->trans("StatusActionToDo").' / 0%</td></tr>';
|
|
||||||
}
|
|
||||||
elseif ($_GET["afaire"] == 2)
|
|
||||||
{
|
|
||||||
print '<input type="hidden" name="percentage" value="100">';
|
|
||||||
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td>'.$langs->trans("StatusActionDone").' / 100%</td></tr>';
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td><input type="text" name="percentage" value="0%"></td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Date
|
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
|
||||||
if ($_GET["afaire"] == 1)
|
|
||||||
{
|
{
|
||||||
$html->select_date('','ac','','','',"action");
|
$societe = new Societe($db);
|
||||||
print '</tr><tr><td>'.$langs->trans("Hour").'</td><td>';
|
$societe->fetch($_GET["socid"]);
|
||||||
print_heure_select("heure",8,20);
|
print $societe->getNomUrl(1);
|
||||||
}
|
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
|
||||||
else if ($_GET["afaire"] == 2)
|
|
||||||
{
|
|
||||||
$html->select_date('','ac','','','',"action");
|
|
||||||
print '</tr><tr><td>'.$langs->trans("Hour").'</td><td>';
|
|
||||||
print_heure_select("heure",8,20);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html->select_date('','ac','','','',"action");
|
print $html->select_societes('','socid',1,1);
|
||||||
print '</tr><tr><td>'.$langs->trans("Hour").'</td><td>';
|
|
||||||
print_heure_select("heure",8,20);
|
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Si la societe est impos<6F>e, on propose ces contacts
|
||||||
|
if ($_GET["socid"])
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||||
|
$html->select_contacts($_GET["socid"],'','contactid',1,1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affecte a
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Realise par
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date planification
|
||||||
|
print '<tr><td>'.$langs->trans("DatePlanned").'</td><td>';
|
||||||
|
if ($_GET["afaire"] == 1 || $_GET["afaire"] == 2)
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ap','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heurep",8,20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ap','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heurep",8,20);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date done
|
||||||
|
print '<tr><td>'.$langs->trans("DateDone").'</td><td>';
|
||||||
|
if ($_GET["afaire"] == 1 || $_GET["afaire"] == 2)
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ad','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heured",8,20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ad','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heured",8,20);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Duration
|
||||||
|
print '<tr><td>'.$langs->trans("Duration").'</td><td>';
|
||||||
|
print_duree_select("duree");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
add_row_for_webcal_link();
|
add_row_for_webcal_link();
|
||||||
|
|
||||||
// Note
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
|
||||||
print '<textarea cols="60" rows="6" name="note"></textarea></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
// Note
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
||||||
|
if ($conf->fckeditor->enabled)
|
||||||
|
{
|
||||||
|
// Editeur wysiwyg
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('note','',280,'dolibarr_notes','In',true);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea name="note" cols="90" rows="'.ROWS_8.'">'.$societe->note.'</textarea>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
||||||
|
print '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Si action de type autre que rendez-vous
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Click to dial
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if ($conf->clicktodial->enabled)
|
||||||
|
{
|
||||||
|
$user->fetch_clicktodial();
|
||||||
|
|
||||||
|
if ($_GET["call"] && $user->clicktodial_enabled == 1)
|
||||||
|
{
|
||||||
|
|
||||||
|
print '<Script language=javascript>'."\n";
|
||||||
|
|
||||||
|
$url = CLICKTODIAL_URL ."?login=".$user->clicktodial_login."&password=".$user->clicktodial_password."&caller=".$user->clicktodial_poste ."&called=".$_GET["call"];
|
||||||
|
|
||||||
|
print 'window.open("'.$url.'","clicktodial", "toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=1,resizable=1,copyhistory=0,width=400,height=300,top=10,left=10");';
|
||||||
|
print "\n</script>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
print_titre ($langs->trans("AddAnAction"));
|
||||||
|
print "<br>";
|
||||||
|
|
||||||
|
if ($mesg) print $mesg.'<br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Type d'action actifs
|
||||||
|
print '<tr><td>'.$langs->trans("Type").'</td><td>';
|
||||||
|
if ($_GET["actionid"])
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="actionid" value="'.$_GET["actionid"].'">'."\n";
|
||||||
|
print $caction->get_nom($_GET["actionid"]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$arraylist=$caction->liste_array(1);
|
||||||
|
$arraylist[0]=' ';
|
||||||
|
sort($arraylist);
|
||||||
|
$html->select_array("actionid", $arraylist, 0);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="30"></td></tr>';
|
||||||
|
|
||||||
|
// Societe, contact
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionOnCompany").'</td><td>';
|
||||||
|
if ($_GET["socid"])
|
||||||
|
{
|
||||||
|
$societe = new Societe($db);
|
||||||
|
$societe->fetch($_GET["socid"]);
|
||||||
|
print $societe->getNomUrl(1);
|
||||||
|
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $html->select_societes('','socid',1,1);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Affecte a
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Realise par
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Si la societe est impos<6F>e, on propose ces contacts
|
||||||
|
if ($_GET["socid"])
|
||||||
|
{
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||||
|
$html->select_contacts($_GET["socid"],'','contactid',1,1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Avancement
|
||||||
|
if ($_GET["afaire"] == 1)
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="percentage" value="0">';
|
||||||
|
print '<input type="hidden" name="todo" value="on">';
|
||||||
|
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td>'.$langs->trans("StatusActionToDo").' / 0%</td></tr>';
|
||||||
|
}
|
||||||
|
elseif ($_GET["afaire"] == 2)
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="percentage" value="100">';
|
||||||
|
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td>'.$langs->trans("StatusActionDone").' / 100%</td></tr>';
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td><input type="text" name="percentage" value="0" size="4">%</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date planification
|
||||||
|
print '<tr><td>'.$langs->trans("DatePlanned").'</td><td>';
|
||||||
|
if ($_GET["afaire"] == 1 || $_GET["afaire"] == 2)
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ap','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heurep",8,20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ap','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heurep",8,20);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date done
|
||||||
|
print '<tr><td>'.$langs->trans("DateDone").'</td><td>';
|
||||||
|
if ($_GET["afaire"] == 1 || $_GET["afaire"] == 2)
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ad','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heured",8,20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->select_date(-1,'ad','','','',"action");
|
||||||
|
print ' ';
|
||||||
|
print_heure_select("heured",8,20);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
add_row_for_webcal_link();
|
||||||
|
|
||||||
|
// Note
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
||||||
|
if ($conf->fckeditor->enabled)
|
||||||
|
{
|
||||||
|
// Editeur wysiwyg
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('note','',280,'dolibarr_notes','In',true);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea name="note" cols="90" rows="'.ROWS_8.'"></textarea>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td align="center" colspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -448,9 +550,15 @@ if ($_GET["id"])
|
|||||||
$html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
$html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Auteur
|
// Affecte a
|
||||||
print '<tr><td>'.$langs->trans("Author").'</td>';
|
print '<tr><td nowrap>'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Realise par
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date debut
|
// Date debut
|
||||||
print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'.dolibarr_print_date($act->datep,'%d %B %Y %H:%M').'</td></tr>';
|
print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'.dolibarr_print_date($act->datep,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
@@ -458,7 +566,10 @@ if ($_GET["id"])
|
|||||||
// Date fin real
|
// Date fin real
|
||||||
print '<tr><td>'.$langs->trans("DateActionDone").'</td><td colspan="3">'.dolibarr_print_date($act->date,'%d %B %Y %H:%M').'</td></tr>';
|
print '<tr><td>'.$langs->trans("DateActionDone").'</td><td colspan="3">'.dolibarr_print_date($act->date,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
|
|
||||||
|
// Etat
|
||||||
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3"><input name="percent" value="'.$act->percent.'" size="4">%</td></tr>';
|
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3"><input name="percent" value="'.$act->percent.'" size="4">%</td></tr>';
|
||||||
|
|
||||||
|
// Objet li<6C>
|
||||||
if ($act->objet_url)
|
if ($act->objet_url)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("LinkedObject").'</td>';
|
print '<tr><td>'.$langs->trans("LinkedObject").'</td>';
|
||||||
@@ -467,7 +578,19 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
||||||
print '<textarea cols="60" rows="6" name="note">'.$act->note.'</textarea></td></tr>';
|
if ($conf->fckeditor->enabled)
|
||||||
|
{
|
||||||
|
// Editeur wysiwyg
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('note','',280,'dolibarr_notes','In',true);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea name="note" cols="90" rows="'.ROWS_8.'">'.$act->note.'</textarea>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4"><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
print '<tr><td align="center" colspan="4"><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
||||||
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
@@ -497,9 +620,15 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Auteur
|
// Affecte a
|
||||||
print '<tr><td>'.$langs->trans("Author").'</td>';
|
print '<tr><td nowrap>'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Realise par
|
||||||
|
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("FeatureNotYetSupported");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date debut
|
// Date debut
|
||||||
print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'.dolibarr_print_date($act->datep,'%d %B %Y %H:%M').'</td></tr>';
|
print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'.dolibarr_print_date($act->datep,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
@@ -521,7 +650,8 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
||||||
print nl2br($act->note).'</td></tr>';
|
print nl2br($act->note);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ LastProspectContactInProcess=Contact in process
|
|||||||
LastProspectContactDone=Contact done
|
LastProspectContactDone=Contact done
|
||||||
DateActionPlanned=Date planned
|
DateActionPlanned=Date planned
|
||||||
DateActionDone=Date done
|
DateActionDone=Date done
|
||||||
|
ActionAffectedTo=Action affected to
|
||||||
|
ActionDoneBy=Action done by
|
||||||
ActionAC_TEL=Phone call
|
ActionAC_TEL=Phone call
|
||||||
ActionAC_FAX=Send fax
|
ActionAC_FAX=Send fax
|
||||||
ActionAC_PROP=Send proposal
|
ActionAC_PROP=Send proposal
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ Redo=Redo
|
|||||||
ExpandAll=Expand all
|
ExpandAll=Expand all
|
||||||
UndoExpandAll=Undo expand
|
UndoExpandAll=Undo expand
|
||||||
Reason=Raison
|
Reason=Raison
|
||||||
|
FeatureNotYetSupported=Feature not yet supported
|
||||||
# Countries
|
# Countries
|
||||||
CountryFR=France
|
CountryFR=France
|
||||||
CountryBE=Belgium
|
CountryBE=Belgium
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ LastProspectContactInProcess=Contact en cours
|
|||||||
LastProspectContactDone=Prospects contact<63>s
|
LastProspectContactDone=Prospects contact<63>s
|
||||||
DateActionPlanned=Date planification
|
DateActionPlanned=Date planification
|
||||||
DateActionDone=Date r<>alisation
|
DateActionDone=Date r<>alisation
|
||||||
|
ActionAffectedTo=Action affect<63>e <20>
|
||||||
|
ActionDoneBy=Action faite par
|
||||||
ActionAC_TEL=Appel t<>l<EFBFBD>phonique
|
ActionAC_TEL=Appel t<>l<EFBFBD>phonique
|
||||||
ActionAC_FAX=Envoi fax
|
ActionAC_FAX=Envoi fax
|
||||||
ActionAC_PROP=Envoi proposition par mail
|
ActionAC_PROP=Envoi proposition par mail
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ Redo=Refaire
|
|||||||
ExpandAll=Tout d<>rouler
|
ExpandAll=Tout d<>rouler
|
||||||
UndoExpandAll=Annuler d<>roulement
|
UndoExpandAll=Annuler d<>roulement
|
||||||
Reason=Raison
|
Reason=Raison
|
||||||
|
FeatureNotYetSupported=Fonctionnalit<69> pas encore support<72>e
|
||||||
# Countries
|
# Countries
|
||||||
CountryFR=France
|
CountryFR=France
|
||||||
CountryBE=Belgique
|
CountryBE=Belgique
|
||||||
|
|||||||
@@ -1692,21 +1692,21 @@ function print_fleche_navigation($page,$file,$options='',$nextpage)
|
|||||||
\param begin (1 par defaut)
|
\param begin (1 par defaut)
|
||||||
\param end (23 par defaut)
|
\param end (23 par defaut)
|
||||||
*/
|
*/
|
||||||
function print_heure_select($prefix,$begin=1,$end=23) {
|
function print_heure_select($prefix,$begin=1,$end=23)
|
||||||
|
{
|
||||||
print '<select name="'.$prefix.'hour">';
|
print '<select class="flat" name="'.$prefix.'hour">';
|
||||||
for ($hour = $begin ; $hour <= $end ; $hour++) {
|
for ($hour = $begin ; $hour <= $end ; $hour++) {
|
||||||
print "<option value=\"$hour\">$hour";
|
print "<option value=\"$hour\">$hour";
|
||||||
}
|
}
|
||||||
print "</select> H ";
|
print "</select> H ";
|
||||||
print '<select name="'.$prefix.'min">';
|
print '<select class="flat" name="'.$prefix.'min">';
|
||||||
for ($min = 0 ; $min < 60 ; $min=$min+5) {
|
for ($min = 0 ; $min < 60 ; $min=$min+5) {
|
||||||
if ($min < 10) {
|
if ($min < 10) {
|
||||||
$min = "0" . $min;
|
$min = "0" . $min;
|
||||||
}
|
}
|
||||||
print "<option value=\"$min\">$min";
|
print "<option value=\"$min\">$min";
|
||||||
}
|
}
|
||||||
print "</select>\n";
|
print "</select>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -315,15 +315,14 @@ insert into llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype,
|
|||||||
--
|
--
|
||||||
|
|
||||||
delete from llx_c_actioncomm;
|
delete from llx_c_actioncomm;
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 1, 'AC_TEL', 'system', 'Appel T<>l<EFBFBD>phonique');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 1, 'AC_TEL', 'system', 'Appel T<>l<EFBFBD>phonique' ,NULL);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 2, 'AC_FAX', 'system', 'Envoi Fax');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 2, 'AC_FAX', 'system', 'Envoi Fax' ,NULL);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 3, 'AC_PROP', 'system', 'Envoi Proposition');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 3, 'AC_PROP', 'system', 'Envoi Proposition' ,'propal');
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 4, 'AC_EMAIL','system', 'Envoi Email');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 4, 'AC_EMAIL','system', 'Envoi Email' ,NULL);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 5, 'AC_RDV', 'system', 'Prendre rendez-vous');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 5, 'AC_RDV', 'system', 'Rendez-vous' ,NULL);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 8, 'AC_COM', 'system', 'Envoi Commande');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 8, 'AC_COM', 'system', 'Envoi Commande' ,'order');
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 9, 'AC_FAC', 'system', 'Envoi Facture');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 9, 'AC_FAC', 'system', 'Envoi Facture' ,'invoice');
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values (10, 'AC_REL', 'system', 'Relance effectu<74>e');
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values (50, 'AC_OTH', 'system', 'Autre' ,NULL);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values (11, 'AC_CLO', 'system', 'Cl<EFBFBD>ture');
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Ape
|
-- Ape
|
||||||
|
|||||||
@@ -82,12 +82,28 @@ alter table llx_categorie drop column fk_statut;
|
|||||||
alter table llx_categorie add visible tinyint DEFAULT 1 NOT NULL;
|
alter table llx_categorie add visible tinyint DEFAULT 1 NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
alter table llx_c_actioncomm add module varchar(16) DEFAULT NULL after libelle;
|
||||||
|
|
||||||
|
delete from llx_c_actioncomm;
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 1, 'AC_TEL', 'system', 'Appel T<>l<EFBFBD>phonique' ,NULL);
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 2, 'AC_FAX', 'system', 'Envoi Fax' ,NULL);
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 3, 'AC_PROP', 'system', 'Envoi Proposition' ,'propal');
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 4, 'AC_EMAIL','system', 'Envoi Email' ,NULL);
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 5, 'AC_RDV', 'system', 'Rendez-vous' ,NULL);
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 8, 'AC_COM', 'system', 'Envoi Commande' ,'order');
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values ( 9, 'AC_FAC', 'system', 'Envoi Facture' ,'invoice');
|
||||||
|
insert into llx_c_actioncomm (id, code, type, libelle, module) values (50, 'AC_OTH', 'system', 'Autre' ,NULL);
|
||||||
|
|
||||||
alter table llx_actioncomm modify datea datetime;
|
alter table llx_actioncomm modify datea datetime;
|
||||||
alter table llx_actioncomm add column datec datetime after id;
|
alter table llx_actioncomm add column datec datetime after id;
|
||||||
alter table llx_actioncomm add column datep datetime after datec;
|
alter table llx_actioncomm add column datep datetime after datec;
|
||||||
alter table llx_actioncomm add column tms timestamp after datea;
|
alter table llx_actioncomm add column tms timestamp after datea;
|
||||||
|
alter table llx_actioncomm add column fk_commande integer after propalrowid;
|
||||||
|
|
||||||
update llx_actioncomm set datec = datea where datec is null;
|
update llx_actioncomm set datec = datea where datec is null;
|
||||||
update llx_actioncomm set datep = datea where datep is null;
|
update llx_actioncomm set datep = datea where datep is null;
|
||||||
|
update llx_actioncomm set fk_action = '8' where fk_action = '3' and label = 'Envoi commande par mail';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
drop table if exists llx_expedition_model_pdf;
|
drop table if exists llx_expedition_model_pdf;
|
||||||
@@ -237,7 +253,6 @@ delete from llx_document_model where nom='transporteur' and type='shipping';
|
|||||||
delete from llx_document_model where nom='dorade' and type='shipping';
|
delete from llx_document_model where nom='dorade' and type='shipping';
|
||||||
|
|
||||||
|
|
||||||
alter table llx_actioncomm add column fk_commande integer after propalrowid;
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);
|
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);
|
||||||
@@ -365,9 +380,6 @@ ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_factur
|
|||||||
update llx_societe_remise_except set description='Remise sans description' where description is NULL or description ='';
|
update llx_societe_remise_except set description='Remise sans description' where description is NULL or description ='';
|
||||||
alter table llx_societe_remise_except modify description varchar(255) NOT NULL;
|
alter table llx_societe_remise_except modify description varchar(255) NOT NULL;
|
||||||
|
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle) values ( 8, 'AC_COM', 'system', 'Envoi Commande');
|
|
||||||
update llx_actioncomm set fk_action = '8' where fk_action = '3' and label = 'Envoi commande par mail';
|
|
||||||
|
|
||||||
insert into llx_const (name, value, type, visible, note) VALUES ('PROPALE_VALIDITY_DURATION', '15', 'chaine', 0, 'Dur<EFBFBD>e de validit<EFBFBD>e des propales');
|
insert into llx_const (name, value, type, visible, note) VALUES ('PROPALE_VALIDITY_DURATION', '15', 'chaine', 0, 'Dur<EFBFBD>e de validit<EFBFBD>e des propales');
|
||||||
|
|
||||||
alter table llx_propal add column ref_client varchar(30) after ref;
|
alter table llx_propal add column ref_client varchar(30) after ref;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ create table llx_c_actioncomm
|
|||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) UNIQUE NOT NULL,
|
||||||
type varchar(10) DEFAULT 'system' NOT NULL,
|
type varchar(10) DEFAULT 'system' NOT NULL,
|
||||||
libelle varchar(30) NOT NULL,
|
libelle varchar(30) NOT NULL,
|
||||||
|
module varchar(16) DEFAULT NULL,
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
todo tinyint
|
todo tinyint
|
||||||
)type=innodb;
|
)type=innodb;
|
||||||
|
|||||||
Reference in New Issue
Block a user