Skip to content
Snippets Groups Projects
Commit 7400f12c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Error with some amounts

parent f58993e2
No related branches found
No related tags found
No related merge requests found
......@@ -351,9 +351,9 @@ class Don extends CommonObject
}
/**
* \brief Mise a jour du don
* \param user Objet utilisateur qui met a jour le don
* \return int >0 si ok, <0 si ko
* Update a donation record
* @param user Objet utilisateur qui met a jour le don
* @return int >0 si ok, <0 si ko
*/
function update($user)
{
......@@ -361,7 +361,7 @@ class Don extends CommonObject
$this->date = $this->db->idate($this->date);
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET ";
$sql .= "amount = " . $this->amount;
$sql .= "amount = " . price2num($this->amount);
$sql .= ",fk_paiement = ".$this->modepaiementid;
$sql .= ",prenom = '".addslashes($this->prenom)."'";
$sql .= ",nom='".addslashes($this->nom)."'";
......
......@@ -78,7 +78,7 @@ if ($_POST["action"] == 'update')
$don->nom = $_POST["nom"];
$don->societe = $_POST["societe"];
$don->adresse = $_POST["adresse"];
$don->amount = $_POST["amount"];
$don->amount = price2num($_POST["amount"]);
$don->cp = $_POST["cp"];
$don->ville = $_POST["ville"];
$don->email = $_POST["email"];
......@@ -128,7 +128,7 @@ if ($_POST["action"] == 'add')
$don->nom = $_POST["nom"];
$don->societe = $_POST["societe"];
$don->adresse = $_POST["adresse"];
$don->amount = $_POST["amount"];
$don->amount = price2num($_POST["amount"]);
$don->cp = $_POST["cp"];
$don->ville = $_POST["ville"];
$don->email = $_POST["email"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment