diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 04171f596a5..7a87a2478a7 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -34,8 +34,9 @@ $langs->load('companies'); $langs->load('bills'); $langs->load('banks'); -$facid=isset($_GET['facid'])?$_GET['facid']:$_POST['facid']; -$action=isset($_GET['action'])?$_GET['action']:$_POST['action']; +$facid=GETPOST('facid'); +$action=GETPOST('action'); +$socid=GETPOST('socid','int'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -51,7 +52,6 @@ if (! $sortfield) $sortfield="p.rowid"; $amounts = array(); // Security check -$socid=0; if ($user->societe_id > 0) { $socid = $user->societe_id; @@ -159,7 +159,7 @@ if ($action == 'add_paiement') } } if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$invoiceid; - else $loc = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$paiement_id; + else $loc = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement_id; Header('Location: '.$loc); exit; } @@ -170,6 +170,7 @@ if ($action == 'add_paiement') } } + /* * View */ @@ -208,7 +209,7 @@ if ($action == 'create' || $action == 'add_paiement') print_fiche_titre($langs->trans('DoPayment')); - if ($mesg) dol_htmloutput_mesg($mesg); + if ($mesg) dol_htmloutput_mesg($mesg); if ($errmsg) dol_htmloutput_errors($errmsg); print '