From fcd80187501809af54beb5574f63fbbb4590a796 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Feb 2004 18:48:17 +0000 Subject: [PATCH] =?UTF-8?q?Le=20lien=20entre=20le=20paiement=20fournisseur?= =?UTF-8?q?=20et=20l'=E9criture=20bancaire=20g=E9n=E9r=E9e=20est=20fait.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fourn/facture/paiementfourn.class.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index 6be4320592a..7e3b3ea7aa0 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -100,16 +100,13 @@ class PaiementFourn $sql .= " VALUES (now(), '$this->datepaye', -$this->amount, '$this->author', '$label', '$this->paiementid', '$this->accountid', '$this->num_paiement')"; $result = $this->db->query($sql); - // Pour l'instant ce code n'est pas actif et n'est pas nécessaire. - // Je l'activerais (Eldy) si besoin de retrouver le lien entre une transaction bancaire - // et la facture générée se fait sentir (fonction futures ?): // Mise a jour fk_bank dans llx_paiement_fourn - //if ($result) { - // $this->bankid = $this->db->last_insert_id(); - // - // $sql = "UPDATE ".MAIN_DB_PREFIX."paiementfourn SET fk_bank=$this->bankid WHERE rowid=$this->id"; - // $result = $this->db->query($sql); - //} + if ($result) { + $this->bankid = $this->db->last_insert_id(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."paiementfourn SET fk_bank=$this->bankid WHERE rowid=$this->id"; + $result = $this->db->query($sql); + } } else