diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index e9e0e95e9b5..f39603d17d2 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -295,7 +295,7 @@ if ($_socid > 0)
{
$objp = $db->fetch_object();
print "
";
- print ''.$objp->ref." \n";
+ print ''.img_object($langs->trans("ShowOrder"),"order").' '.$objp->ref." \n";
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 )
{
print " > 15 jours ";
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 52075bcca03..f37b8721398 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -79,7 +79,7 @@ if ($_GET["action"] == 'del_bookmark')
* Affichage page
*/
-print_titre("Espace commercial");
+print_titre($langs->trans("CommercialArea"));
print '';
@@ -136,7 +136,7 @@ if ($conf->propal->enabled) {
{
$obj = $db->fetch_object();
$var=!$var;
- print "rowid."\">".$obj->ref." ".$obj->nom." ".price($obj->price)." ";
+ print "rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref." ".$obj->nom." ".price($obj->price)." ";
$i++;
$total += $obj->price;
}
@@ -174,7 +174,7 @@ if ($conf->commande->enabled)
while ($i < $num)
{
$obj = $db->fetch_object();
- print "rowid\">$obj->ref ";
+ print "rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref." ";
print ''.$obj->nom.' ';
$i++;
$var=!$var;
@@ -364,8 +364,7 @@ if ($conf->contrat->enabled && 0) // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
while ($i < $num)
{
$obj = $db->fetch_object();
- print "rowid."\">".img_file()." ";
- print "rowid."\">".$obj->ref." ";
+ print "rowid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref." ";
print "idp\">$obj->nom \n";
print "".$contrat->LibStatut($obj->enservice)." \n";
$var=!$var;
@@ -408,9 +407,8 @@ if ($conf->propal->enabled) {
while ($i < $num)
{
$obj = $db->fetch_object();
- print "propalid."\">".img_file()." ";
- print "propalid."\">".$obj->ref." ";
- print "idp\">$obj->nom \n";
+ print "propalid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref." ";
+ print "idp\">".img_object($langs->trans("ShowCompany"),"company")." ".$obj->nom." \n";
print "";
print strftime("%e %b %Y",$obj->dp)." \n";
print "".price($obj->price)." \n";
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 9bfeb55c074..594e7894c8a 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -354,7 +354,7 @@ if ($_GET["propalid"])
}
else
{
- print 'Remise ';
+ print ''.$langs->trans("Discount").' ';
print ''.$propal->remise_percent.' % ';
}
@@ -393,7 +393,7 @@ if ($_GET["propalid"])
print '';
print ''.$langs->trans("Comments").' : ';
+ print ' ';
print "
";
}
@@ -405,11 +405,11 @@ if ($_GET["propalid"])
print '';
print "";
print ''.$langs->trans("Ref").' '.$langs->trans("ProductOrService").' ';
- print ''.$langs->trans("VAT").' '.$langs->trans("Qty").' Remise P.U. ';
+ print ''.$langs->trans("VAT").' '.$langs->trans("Qty").' '.$langs->trans("Discount").' P.U. ';
print " ";
print " \n";
- $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.tva_tx, pt.remise_percent, pt.subprice";
+ $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, p.fk_product_type, pt.qty, p.rowid as prodid, pt.tva_tx, pt.remise_percent, pt.subprice";
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propal->id";
$sql .= " ORDER BY pt.rowid ASC";
$result = $db->query($sql);
@@ -425,8 +425,11 @@ if ($_GET["propalid"])
$objp = $db->fetch_object($result);
$var=!$var;
print "";
- print "[$objp->ref] \n";
- print ''.$objp->product.' ';
+ print "".$objp->ref." \n";
+ print '';
+ if ($objp->fk_product_type==0) print img_object($langs->trans("ShowProduct"),"product");
+ if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service");
+ print ' '.$objp->product.' ';
print ''.$objp->tva_tx.' % ';
print "".$objp->qty." \n";
print ''.$objp->remise_percent.' % ';
@@ -704,32 +707,20 @@ if ($_GET["propalid"])
$coms = $propal->commande_liste_array();
print '';
- if ($nb_commande == 1)
-
- {
- print "Commande rattachée : ";
- print '';
- print img_file();
- print ' '.$coms[0]." ";
- print " \n";
- }
- else
- {
- print "Commandes rattachées \n";
+ print "Commande(s) rattachée(s) \n";
for ($i = 0 ; $i < $nb_commande ; $i++)
{
print ''.$coms[$i]." \n";
print " \n";
}
- }
+
print "
";
}
}
- // print 'Générer ";
/*
*
*/
@@ -895,7 +886,7 @@ else
if ( $db->query($sql) )
{
$num = $db->num_rows();
- print_barre_liste("Propositions commerciales", $page,"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
+ print_barre_liste($langs->trans("Proposals"), $page,"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
$i = 0;
@@ -916,9 +907,7 @@ else
$now = time();
$var=!$var;
print " ";
- print '';
- print img_file();
- print " propalid\">$objp->ref \n";
+ print ''.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref." \n";
if ($objp->client == 1)
{
$url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->idp;
@@ -928,7 +917,7 @@ else
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->idp;
}
- print ''.$objp->nom.' ';
+ print ''.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom.' ';
if ( $now > $objp->dfv && $objp->dfv > 0 )
{
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index a800bb50bdf..4fb9139faf7 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004-2005 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
@@ -21,7 +21,7 @@
*
*/
-/*! \file htdocs/commande/fiche.php
+/** \file htdocs/commande/fiche.php
\ingroup commande
\brief Fiche commande
\version $Revision$
@@ -233,7 +233,7 @@ if ($_GET["action"] == 'create')
print ' ' ."\n";
print ' ';
- print '';
+ print '';
print ''.$langs->trans("Customer").' : '.$obj->nom.' ';
print ''.$langs->trans("Comments").' : ';
@@ -270,9 +270,9 @@ if ($_GET["action"] == 'create')
print ' '."\n";
print ' ';
- print 'Proposition '.$obj->ref.' ';
- print 'Montant HT '.price($amount).' ';
- print 'TVA '.price($obj->tva)." ";
+ print ''.$langs->trans("Ref").' '.$obj->ref.' ';
+ print ''.$langs->trans("TotalTTC").' '.price($amount).' ';
+ print ''.$langs->trans("VAT").' '.price($obj->tva)." ";
print ''.$langs->trans("TotalTTC").' '.price($obj->total)." ";
}
else
@@ -304,7 +304,7 @@ if ($_GET["action"] == 'create')
}
else
{
- print $db->error();
+ dolibarr_print_error($db);
}
print '\n";
@@ -332,11 +332,11 @@ if ($_GET["action"] == 'create')
/*
* Produits
*/
- print_titre("Produits");
+ print_titre($langs->trans("Products"));
- print '';
- print ''.$langs->trans("Ref").' Produit ';
- print ''.$langs->trans("Price").' Remise Qté. ';
+ print '';
+ print ''.$langs->trans("Ref").' '.$langs->trans("Product").' ';
+ print ''.$langs->trans("Price").' Remise '.$langs->trans("Qty").' ';
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent";
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propalid";
@@ -352,13 +352,14 @@ if ($_GET["action"] == 'create')
$objp = $db->fetch_object();
$var=!$var;
print "[$objp->ref] \n";
- print ''.$objp->product.' ';
- print "".price($objp->price)." ";
+ print ''.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.' ';
+ print "".price($objp->price)." ";
print ''.$objp->remise_percent.' % ';
print "".$objp->qty." \n";
$i++;
}
}
+
$sql = "SELECT pt.rowid, pt.description as product, pt.price, pt.qty, pt.remise_percent";
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt WHERE pt.fk_propal = $propalid AND pt.fk_product = 0";
$sql .= " ORDER BY pt.rowid ASC";
@@ -371,7 +372,7 @@ if ($_GET["action"] == 'create')
$objp = $db->fetch_object();
$var=!$var;
print " \n";
- print ''.$objp->product.' ';
+ print ''.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.' ';
print ''.price($objp->price).' ';
print ''.$objp->remise_percent.' % ';
print "".$objp->qty." \n";
@@ -389,7 +390,7 @@ if ($_GET["action"] == 'create')
}
else
{
- print $db->error() . " $sql";;
+ dolibarr_print_error($db);
}
}
else
@@ -479,17 +480,20 @@ else
print ''.$langs->trans("Author").' '.$author->fullname.' ';
- print 'Projet : ';
- if ($commande->projet_id > 0)
- {
- $projet = New Project($db);
- $projet->fetch($commande->projet_id);
- print ''.$projet->title.' ';
- }
- else
- {
- print 'Classer la commande ';
- }
+ print ' ';
+ if ($conf->projet->enabled) {
+ print $langs->trans("Project").' : ';
+ if ($commande->projet_id > 0)
+ {
+ $projet = New Project($db);
+ $projet->fetch($commande->projet_id);
+ print ''.$projet->title.' ';
+ }
+ else
+ {
+ print 'Classer la commande ';
+ }
+ }
print " ";
// Ligne de 3 colonnes
@@ -561,14 +565,14 @@ else
if ($objp->fk_product > 0)
{
print '';
- print ''.stripslashes(nl2br($objp->description)).' ';
+ print ''.img_object($langs->trans("ShowProduct"),"product").' '.stripslashes(nl2br($objp->description)).' ';
}
else
{
- print "".stripslashes(nl2br($objp->description))." \n";
+ print "".stripslashes(nl2br($objp->description))." \n";
}
- print ''.$objp->tva_tx.' % ';
- print ''.$objp->qty.' ';
+ print ''.$objp->tva_tx.' % ';
+ print ''.$objp->qty.' ';
if ($objp->remise_percent > 0)
{
print ''.$objp->remise_percent." % \n";
@@ -628,10 +632,11 @@ else
$sql .= " ORDER BY p.nbvente DESC LIMIT 20";
if ( $db->query($sql) )
{
- $opt = " ";
+ $opt = " ";
if ($result)
{
- $num = $db->num_rows(); $i = 0;
+ $num = $db->num_rows();
+ $i = 0;
while ($i < $num)
{
$objp = $db->fetch_object();
@@ -643,16 +648,16 @@ else
}
else
{
- print $db->error();
+ dolibarr_print_error($db);
}
print "