diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 12bbb7f581e..efd600ae764 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -31,14 +31,14 @@ llxHeader(); */ if ($user->societe_id > 0) { - $action = ''; + $_GET["action"] = ''; $socid = $user->societe_id; } -if ($action == 'delete') +if ($_GET["action"] == 'delete') { $fac = new FactureFourn($db); - $fac->delete($facid); + $fac->delete($_GET["facid"]); $facid = 0 ; } @@ -116,29 +116,29 @@ if ($result) $num = $db->num_rows(); $i = 0; - print_barre_liste("Liste des factures fournisseurs", $page, $PHP_SELF,'', $sortfield, $sortorder,'',$num); + print_barre_liste("Liste des factures fournisseurs", $page, "index.php",'', $sortfield, $sortorder,'',$num); print '
| '; - print_liste_field_titre("Numéro",$PHP_SELF,"facnumber"); + print_liste_field_titre("Numéro","index.php","facnumber"); print ' | '; print ''; - print_liste_field_titre("Date",$PHP_SELF,"fac.datef"); + print_liste_field_titre("Date","index.php","fac.datef"); print ' | '; print 'Libellé | '; print ''; - print_liste_field_titre("Société",$PHP_SELF,"s.nom"); + print_liste_field_titre("Société","index.php","s.nom"); print ' | '; print ''; - print_liste_field_titre("Montant HT",$PHP_SELF,"fac.total_ht"); + print_liste_field_titre("Montant HT","index.php","fac.total_ht"); print ' | '; print ''; - print_liste_field_titre("Montant TTC",$PHP_SELF,"fac.total_ttc"); + print_liste_field_titre("Montant TTC","index.php","fac.total_ttc"); print ' | '; print ''; - print_liste_field_titre("Statut",$PHP_SELF,"fk_statut,paye"); + print_liste_field_titre("Statut","index.php","fk_statut,paye"); print ' | '; print "'.price($obj->total_ht).' | '; print ''.price($obj->total_ttc).' | '; // Affiche statut de la facture - if ($obj->paye) - { - $class = "normal"; - } - else - { - if ($obj->fk_statut == 0) - { - $class = "normal"; - } - else - { - $class = "impayee"; - } - } + if ($obj->paye) + { + $class = "normal"; + } + else + { + if ($obj->fk_statut == 0) + { + $class = "normal"; + } + else + { + $class = "impayee"; + } + } if (! $obj->paye) { if ($obj->fk_statut == 0) { - print 'brouillon | '; + print 'brouillon | '; } elseif ($obj->fk_statut == 3) { - print 'annulée | '; + print 'annulée | '; } else { - print ''.($obj->am?"commencé":"impayée").' | '; + print ''.($obj->am?"commencé":"impayée").' | '; } } else { print 'payée | '; } - + print "\n"; $i++; }