This commit is contained in:
Rodolphe Quiedeville 2004-02-13 17:13:39 +00:00
parent 17bafce2da
commit cd0685cd3f
2 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -97,8 +97,6 @@ if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"]
* *
*/ */
llxHeader('','Fiche expedition','ch-expedition.html',$form_search);
$html = new Form($db); $html = new Form($db);
/********************************************************************* /*********************************************************************
@ -110,6 +108,8 @@ $html = new Form($db);
************************************************************************/ ************************************************************************/
if ($HTTP_POST_VARS["action"] == 'create') if ($HTTP_POST_VARS["action"] == 'create')
{ {
llxHeader('','Fiche expedition','ch-expedition.html',$form_search);
print_titre("Créer une expédition"); print_titre("Créer une expédition");
$commande = new Commande($db); $commande = new Commande($db);
@ -267,12 +267,17 @@ else
if ($id > 0) if ($id > 0)
{ {
$expedition = New Expedition($db); $expedition = New Expedition($db);
if ( $expedition->fetch($id) > 0) $result = $expedition->fetch($id);
if ( $result > 0)
{ {
$author = new User($db); $author = new User($db);
$author->id = $expedition->user_author_id; $author->id = $expedition->user_author_id;
$author->fetch(); $author->fetch();
llxHeader('','Fiche expedition','ch-expedition.html',$form_search,$author);
$commande = New Commande($db); $commande = New Commande($db);
$commande->fetch($expedition->commande_id); $commande->fetch($expedition->commande_id);

View File

@ -65,9 +65,9 @@ class PaiementFourn
if (isset($result)) if (isset($result))
{ {
$this->id = $this->db->last_insert_id(); $this->id = $this->db->last_insert_id();
$label = "Règlement facture $this->facnumber - $this->societe"; $label = "Règlement facture $this->facnumber - $this->societe";
// Portion de code qui mériterait de se baser sur la table des types // Portion de code qui mériterait de se baser sur la table des types
// de paiement, mais comme cette portion est aussi en dur dans l'ajout // de paiement, mais comme cette portion est aussi en dur dans l'ajout
// des factures clients, je fais pareil pour les factures fournisseurs // des factures clients, je fais pareil pour les factures fournisseurs
@ -148,6 +148,12 @@ class PaiementFourn
* *
* *
*/ */
Function delete($id)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn WHERE rowid = $id";
return $this->db->query($sql);
}
} }
?> ?>