Fix: id is lost

This commit is contained in:
Regis Houssin 2010-05-22 06:38:26 +00:00
parent 1a90eefb86
commit 7148eb584c
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copytight (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copytight (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copytight (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -66,7 +66,7 @@ if ($_POST["action"] == 'add_paiement')
if (! $error)
{
$paiement_id = 0;
$paymentid = 0;
// Read possible payments
$amounts = array();
@ -90,9 +90,9 @@ if ($_POST["action"] == 'add_paiement')
$paiement->paiementtype = $_POST["paiementtype"];
$paiement->num_paiement = $_POST["num_paiement"];
$paiement->note = $_POST["note"];
$paiement_id = $paiement->create($user);
$paymentid = $paiement->create($user);
if ($paiement_id > 0)
if ($paymentid > 0)
{
// On determine le montant total du paiement
$total=0;
@ -136,7 +136,7 @@ if ($_POST["action"] == 'add_paiement')
else
{
$db->rollback();
$mesg = "Failed to create payment: paiement_id=$paiement_id ".$db->error();
$mesg = "Failed to create payment: paiement_id=$paymentid ".$db->error();
}
}