Ouais, t'as raison, youpi !
C'est fou comme parfois un tout petit truc peut prendre la tête, merci pour ta disponibilité et à plus !
Je place ici le contenu du fichier commande.php avec la modif qui fonctionne et qui permet donc d'afficher le titre du paiement utilisé par le client pour la version 1.4.2.1 de Thelia si jamais ça peut aider quelqu'un:
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) Octolys Development */
/* email : thelia@octolys.fr */
/* web : http://www.octolys.fr */
/* */
/* 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 */
/* the Free Software Foundation; either version 2 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* */
/*************************************************************************************/
?>
<?php
include_once("pre.php");
include_once("auth.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php include_once("title.php"); ?>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<div id="Wrapper">
<div id="Subwrapper">
<?php
include_once("../classes/Commande.class.php");
include_once("../classes/Client.class.php");
include_once("../classes/Venteprod.class.php");
include_once("../classes/Ventedeclidisp.class.php");
include_once("../classes/Venteadr.class.php");
include_once("../classes/Stock.class.php");
include_once("../classes/Statutdesc.class.php");
include_once("../classes/Modules.class.php");
include_once("../classes/Modulesdesc.class.php");
include_once("../fonctions/divers.php");
if(!isset($action)) $action="";
if(!isset($client)) $client="";
if(!isset($page)) $page=0;
if(!isset($classement)) $classement="";
?>
<?php
if($action == "annuler"){
$tempcmd = new Commande();
$tempcmd->charger($id);
$tempcmd->statut = "5";
$tempcmd->maj();
$venteprod = new Venteprod();
$query = "select * from $venteprod->table where commande='" . $id . "'";
$resul = mysql_query($query, $venteprod->link);
while($row = mysql_fetch_object($resul)){
// incrémentation du stock général
$produit = new Produit();
$produit->charger($row->ref);
$produit->stock = $produit->stock + $row->quantite;
$produit->maj();
$vdec = new Ventedeclidisp();
$query2 = "select * from $vdec->table where venteprod='" . $row->id . "'";
$resul2 = mysql_query($query2, $vdec->link);
while($row2 = mysql_fetch_object($resul2)){
$stock = new Stock();
if($stock->charger($row2->declidisp, $produit->id)){
$stock->valeur = $stock->valeur + $row->quantite;
$stock->maj();
}
}
}
modules_fonction("statut", $tempcmd);
}
if($action == "supprimer"){
$tempcmd = new Commande();
$tempcmd->charger($id);
$adresse = new Venteadr();
$adresse->charger($tempcmd->adrlivr);
$adresse->delete();
$adresse->charger($tempcmd->adrfact);
$adresse->delete();
$tempcmd->supprimer();
if(file_exists("../client/commande/commande-" . $tempcmd->ref . ".pdf")) unlink("../client/commande/commande-" . $tempcmd->ref . ".pdf");
}
?>
<?php
if(isset($voir_annule)) {
$search="and statut=5";
$cmd_action="supprimer";
}
else {
if(isset($voir_envoye))
$search="and statut=4";
else
$search="and statut not in (5,4)";
$cmd_action="annuler";
}
if($client != "") $search .= " and client=\"$client\"";
$commande = new Commande();
if($page=="") $page=1;
$query = "select * from $commande->table where 1 $search";
$resul = mysql_query($query, $commande->link);
$num = mysql_num_rows($resul);
$nbpage = ceil($num/30);
$debut = ($page-1) * 30;
if($page>1) $pageprec=$page-1;
else $pageprec=$page;
if($page<$nbpage) $pagesuiv=$page+1;
else $pagesuiv=$page;
if($classement == "client") $ordclassement = "order by client";
else if($classement == "statut") $ordclassement = "order by statut";
else $ordclassement = "order by date desc";
?>
<script type="text/JavaScript">
function annuler(id){
if(confirm("Voulez-vous vraiment ANNULER cette commande ?")) location="commande.php?action=annuler&id=" + id;
}
function supprimer(id){
if(confirm("Voulez-vous vraiment SUPPRIMER cette commande ?")) location="commande.php?action=supprimer&id=" + id;
}
</script>
<body>
<?php
$menu="commande";
include_once("entete.php");
?>
<div id="Contenu_int">
<p align="left"><a href="accueil.php" class="lien04">Accueil </a><img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Gestion des commandes</a>
</p>
<table width="710" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="450" height="30" class="titre_cellule_tres_sombre"><a href="commande.php" style="color:#fff;">LISTE DES COMMANDES</a></td>
<td width="450" height="30" class="titre_cellule_tres_sombre"><a href="commande.php?voir_annule=1" style="color:#fff;">Commandes annulÉes</a></td>
<td width="450" height="30" class="titre_cellule_tres_sombre"><a href="commande.php?voir_envoye=1" style="color:#fff;">Commandes envoyées</a></td>
</tr>
</table>
<table width="978" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="130" height="30" class="titre_cellule">N° DE COMMANDE </td>
<td width="120" class="titre_cellule"><a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($page); ?>&classement=date" style="color:#fff;">DATE & HEURE</a> </td>
<td width="152" class="titre_cellule"><a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($page); ?>&classement=client" style="color:#fff;">NOM & PRÉNOM</a></td>
<!--<td width="140" class="titre_cellule">SOCIÉTÉ</td>//-->
<td width="80" class="titre_cellule">MONTANT</td>
<td width="85" class="titre_cellule"><a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($page); ?>&classement=statut" style="color:#fff;">STATUT</a></td>
<td width="80" class="titre_cellule">EXPÉDITION</td>
<td width="80" class="titre_cellule">DÉTAILS</td>
<td width="80" class="titre_cellule">SUPPRIMER / ANNULER</td>
</tr>
<?php
$i=0;
$query = "select * from $commande->table where 1 $search $ordclassement limit $debut,20";
$resul = mysql_query($query, $commande->link);
$venteprod = new Venteprod();
while($row = mysql_fetch_object($resul)){
$client = new Client();
$client->charger_id($row->client);
$statutdesc = new Statutdesc();
$statutdesc->charger($row->statut);
$query2 = "SELECT sum(prixu*quantite) as total FROM $venteprod->table where commande='$row->id'";
$resul2 = mysql_query($query2, $venteprod->link);
$total = round(mysql_result($resul2, 0, "total"), 2);
$port = $row->port;
$total -= $row->remise;
$total += $port;
$jour = substr($row->date, 8, 2);
$mois = substr($row->date, 5, 2);
$annee = substr($row->date, 2, 2);
$heure = substr($row->date, 11, 2);
$minute = substr($row->date, 14, 2);
$seconde = substr($row->date, 17, 2);
$mod = new Modules();
$mod->charger_id($row->paiement);
$moddesc = new Modulesdesc();
$moddesc->charger($mod->nom);
if(!($i%2)) $fond="cellule_sombre";
else $fond="cellule_claire";
$i++;
?>
<tr>
<td height="30" class="<?php echo($fond); ?>"><?php echo($row->ref); ?></td>
<td class="<?php echo($fond); ?>"><?php echo($jour . "/" . $mois . "/" . $annee . " " . $heure . ":" . $minute . ":" . $seconde); ?></td>
<td class="<?php echo($fond); ?>"><a href="client_visualiser.php?ref=<?php echo($client->ref); ?>"><?php echo($client->nom . " " . $client->prenom); ?></a></td>
<td class="<?php echo($fond); ?>"><a href="#"><?php echo($client->entreprise); ?></a></td>
<td class="<//?php echo($fond); ?>"><//?php echo(round($total, 2)); ?><br /><?php echo ($moddesc->titre); ?></td>
<td class="<?php echo($fond); ?>"><?php echo($statutdesc->titre); ?></td>
<td class="<?php echo($fond); ?>"><?php echo("<a href='http://www.coliposte.net/gp/services/main.jsp?m=10003005&colispart=".$row->colis."' style='color:#666666' target='_blank'>".$row->colis."</a>"); ?></td>
<td class="<?php echo($fond); ?>"><a href="commande_details.php?ref=<?php echo($row->ref); ?>">Éditer </a> <a href="commande_details.php?ref=<?php echo($row->ref); ?>"><img src="gfx/suivant.gif" width="12" height="9" border="0" /></a></td>
<td class="<?php echo($fond); ?>_vide"><div align="center"><a href="#" onclick="<?php echo($cmd_action); ?>('<?php echo($row->id); ?>')"><img src="gfx/supprimer.gif" width="9" height="9" border="0" /></a></div></td>
</tr>
<?php
}
?>
<?php
$lien_voir = "";
if(isset($voir_annule) && $voir_annule != "")
$lien_voir .= "&voir_annule=1";
if(isset($voir_envoye) && $voir_envoye != "")
$lien_voir .= "&voir_envoye=1";
?>
</table>
<p align="center"><a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($pageprec); ?><?php echo $lien_voir; ?>">Page précédente</a> |
<?php for($i=0; $i<$nbpage; $i++){ ?>
<?php if($page != $i+1){ ?>
<a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($i+1); ?>&classement=<?php echo($classement); ?><?php echo $lien_voir; ?>"><?php echo($i+1); ?></a> |
<?php } else {?>
<?php echo($i+1); ?>
<span>|</span>
<?php } ?>
<?php } ?>
<a href="<?php echo($_SERVER['PHP_SELF']); ?>?page=<?php echo($pagesuiv); ?><?php echo $lien_voir; ?>">Page suivante</a></p>
</div>
<?php include_once("pied.php");?>
</body>
</html>
Last edited by solakin (11-08-2015 16:03:14)