From e4a284c135de7e6d1d254858baa408ccfd49ad81 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 3 Feb 2003 11:56:05 +0000 Subject: [PATCH] . --- htdocs/adherent.class.php | 7 +- htdocs/comm/docsoc.php | 183 ++++++++++++++++---------------- htdocs/compta/bank/account.php3 | 62 +++++++++-- htdocs/compta/bank/bplc.php | 2 +- htdocs/don.class.php | 2 +- htdocs/fourn/facture/fiche.php3 | 10 +- htdocs/fourn/fiche.php3 | 2 +- mysql/tables/actioncomm.sql | 2 +- 8 files changed, 159 insertions(+), 111 deletions(-) diff --git a/htdocs/adherent.class.php b/htdocs/adherent.class.php index cad2331b34f..eaa917d9025 100644 --- a/htdocs/adherent.class.php +++ b/htdocs/adherent.class.php @@ -1,6 +1,7 @@ - * Jean-Louis Bergamo +/* Copyright (C) 2002-2003 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * * 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 @@ -244,7 +245,7 @@ class Adherent } /* - * Suppression du don + * Suppression de l'adhérent * */ Function delete($rowid) diff --git a/htdocs/comm/docsoc.php b/htdocs/comm/docsoc.php index 3b7c5a9ca60..8ee05484356 100644 --- a/htdocs/comm/docsoc.php +++ b/htdocs/comm/docsoc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2003 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 @@ -25,7 +25,7 @@ llxHeader(); $db = new Db(); -function do_upload () { +function do_upload ($socid) { global $uploadfile, $uploadfile_size; global $local_file, $error_msg; @@ -40,18 +40,21 @@ function do_upload () { return; } - $upload_dir = "/tmp"; - $local_file = "$upload_dir/TOTO"; + $soc_dir = SOCIETE_DOCUMENT_DIR . "/" . $socid; - while ( file_exists ( '$local_file' ) ) + if (! is_dir($soc_dir)) { - $seq++; - $local_file .= "$seq"; - } - - print "$local_file"; + mkdir($soc_dir); + } - rename ( $uploadfile, $local_file ); + + $upload_dir = "/tmp"; + + $local_file = SOCIETE_DOCUMENT_DIR . "/" . $socid . "/"; + + move_uploaded_file ( $userfile, $local_file ); + + print $HTTP_POST_FILES['uploadfile']['name']; } @@ -61,7 +64,7 @@ if ( $error_msg ) } if ( $sendit ) { - do_upload (); + do_upload ($socid); } @@ -71,95 +74,95 @@ if ( $sendit ) * * */ -if ($socid > 0) { +if ($socid > 0) +{ $societe = new Societe($db, $socid); - $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM societe as s, c_stcomm as st, c_typent as t, c_effectif as e "; $sql .= " WHERE s.fk_stcomm=st.id AND s.fk_typent = t.id AND s.fk_effectif = e.id"; - if ($to == 'next') { - $sql .= " AND s.idp > $socid ORDER BY idp ASC LIMIT 1"; - } elseif ($to == 'prev') { - $sql .= " AND s.idp < $socid ORDER BY idp DESC LIMIT 1"; - } else { - $sql .= " AND s.idp = $socid"; - } $result = $db->query($sql); - if ($result) { - $objsoc = $db->fetch_object(0); + if ($result) + { + $objsoc = $db->fetch_object(0); + + $dac = strftime("%Y-%m-%d %H:%M", time()); + if ($errmesg) + { + print "$errmesg
"; + } + + /* + * + */ + print "\n"; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
Fiche client : $objsoc->nom
idp&action=add_bookmark\">[Bookmark]idp&action=create\">[Projet]idp&action=create\">[Propal]idp\">Notes[idp&action=edit\">Editer]
"; + /* + * + * + */ + + + print "\n"; + print "\n"; + + print "
"; + print ""; + + print ""; + print ""; + print ""; + + print ""; + print ""; + + print ""; + + print "
Type $objsoc->typentEffectif$objsoc->effectif
Tel $objsoc->tel fax$objsoc->fax 
Ville".nl2br($objsoc->address)."
$objsoc->cp $objsoc->ville
sirensiren\">$objsoc->siren prefix"; + if ($objsoc->prefix_comm) { + print $objsoc->prefix_comm; + } else { + print "[idp&action=attribute_prefix\">Attribuer]"; + } + + print "
Siteurl\">$objsoc->url 
"; + + /* + * + */ + print "
"; + + echo '
'; + + print ''; + print ''; + print '

'; + print ''; + print '
'; + print '
'; + + + + + - $dac = strftime("%Y-%m-%d %H:%M", time()); - if ($errmesg) { - print "$errmesg
"; } - - /* - * - */ - print "\n"; - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "
Fiche client : $objsoc->nom
idp&action=add_bookmark\">[Bookmark]idp&action=create\">[Projet]idp&action=create\">[Propal]idp\">Notes[idp&action=edit\">Editer]
"; - /* - * - * - */ - - - print "\n"; - print "\n"; - - print "
"; - print ""; - - print ""; - print ""; - print ""; - - print ""; - print ""; - - print ""; - - print "
Type $objsoc->typentEffectif$objsoc->effectif
Tel $objsoc->tel fax$objsoc->fax 
Ville".nl2br($objsoc->address)."
$objsoc->cp $objsoc->ville
sirensiren\">$objsoc->siren prefix"; - if ($objsoc->prefix_comm) { - print $objsoc->prefix_comm; - } else { - print "[idp&action=attribute_prefix\">Attribuer]"; + else + { + print $db->error() . "
" . $sql; } - - print "
Siteurl\">$objsoc->url 
"; - - /* - * - */ - print "
"; - - echo '
'; - -?> - - - - -

- -
-
-error() . "
" . $sql; - } -} else { +} +else +{ print "Erreur"; } $db->close(); diff --git a/htdocs/compta/bank/account.php3 b/htdocs/compta/bank/account.php3 index 1e8c02d405e..9b5117d9532 100644 --- a/htdocs/compta/bank/account.php3 +++ b/htdocs/compta/bank/account.php3 @@ -97,13 +97,28 @@ if ($account) print "Bank -  -"; print "Voir tout"; - print "
"; - print ""; - print ""; + print ''; + print ''; + print '
'; + /* + * Formulaire de recherche + * + */ print ""; print ""; - print ""; - print ""; + print ''; + print ''; + print ""; + print ""; + print ''; + print "\n"; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; print ""; print ""; print ""; @@ -151,7 +166,18 @@ if ($account) */ $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type"; - $sql .= " FROM llx_bank as b "; if ($account) { $sql .= " WHERE fk_account=$account"; } + $sql .= " FROM llx_bank as b "; + + if ($account) + { + $sql .= " WHERE fk_account=$account"; + } + + if ($req_debit) + { + $sql .= " AND b.amount = -".$req_debit; + } + if ($vue) { if ($vue == 'credit') @@ -182,7 +208,7 @@ if ($account) if ($i > ($nbline - $viewline)) { - if (!$psol) + if (!$psol && $action !='search') { print ""; print ""; @@ -237,13 +263,20 @@ if ($account) print "\n"; } - if ($total > 0) + if ($action !='search') { - print "\n"; + if ($total > 0) + { + print '\n"; + } + else + { + print "\n"; + } } else { - print "\n"; + print ''; } if ($objp->rappro) @@ -255,7 +288,14 @@ if ($account) print ""; } - print "\n"; + if ($action !='search') + { + print "\n"; + } + else + { + print ''; + } print ""; diff --git a/htdocs/compta/bank/bplc.php b/htdocs/compta/bank/bplc.php index 252c0eae5b1..a2f5491b1c2 100644 --- a/htdocs/compta/bank/bplc.php +++ b/htdocs/compta/bank/bplc.php @@ -53,7 +53,7 @@ $sql = "SELECT ipclient, code_retour, ref_commande"; -$sql .= " FROM transaction_bplc"; +$sql .= " FROM llx_transaction_bplc"; $result = $db->query($sql); if ($result) { diff --git a/htdocs/don.class.php b/htdocs/don.class.php index 90efbaf5ab8..d55877fb5d1 100644 --- a/htdocs/don.class.php +++ b/htdocs/don.class.php @@ -360,7 +360,7 @@ class Don } } /* - * Classé comme payé, le don a été recu + * * */ Function set_commentaire($rowid, $commentaire='') diff --git a/htdocs/fourn/facture/fiche.php3 b/htdocs/fourn/facture/fiche.php3 index 90c5a0d114f..103272e2b1e 100644 --- a/htdocs/fourn/facture/fiche.php3 +++ b/htdocs/fourn/facture/fiche.php3 @@ -253,11 +253,15 @@ else print stripslashes($obj->note); print ''; - print ''; - print ''; + print ''; + print ''; print ''; - print ''; + print ''; print ''; print '
DateTypeDescriptionDebitCredit--
DateTypeDescriptionDébitCréditSoldeRelFrancs
 ".price($total)."  ".price($objp->amount)."".price($total)."'.price($total)."".price($total)."".price($total)."-rowid&account=$account\">[Del]".francs($objp->amount)."".francs($objp->amount)."-
Numéro :
Libellé :
Numéro :'; + print $obj->facnumber .'
'; + print '
Libellé :'; + print stripslashes($obj->libelle). '
'; + print '
Montant HT :
'.$obj->amount.'
TVA :