From 7416eeea9b83b77beccfd0a3f9f86ff1435dbcda Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 9 May 2011 07:42:16 +0000 Subject: [PATCH] Fix: problem with create --- .../class/fournisseur.commande.class.php | 4 ++-- htdocs/fourn/commande/fiche.php | 23 +++++++------------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b59d1e66c1b..53d81ea814e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -839,7 +839,7 @@ class CommandeFournisseur extends Commande $sql.= ", fk_statut"; $sql.= ", source"; $sql.= ", model_pdf"; - $sql.= ", fk_mode_reglement"; + //$sql.= ", fk_mode_reglement"; $sql.= ") "; $sql.= " VALUES ("; $sql.= "''"; @@ -850,7 +850,7 @@ class CommandeFournisseur extends Commande $sql.= ", 0"; $sql.= ", 0"; $sql.= ", '".$conf->global->COMMANDE_SUPPLIER_ADDON_PDF."'"; - $sql.= ", ".$this->mode_reglement_id; + //$sql.= ", ".$this->mode_reglement_id; $sql.= ")"; dol_syslog("CommandeFournisseur::Create sql=".$sql); diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index beae15b6466..393c6e98e81 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2006 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2011 Philippe Grand * @@ -48,20 +48,17 @@ $langs->load('deliveries'); $langs->load('products'); $langs->load('stocks'); -$comclientid = GETPOST("comid"); -$socid = GETPOST("socid"); -$action = GETPOST('action'); - +$id = GETPOST("id"); +$ref = GETPOST("ref"); +$action = GETPOST("action"); +$comclientid = GETPOST("comid"); +$socid = GETPOST("socid"); +$projectid = GETPOST("projectid"); // Security check -$id = GETPOST("id"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'commande_fournisseur', $id,''); -// Recuperation de l'id de projet -$projectid = 0; -if ($_GET["projectid"]) $projectid = $_GET["projectid"]; - $mesg=''; @@ -576,8 +573,7 @@ if ($action == 'create') } $id=$orderid; - $_GET['id']=$id; - $_REQUEST['id']=$id; + $db->commit(); } else @@ -797,9 +793,6 @@ $productstatic = new Product($db); $now=dol_now(); -$id = $_REQUEST['id']; -$ref= $_REQUEST['ref']; - if ($id > 0 || ! empty($ref)) { //if ($mesg) print $mesg.'
';