From 7307f54ea42cdd77299482b4cdefa0262cc563a1 Mon Sep 17 00:00:00 2001 From: opensides Date: Mon, 27 Sep 2004 07:59:47 +0000 Subject: [PATCH] =?UTF-8?q?Voici=20un=20patch=20pour=20la=20cr=E9ation=20d?= =?UTF-8?q?'un=20paiement=20depuis=20une=20facture=20fournisseur.=20(varia?= =?UTF-8?q?bles=20POST/GET=20non=20r=E9cup=E9r=E9es=20dans=20fourn/facture?= =?UTF-8?q?/paiement.php)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fourn/facture/paiement.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index e8c94dcfb92..24feccd2edb 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004 Éric Seigne * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004 Christophe Combelles * * 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 @@ -24,6 +25,9 @@ require("./pre.inc.php"); require("./paiementfourn.class.php"); +$facid=isset($_GET["facid"])?$_GET["facid"]:$_POST["facid"]; +$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"]; + /* * Sécurité accés client */ @@ -39,18 +43,18 @@ if ($action == 'add') { $paiementfourn = new PaiementFourn($db); $paiementfourn->facid = $facid; - $paiementfourn->facnumber = $facnumber; + $paiementfourn->facnumber = $_POST['facnumber']; $paiementfourn->datepaye = $db->idate(mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"])); - $paiementfourn->amount = $amount; - $paiementfourn->accountid = $accountid; - $paiementfourn->societe = $societe; - $paiementfourn->author = $author; - $paiementfourn->paiementid = $paiementid; - $paiementfourn->num_paiement = $num_paiement; - $paiementfourn->note = $note; + $paiementfourn->amount = $_POST['amount']; + $paiementfourn->accountid = $_POST['accountid']; + $paiementfourn->societe = $_POST['societe']; + $paiementfourn->author = $_POST['author']; + $paiementfourn->paiementid = $_POST['paiementid']; + $paiementfourn->num_paiement = $_POST['num_paiement']; + $paiementfourn->note = $_POST['note']; if ( $paiementfourn->create($user) ) {