Enregistrement correct de l'action lors de l'envoi de la propale
This commit is contained in:
parent
ef921a59c7
commit
362559c0ac
@ -32,6 +32,7 @@ require("../lib/CMailFile.class.php3");
|
||||
require("../project.class.php3");
|
||||
require("../propal.class.php3");
|
||||
require("../actioncomm.class.php3");
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
@ -297,8 +298,6 @@ if ($propalid)
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Produits
|
||||
*/
|
||||
@ -564,22 +563,19 @@ if ($propalid)
|
||||
/*
|
||||
* Enregistre l'action
|
||||
*
|
||||
* Ne fonctionne pas, a corriger !
|
||||
*/
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$sql = "INSERT INTO llx_actioncomm (datea,fk_action,fk_soc, propalrowid,note, fk_user_author) ";
|
||||
$sql .= " VALUES (now(), 3, $obj->idp, $propalid, 'Envoyée à $sendto',$user->id);";
|
||||
if (! $db->query($sql) ) {
|
||||
print $db->error();
|
||||
print "<p>$sql</p>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
$actioncomm = new ActionComm($db);
|
||||
$actioncomm->priority = 2;
|
||||
$actioncomm->type = 3;
|
||||
$actioncomm->date = $db->idate(time());
|
||||
$actioncomm->percent = 100;
|
||||
$actioncomm->contact = $propal->contactid;
|
||||
$actioncomm->user = $user;
|
||||
$actioncomm->societe = $propal->socidp;
|
||||
$actioncomm->propalrowid = $propal->id;
|
||||
$actioncomm->note = "Envoyée à $sendto";
|
||||
$actioncomm->add($user);
|
||||
}
|
||||
/*
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user