From 9a57d560d0e5e4ff71bdd9ebd3ad7a3ba4276b74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Mar 2004 22:53:03 +0000 Subject: [PATCH] Gestion du facid en get et post. --- htdocs/compta/paiement.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index ebe77dcff1d..25bf0244995 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -27,6 +27,9 @@ include_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); * */ +$facid=isset($_GET["facid"])?$_GET["facid"]:$_POST["facid"]; + + if ($HTTP_POST_VARS["action"] == 'add_paiement') { @@ -66,7 +69,7 @@ if ($HTTP_POST_VARS["action"] == 'add_paiement') if ( $paiement->fetch($paiement_id) ) { $fac = new Facture($db); - $fac->fetch($HTTP_POST_VARS["facid"]); + $fac->fetch($facid); $fac->fetch_client(); $label = "Règlement facture"; @@ -116,7 +119,7 @@ llxHeader(); if ($_GET["action"] == 'create') { $facture = new Facture($db); - $facture->fetch($_GET["facid"]); + $facture->fetch($facid); $sql = "SELECT s.nom,s.idp, f.amount, f.total_ttc as total, f.facnumber"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f WHERE f.fk_soc = s.idp";