diff --git a/htdocs/compta/dons/edit.php b/htdocs/compta/dons/edit.php deleted file mode 100644 index 39207031fd1..00000000000 --- a/htdocs/compta/dons/edit.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * 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. - * - * $Id$ - * $Source$ - * - */ -require("./pre.inc.php"); -require("../../don.class.php"); -require("../../paiement.class.php"); - -if ($action == 'update') -{ - - if ($amount > 0) - { - - $don = new Don($db); - - $don->id = $_POST["rowid"]; - $don->prenom = $prenom; - $don->nom = $nom; - $don->statut = $_POST["statutid"]; - $don->societe = $societe; - $don->adresse = $adresse; - $don->amount = $amount; - $don->cp = $cp; - $don->ville = $ville; - $don->email = $email; - $don->date = mktime(12, 0 , 0, $remonth, $reday, $reyear); - $don->note = $note; - $don->pays = $pays; - $don->public = $public; - $don->projetid = $projetid; - $don->commentaire = $_POST["comment"]; - $don->modepaiementid = $modepaiement; - - if ($don->update($user->id) ) - { - Header("Location: fiche.php?rowid=$don->id&action=edit"); - } - } - else - { - print "Erreur"; - $action = "create"; - } -} - - -llxHeader(); - - -if ($rowid) -{ - - $don = new Don($db); - $don->id = $rowid; - $don->fetch($rowid); - - $sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber"; - $sql .= " FROM societe as s, ".MAIN_DB_PREFIX."facture as f WHERE f.fk_soc = s.idp"; - $sql .= " AND f.rowid = $facid"; - - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows(); - if ($num) { - $obj = $db->fetch_object( 0); - - $total = $obj->total; - } - } - print_titre("Saisir un don"); - print "