diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 5d11c1e957e..e0cc9c389f8 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -65,7 +65,7 @@ if ($mode == 'search') { if ($mode-search == 'soc') { - $sql = "SELECT s.idp FROM llx_societe as s "; + $sql = "SELECT s.idp FROM ".MAIN_DB_PREFIX."societe as s "; $sql .= " WHERE lower(s.nom) like '%".strtolower($socname)."%'"; } @@ -97,7 +97,7 @@ if ($sortfield == "") $sql = "SELECT s.idp as socid, s.nom, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, s.prefix_comm, fac.total_ht, fac.total_ttc, fac.paye, fac.libelle, ".$db->pdate("fac.datef")." as datef, fac.rowid as facid, fac.facnumber"; -$sql .= " FROM llx_societe as s, llx_facture_fourn as fac "; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as fac "; $sql .= " WHERE fac.fk_soc = s.idp"; if ($socid) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index ab989c6d888..9c6616a376c 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004 Éric Seigne * Copyright (C) 2004 Laurent Destailleur * @@ -71,7 +71,7 @@ if ($action == 'create') { $sql = "SELECT s.nom,s.idp, f.amount, f.total_ttc, f.facnumber"; - $sql .= " FROM llx_societe as s, llx_facture_fourn as f WHERE f.fk_soc = s.idp"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as f WHERE f.fk_soc = s.idp"; $sql .= " AND f.rowid = $facid"; $result = $db->query($sql); @@ -97,7 +97,7 @@ if ($action == 'create') print "Montant :".price($obj->total_ttc)." euros TTC"; - $sql = "SELECT sum(p.amount) FROM llx_paiementfourn as p WHERE p.fk_facture_fourn = $facid;"; + $sql = "SELECT sum(p.amount) FROM ".MAIN_DB_PREFIX."paiementfourn as p WHERE p.fk_facture_fourn = $facid;"; $result = $db->query($sql); if ($result) { $sumpayed = $db->result(0,0); @@ -124,7 +124,7 @@ if ($action == 'create') print "Type :'; print "Compte à débiter :