[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-cvs] dolibarr/htdocs/product fournisseurs.php
From: |
Regis Houssin |
Subject: |
[Dolibarr-cvs] dolibarr/htdocs/product fournisseurs.php |
Date: |
Sat, 10 Jun 2006 10:10:29 +0000 |
CVSROOT: /cvsroot/dolibarr
Module name: dolibarr
Changes by: Regis Houssin <hregis> 06/06/10 10:10:29
Modified files:
htdocs/product : fournisseurs.php
Log message:
ajout message d'erreur sur la quantité et le prix
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/product/fournisseurs.php?cvsroot=dolibarr&r1=1.36&r2=1.37
Patches:
Index: fournisseurs.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/product/fournisseurs.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- fournisseurs.php 10 Jun 2006 10:00:22 -0000 1.36
+++ fournisseurs.php 10 Jun 2006 10:10:29 -0000 1.37
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: fournisseurs.php,v 1.36 2006/06/10 10:00:22 hregis Exp $
+ * $Id: fournisseurs.php,v 1.37 2006/06/10 10:10:29 hregis Exp $
* $Source: /cvsroot/dolibarr/dolibarr/htdocs/product/fournisseurs.php,v $
*/
@@ -26,7 +26,7 @@
\file htdocs/product/fournisseurs.php
\ingroup product
\brief Page de l'onglet fournisseur de produits
- \version $Revision: 1.36 $
+ \version $Revision: 1.37 $
*/
require("./pre.inc.php");
@@ -93,21 +93,28 @@
$error=0;
- if ($_POST["ref_fourn"]) {
+ if ($_POST["ref_fourn"])
+ {
$ret=$product->add_fournisseur($user, $_POST["id_fourn"],
$_POST["ref_fourn"]);
- if ($ret < 0) {
+ if ($ret < 0)
+ {
$error++;
$mesg='<div class="error">'.$product->error.'</div>';
}
}
- else {
+ else
+ {
$error++;
$mesg='<div
class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Ref")).'</div>';
}
- if ($_POST["qty"] && $_POST["price"] > 0) {
+ if ($_POST["qty"])
+ {
+ if ($_POST["price"] > 0)
+ {
$ret=$product->update_buyprice($_POST["id_fourn"], $_POST["qty"],
$_POST["price"], $user);
- if ($ret < 0) {
+ if ($ret < 0)
+ {
$error++;
$mesg='<div class="error">'.$product->error.'</div>';
if ($ret == -2)
@@ -116,6 +123,17 @@
}
}
}
+ else
+ {
+ $error++;
+ $mesg='<div
class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Price")).'</div>';
+ }
+ }
+ else
+ {
+ $error++;
+ $mesg='<div
class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Qty")).'</div>';
+ }
if (! $error)
{
@@ -433,5 +451,5 @@
$db->close();
-llxFooter('$Date: 2006/06/10 10:00:22 $ - $Revision: 1.36 $');
+llxFooter('$Date: 2006/06/10 10:10:29 $ - $Revision: 1.37 $');
?>