Fix: Le pourcentage avencement des actions n'tait plus sauv.
This commit is contained in:
parent
aeb107a855
commit
bf4bdd634b
@ -128,7 +128,7 @@ class ActionComm
|
||||
$sql.= ($this->orderrowid?$this->orderrowid:"null");
|
||||
$sql.= ")";
|
||||
|
||||
dolibarr_syslog("ActionComm.class::add sql=".$sql);
|
||||
dolibarr_syslog("ActionComm::add sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -237,37 +237,37 @@ if ($_POST["action"] == 'update')
|
||||
if ($_POST["adhour"] == -1) $_POST["adhour"]='0';
|
||||
if ($_POST["admin"] == -1) $_POST["admin"]='0';
|
||||
|
||||
$action = new Actioncomm($db);
|
||||
$action->fetch($_POST["id"]);
|
||||
$actioncomm = new Actioncomm($db);
|
||||
$actioncomm->fetch($_POST["id"]);
|
||||
|
||||
$action->datep = @mktime($_POST["aphour"],
|
||||
$actioncomm->datep = @mktime($_POST["aphour"],
|
||||
$_POST["apmin"],
|
||||
0,
|
||||
$_POST["apmonth"],
|
||||
$_POST["apday"],
|
||||
$_POST["apyear"]);
|
||||
$action->date = @mktime($_POST["adhour"],
|
||||
$actioncomm->date = @mktime($_POST["adhour"],
|
||||
$_POST["admin"],
|
||||
0,
|
||||
$_POST["admonth"],
|
||||
$_POST["adday"],
|
||||
$_POST["adyear"]);
|
||||
//print $_POST["apmonth"].",".$_POST["apday"].",".$_POST["apyear"].",".$_POST["aphour"].",".$_POST["apmin"]."<br>\n";
|
||||
//print $action->datep;
|
||||
$action->label = $_POST["label"];
|
||||
$action->percentage = $_POST["percentage"];
|
||||
$action->contact->id = $_POST["contactid"];
|
||||
$action->note = $_POST["note"];
|
||||
if ($action->type_code == 'AC_RDV' && $action->percentage == 100 && ! $action->date)
|
||||
//print $actioncomm->datep;
|
||||
$actioncomm->label = $_POST["label"];
|
||||
$actioncomm->percentage = $_POST["percentage"];
|
||||
$actioncomm->contact->id = $_POST["contactid"];
|
||||
$actioncomm->note = $_POST["note"];
|
||||
if ($actioncomm->type_code == 'AC_RDV' && $actioncomm->percentage == 100 && ! $actioncomm->date)
|
||||
{
|
||||
$action->date = $action->datep;
|
||||
$actioncomm->date = $actioncomm->datep;
|
||||
}
|
||||
$result=$action->update();
|
||||
$result=$actioncomm->update();
|
||||
}
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg='<div class="error">'.$action->error.'</div>';
|
||||
$mesg='<div class="error">'.$actioncomm->error.'</div>';
|
||||
$_GET["id"]=$_POST["id"];
|
||||
}
|
||||
else
|
||||
|
||||
@ -402,7 +402,7 @@ if ($_POST['action'] == 'send')
|
||||
$actioncomm->label = $actionmsg2;
|
||||
$actioncomm->note = $actionmsg;
|
||||
$actioncomm->date = time(); // L'action est faite maintenant
|
||||
$actioncomm->percent = 100;
|
||||
$actioncomm->percentage = 100;
|
||||
$actioncomm->contact = new Contact($db,$sendtoid);
|
||||
$actioncomm->societe = new Societe($db,$propal->socid);
|
||||
$actioncomm->user = $user; // User qui a fait l'action
|
||||
|
||||
@ -662,7 +662,7 @@ if ($_POST['action'] == 'send')
|
||||
$actioncomm->label = $actionmsg2;
|
||||
$actioncomm->note = $actionmsg;
|
||||
$actioncomm->date = time(); // L'action est faite maintenant
|
||||
$actioncomm->percent = 100;
|
||||
$actioncomm->percentage = 100;
|
||||
$actioncomm->contact = new Contact($db,$sendtoid);
|
||||
$actioncomm->societe = new Societe($db,$commande->socid);
|
||||
$actioncomm->user = $user; // User qui a fait l'action
|
||||
|
||||
@ -1027,7 +1027,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c
|
||||
$actioncomm->label = $actionmsg2;
|
||||
$actioncomm->note = $actionmsg;
|
||||
$actioncomm->date = time(); // L'action est faite maintenant
|
||||
$actioncomm->percent = 100;
|
||||
$actioncomm->percentage = 100;
|
||||
$actioncomm->contact = new Contact($db,$sendtoid);
|
||||
$actioncomm->societe = new Societe($db,$fac->socid);
|
||||
$actioncomm->user = $user; // User qui a fait l'action
|
||||
|
||||
@ -142,7 +142,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
|
||||
$actioncomm->label = $actionmsg2;
|
||||
$actioncomm->note = $actionmsg;
|
||||
$actioncomm->date = time();
|
||||
$actioncomm->percent = 100;
|
||||
$actioncomm->percentage = 100;
|
||||
$actioncomm->contact = new Contact($db,$sendtoid);
|
||||
$actioncomm->societe = new Societe($db,$fac->socid);
|
||||
$actioncomm->user = $user; // User qui a fait l'action
|
||||
|
||||
@ -34,6 +34,7 @@ update llx_rights_def set libelle='Cr
|
||||
alter table llx_paiement drop column author;
|
||||
|
||||
update llx_actioncomm set fk_action = 9 where fk_action = 10;
|
||||
update llx_actioncomm set percent = 100 where percent = 0 and datea is not null;
|
||||
|
||||
ALTER TABLE llx_cotisation ADD COLUMN datef date after dateadh;
|
||||
ALTER TABLE llx_cotisation modify datef date;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user