diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 5b1a8a99135..a93f2151114 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -220,5 +220,19 @@ print ""; print ""; $db->close(); -llxFooter(); +/* + * Repertoire + */ + +print_titre("Chemins d'accés aux documents"); + +print ''; +print ''; +print ''; +print "\n"; +print ''; +print ''; +print "
NomValeur
Répertoire'.FAC_OUTPUTDIR.'
URL'.FAC_OUTPUT_URL.'
"; + +llxFooter("Dernière modification $Date$ révision $Revision$"); ?> diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 12d4add203c..635826c1beb 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -24,54 +24,29 @@ llxHeader(); print_titre("Configuration Dolibarr (version ".DOL_VERSION.")"); + + print ''; - -print ''; -print ''; -print ''; +print ''; +print ''; +print "\n"; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; -if ($conf->fichinter->enabled) { - print ''; - print ''; - print ''; - print ''; -} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; -if ($conf->don->enabled) { - print ''; - print ''; - print ''; - print ''; -} - - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; print '
css' . $conf->css . '
theme' . $conf->theme . '
document root' . $DOCUMENT_ROOT . '
NomValeurAction
Database
type' . $conf->db->type . '
host' . $conf->db->host . '
user' . $conf->db->user . ' 
pass' . $conf->db->pass . ' 
Database name' . $conf->db->name . '
Propale
templates' . $conf->propal->templatesdir . '
output dir' . $conf->propal->outputdir . '
output url' . $conf->propal->outputurl . '
Facture
templates' . $conf->facture->templatesdir . '
output dir' . $conf->facture->outputdir . '
output url' . $conf->facture->outputurl . '
Version' . DOL_VERSION . ' 
css' . $conf->css . ' 
theme' . $conf->theme . ' 
document root' . DOL_DOCUMENT_ROOT . ' 
Fiche d\'intervention
templates' . $conf->fichinter->templatesdir . '
output dir' . $conf->fichinter->outputdir . '
output url' . $conf->fichinter->outputurl . '
Database
type' . $conf->db->type . ' 
host' . $conf->db->host . ' 
user' . $conf->db->user . '  
pass' . $conf->db->pass . '  
Database name' . $conf->db->name . ' 
Dons
Paiement en ligne' . $conf->don->onlinepayment . '
Don minimum' . $conf->don->minimum . '
Email Moderateurs'.$conf->don->email_moderator.'
Webcal
type' . $conf->webcal->db->type . '
host' . $conf->webcal->db->host . '
user' . $conf->webcal->db->user . ' 
pass' . $conf->webcal->db->pass . ' 
Database name' . $conf->webcal->db->name . '
'; -llxFooter(); +llxFooter("Dernière modification $Date$ révision $Revision$"); ?> diff --git a/htdocs/comm/projet/fiche.php3 b/htdocs/comm/projet/fiche.php3 index 7805f787e4e..3e34414d26a 100644 --- a/htdocs/comm/projet/fiche.php3 +++ b/htdocs/comm/projet/fiche.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ * * 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 @@ -18,6 +15,9 @@ * 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.php3"); @@ -92,49 +92,52 @@ if ($action == 'create') $propales = $projet->get_propal_list(); - if (sizeof($propales)>0 && is_array($propales)) { + if (sizeof($propales)>0 && is_array($propales)) + { - print '

Listes des propales associées au projet'; - print ''; - - print ""; - print ""; - print ''; - print ''; - print ''; - print ''; - - for ($i = 0; $ifetch($propales[$i]); + print_titre('Listes des propales associées au projet'); + print '
RéfDatePrixStatut
'; - $var=!$var; - print ""; - print "\n"; - - print ''; - - print ''; - print ''; + print ''; + print ""; + print ''; + print ''; + print ''; print ''; - $total = $total + $propale->price; - } - - print ''; - print ''; - print ''; - print "
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).'statut
RéfDatePrixStatut
'.$i.' propalesTotal : '.price($total).'Euros HT
"; - } else { - print "pas de propales"; - } - } - - - print "

"; - - print ""; + for ($i = 0; $ifetch($propales[$i]); + + $var=!$var; + print ""; + print "\n"; + + print ''; + + print ''; + print ''; + print ''; + + $total = $total + $propale->price; + } + print ''; + print ''; + print ''; + print "
Editer
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).''.$propale->statut.'
'.$i.' propalesTotal : '.price($total).'Euros HT
"; + } + else + { + print "pas de propales"; + } + } + + + print "

"; + + print ""; + print ""; print ""; diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3 index 29abccbb5fb..8f3fb33f9d7 100644 --- a/htdocs/compta/index.php3 +++ b/htdocs/compta/index.php3 @@ -30,7 +30,6 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } - llxHeader(); $db = new Db(); diff --git a/htdocs/compta/propal.php3 b/htdocs/compta/propal.php3 index be0e67884ce..628767fb080 100644 --- a/htdocs/compta/propal.php3 +++ b/htdocs/compta/propal.php3 @@ -36,7 +36,8 @@ llxHeader(); $db = new Db(); -if ($action == 'setstatut') { +if ($action == 'setstatut') +{ /* * Cloture de la propale */ @@ -233,8 +234,7 @@ if ($propalid) print ''; } - - + print ""; print ""; @@ -305,120 +305,111 @@ if ($propalid) if ($sortfield == "") { - $sortfield="lower(p.label)"; + $sortfield="p.datep"; } if ($sortorder == "") { - $sortorder="ASC"; + $sortorder="DESC"; } - $yn["t"] = "oui"; - $yn["f"] = "non"; - if ($page == -1) { $page = 0 ; } - $limit = 26; - $offset = $limit * $page ; + $pageprev = $page - 1; $pagenext = $page + 1; + $limit = $conf->liste_limit; + $offset = $limit * $page ; - - print "
Editer-----
"; - print ""; - print "
Propositions commerciales
"; + print_barre_liste("Propositions commerciales", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder); $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price - p.remise as price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; $sql .= " FROM llx_societe as s, llx_propal as p, c_propalst as c "; $sql .= " WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND p.fk_statut in(2,4)"; - if ($socidp) { - $sql .= " AND s.idp = $socidp"; - } - - if ($viewstatut <> '') { - $sql .= " AND c.id = $viewstatut"; - } - - if ($month > 0) { - $sql .= " AND date_format(p.datep, '%Y-%m') = '$year-$month'"; - } - if ($year > 0) { - $sql .= " AND date_format(p.datep, '%Y') = $year"; - } - - $sql .= " ORDER BY p.fk_statut, datep DESC"; - - if ( $db->query($sql) ) { - $num = $db->num_rows(); - $i = 0; - print ""; - - $oldstatut = -1; - $subtotal = 0; - while ($i < $num) { - $objp = $db->fetch_object( $i); - - if ($objp->statut <> $oldstatut ) { - $oldstatut = $objp->statut; - - if ($i > 0) { - print "\n"; - print "\n"; - } - $subtotal = 0; - - print ''; - print ""; - print ""; - print ""; - print ""; - print "'; - print "\n"; - $var=True; - } - - $var=!$var; - print ""; - print "\n"; - print "\n"; - - $now = time(); - $lim = 3600 * 24 * 15 ; - - if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 ) { - print ""; - } else { - print ""; - } - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - - $total = $total + $objp->price; - $subtotal = $subtotal + $objp->price; - - $i++; + if ($socidp) + { + $sql .= " AND s.idp = $socidp"; } - print "
Total : ".price($subtotal)."Euros HT
RéfSociétéDatePrixStatut statutid\">"; - print '
propalid\">$objp->refidp\">$objp->nom > 15 jours "; - $y = strftime("%Y",$objp->dp); - $m = strftime("%m",$objp->dp); - - print strftime("%d",$objp->dp)."\n"; - print " "; - print strftime("%B",$objp->dp)."\n"; - print " "; - print strftime("%Y",$objp->dp)."".price($objp->price)."$objp->statut
"; - $db->free(); - } else { - print $db->error(); - } + if ($viewstatut <> '') + { + $sql .= " AND c.id = $viewstatut"; + } + + if ($month > 0) + { + $sql .= " AND date_format(p.datep, '%Y-%m') = '$year-$month'"; + } + + if ($year > 0) + { + $sql .= " AND date_format(p.datep, '%Y') = $year"; + } + + $sql .= " ORDER BY $sortfield $sortorder "; + $sql .= $db->plimit( $limit ,$offset); + + if ( $db->query($sql) ) + { + $num = $db->num_rows(); + $i = 0; + print ""; + print ''; + print ""; + print ""; + print ''; + print ''; + print ''; + print "\n"; + + while ($i < $num) + { + $objp = $db->fetch_object( $i); + + $var=!$var; + print ""; + print "\n"; + print "\n"; + + $now = time(); + $lim = 3600 * 24 * 15 ; + + if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 ) + { + print ""; + } + else + { + print ""; + } + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + + $i++; + } + + print "
RéfSociétéDatePrixStatut
propalid\">$objp->refidp\">$objp->nom > 15 jours "; + $y = strftime("%Y",$objp->dp); + $m = strftime("%m",$objp->dp); + + print strftime("%d",$objp->dp)."\n"; + print " "; + print strftime("%B",$objp->dp)."\n"; + print " "; + print strftime("%Y",$objp->dp)."".price($objp->price)."$objp->statut
"; + $db->free(); + } + else + { + print $db->error(); + print "
$sql"; + } } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 51f56bd05f5..69c46268478 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -58,7 +58,7 @@ class Form { * * */ - Function select_tva($name='') + Function select_tva($name='', $defaulttx = 19.6) { if (! strlen(trim($name))) { diff --git a/htdocs/product.class.php3 b/htdocs/product.class.php3 index edd358cdb04..aa84eddb042 100644 --- a/htdocs/product.class.php3 +++ b/htdocs/product.class.php3 @@ -20,7 +20,8 @@ * */ -class Product { +class Product +{ var $db ; var $id ; @@ -29,28 +30,34 @@ class Product { var $description; var $price ; - Function Product($DB, $id=0) { - $this->db = $DB; - $this->id = $id ; - } + Function Product($DB, $id=0) + { + $this->db = $DB; + $this->id = $id ; + } /* * * * */ - Function create($user) { + Function create($user) + { - $sql = "INSERT INTO llx_product (fk_user_author) VALUES (".$user->id.")"; - - if ($this->db->query($sql) ) { - $id = $this->db->last_insert_id(); - - if ( $this->update($id, $user) ) { - return $id; - } - } else { - print $this->db->error() . ' in ' . $sql; - } + $sql = "INSERT INTO llx_product (fk_user_author) VALUES (".$user->id.")"; + + if ($this->db->query($sql) ) + { + $id = $this->db->last_insert_id(); + + if ( $this->update($id, $user) ) + { + return $id; + } + } + else + { + print $this->db->error() . ' in ' . $sql; + } } /* @@ -58,44 +65,53 @@ class Product { * * */ - Function update($id, $user) { + Function update($id, $user) + { - $sql = "UPDATE llx_product "; - $sql .= " SET label = '" . trim($this->libelle) ."'"; - $sql .= ",ref = '" . trim($this->ref) ."'"; - $sql .= ",price = " . $this->price ; - $sql .= ",description = '" . trim($this->description) ."'"; - - $sql .= " WHERE rowid = " . $id; - - if ( $this->db->query($sql) ) { - return 1; - } else { - print $this->db->error() . ' in ' . $sql; + $sql = "UPDATE llx_product "; + $sql .= " SET label = '" . trim($this->libelle) ."'"; + $sql .= ",ref = '" . trim($this->ref) ."'"; + $sql .= ",price = " . $this->price ; + $sql .= ",tva_tx = " . $this->tva_tx ; + $sql .= ",description = '" . trim($this->description) ."'"; + + $sql .= " WHERE rowid = " . $id; + + if ( $this->db->query($sql) ) + { + return 1; + } + else + { + print $this->db->error() . ' in ' . $sql; + } } - } /* * * * */ - Function fetch ($id) { + Function fetch ($id) + { - $sql = "SELECT rowid, ref, label, description, price FROM llx_product WHERE rowid = $id"; + $sql = "SELECT rowid, ref, label, description, price, tva_tx"; + $sql .= " FROM llx_product WHERE rowid = $id"; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql) ; - if ( $result ) { - $result = $this->db->fetch_array(); + if ( $result ) + { + $result = $this->db->fetch_array(); - $this->id = $result["rowid"]; - $this->ref = $result["ref"]; - $this->label = $result["label"]; - $this->description = $result["description"]; - $this->price = $result["price"]; - } - $this->db->free(); - return $result; + $this->id = $result["rowid"]; + $this->ref = $result["ref"]; + $this->label = $result["label"]; + $this->description = $result["description"]; + $this->price = $result["price"]; + $this->tva_tx = $result["tva_tx"]; + } + $this->db->free(); + return $result; } }