From cd0685cd3faa3e1a850d3d7009587ec8934e7fb2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 13 Feb 2004 17:13:39 +0000 Subject: [PATCH] Synchro --- htdocs/expedition/fiche.php | 15 ++++++++++----- htdocs/fourn/facture/paiementfourn.class.php | 10 ++++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index cad52fa1fde..7c28bc5133b 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2004 Rodolphe Quiedeville * * 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 @@ -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); /********************************************************************* @@ -110,6 +108,8 @@ $html = new Form($db); ************************************************************************/ if ($HTTP_POST_VARS["action"] == 'create') { + llxHeader('','Fiche expedition','ch-expedition.html',$form_search); + print_titre("Créer une expédition"); $commande = new Commande($db); @@ -267,12 +267,17 @@ else if ($id > 0) { $expedition = New Expedition($db); - if ( $expedition->fetch($id) > 0) + $result = $expedition->fetch($id); + + if ( $result > 0) { + $author = new User($db); $author->id = $expedition->user_author_id; $author->fetch(); - + + llxHeader('','Fiche expedition','ch-expedition.html',$form_search,$author); + $commande = New Commande($db); $commande->fetch($expedition->commande_id); diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index de13c446142..6be4320592a 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -65,9 +65,9 @@ class PaiementFourn if (isset($result)) { $this->id = $this->db->last_insert_id(); - + $label = "Règlement facture $this->facnumber - $this->societe"; - + // 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 // 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); + } } ?>