From c96d972dac23fc827fb210f2b0f51f2b2c3eb20b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 22 Oct 2004 23:34:25 +0000 Subject: [PATCH] Trad: Encore de la traduction --- htdocs/langs/en_US/main.lang | 4 +++- htdocs/langs/en_US/products.lang | 2 ++ htdocs/langs/en_US/suppliers.lang | 4 +++- htdocs/langs/fr_BE/main.lang | 1 + htdocs/langs/fr_FR/main.lang | 2 ++ htdocs/langs/fr_FR/products.lang | 2 ++ htdocs/langs/fr_FR/suppliers.lang | 4 +++- htdocs/product/fiche.php | 37 +++++++++++++++---------------- htdocs/product/index.php | 18 +++++++++++---- htdocs/product/liste.php | 25 ++++++++++++++------- htdocs/product/stats/fiche.php | 29 ++++++++++++------------ htdocs/product/stats/index.php | 10 ++++----- 12 files changed, 85 insertions(+), 53 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 7f7a67b4361..65adde5388b 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -118,6 +118,7 @@ Filter=Filter RemoveFilter=Remove filter ChartGenerated=Chart generated ChartNotGenerated=Chart not generated +GeneratedOn=Build on %s Duration=Duration Summary=Summary NotYetAvailable=Not yet available @@ -129,4 +130,5 @@ From=From to=to Quantity=Quantity Qty=Qty -ChangedBy=Changed by \ No newline at end of file +ChangedBy=Changed by +ReCalculate=Rebuild \ No newline at end of file diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index c7eac06d14a..8f486cf0a63 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -10,6 +10,7 @@ ServiceCode=Service code ProductsAndServices=Products and Services ProductsAndServicesOnSell=Products and Services on sell ProductsAndServicesNotOnSell=Products and Services out of sell +ProductsAndServicesStatistics=Products and Services statistics ProductsOnSell=Products on sell ProductsNotOnSell=Products out of sell ServicesOnSell=Services on sell @@ -25,6 +26,7 @@ NotOnSell=Out of Sell UpdatePrice=Update price AppliedPricesFrom=Applied prices from SellingPrice=Selling price +CurrentPrice=Current price NewPrice=New price ContractStatus=Contract status ContractStatusClosed=Closed diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index eb048751031..2d853bd7287 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -1,2 +1,4 @@ # Dolibarr language file - en_US - suppliers -Suppliers=Suppliers \ No newline at end of file +Suppliers=Suppliers +AddSupplier=Add a supplier +SupplierRemoved=Supplier removed \ No newline at end of file diff --git a/htdocs/langs/fr_BE/main.lang b/htdocs/langs/fr_BE/main.lang index 92dc5faba9b..3b0752d5e27 100644 --- a/htdocs/langs/fr_BE/main.lang +++ b/htdocs/langs/fr_BE/main.lang @@ -107,6 +107,7 @@ Filter=Filtre RemoveFilter=Supprimer le filtre ChartGenerated=Graphiques générés ChartNotGenerated=Graphique non généré +GeneratedOnGénéré le %s Duration=Durée Summary=Résumé NotYetAvailable=Pas encore disponible diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index e8a40e0ce22..3e3697a18ec 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -119,6 +119,7 @@ Filter=Filtre RemoveFilter=Supprimer filtre ChartGenerated=Graphiques générés ChartNotGenerated=Graphique non généré +GeneratedOn=Généré le %s Duration=Durée Summary=Résumé NotYetAvailable=Pas encore disponible @@ -131,3 +132,4 @@ to=au Quantity=Quantité Qty=Qté ChangedBy=Modifié par +ReCalculate=Re-calculer diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 0c5f3ff18d6..5648707ed7a 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -10,6 +10,7 @@ ServiceCode=Code service ProductsAndServices=Produits et Services ProductsAndServicesOnSell=Produits et Services en vente ProductsAndServicesNotOnSell=Produits et Services hors vente +ProductsAndServicesStatistics=Statistiques produits et services ProductsOnSell=Produits en vente ProductsNotOnSell=Produits hors vente ServicesOnSell=Services en vente @@ -25,6 +26,7 @@ NotOnSell=Hors vente UpdatePrice=Changer le prix AppliedPricesFrom=Prix de vente pratiqués à partir du SellingPrice=Prix de vente +CurrentPrice=Prix actuel NewPrice=Nouveau prix ContractStatus=Statut du contrat ContractStatusClosed=Cloturé diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 564730b7f85..b23872839ad 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -1,2 +1,4 @@ # Dolibarr language file - fr_FR - suppliers -Suppliers=Fournisseurs \ No newline at end of file +Suppliers=Fournisseurs +AddSupplier=Ajouter un fournisseur +SupplierRemoved=Founisseur supprimé \ No newline at end of file diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 29ca38eb0b5..c3f289fb0f7 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -183,7 +183,7 @@ if ($_GET["action"] == 'remove_fourn') if ($product->remove_fournisseur($user, $_GET["id_fourn"]) > 0) { $_GET["action"] = ''; - $mesg = 'Founisseur supprimé'; + $mesg = $langs->trans("SupplierRemoved"); } else { @@ -249,7 +249,7 @@ if ($_GET["action"] == 'create') if ($_GET["type"]==1) { print $langs->trans("NewService"); } print '
'."\n"; - print ''; + print '
'; print ''; print ''; print ''; - print ''; + print ''; $langs->load("bills"); print ''; print ''; - print ''; + print ''; if ($product->type == 0) { $nblignefour=4; @@ -398,7 +398,7 @@ else print ''; print ''; + print img_disable($langs->trans("Remove")).''; $i++; } print '
'.$langs->trans("Ref").''; if ($_error == 1) @@ -258,7 +258,7 @@ if ($_GET["action"] == 'create') } print '
'.$langs->trans("Label").'
Prix de vente
'.$langs->trans("SellingPrice").'
'.$langs->trans("VATRate").''; @@ -358,7 +358,7 @@ else print ''; if ($product->envente) { - print "En vente"; + print $langs->trans("OnSell"); } else { @@ -366,7 +366,7 @@ else } print '
'.$langs->trans("Label").''.$product->libelle.'
Prix de vente'.price($product->price).'
'.$langs->trans("SellingPrice").''.price($product->price).''.$objp->nom.''; print ''; - print '
'; @@ -433,14 +433,14 @@ else if ($product->type == 1) { - print ''.$langs->trans("Duration").''.$product->duration_value.' '; + print ''.$langs->trans("Duration").''.$product->duration_value.' '; if ($product->duration_value > 1) { - $dur=array("d"=>"Days","w","Weeks","m","Months","y"=>"Years"); + $dur=array("d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } else { - $dur=array("d"=>"Day","w","Week","m","Month","y"=>"Year"); + $dur=array("d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } print $langs->trans($dur[$product->duration_unit])." "; @@ -476,7 +476,9 @@ else */ if ($_GET["action"] == 'ajout_fourn' && $user->rights->produit->creer) { - print_titre ("Ajouter un fournisseur"); + $langs->load("suppliers"); + + print_titre($langs->trans("AddSupplier")); print '
'; print ''; print ''; @@ -510,13 +512,10 @@ else /* * Fiche en mode edition */ - if (($_GET["action"] == 'edit' || $_GET["action"] == 're-edit') && $user->rights->produit->creer) { - print_fiche_titre('Edition de la fiche '.$types[$product->type].' : '.$product->ref, $mesg); - print "\n"; print ''; print ''; @@ -619,7 +618,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) $htmls = new Form($db); $propal = New Propal($db); - print ''; + print '
'; if($user->rights->propale->creer) { print "".'
'; @@ -639,13 +638,13 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { $num = $db->num_rows(); $i = 0; - print ''; + print '
'; $var=True; while ($i < $num) { $objp = $db->fetch_object($i); $var=!$var; - print ""; + print ""; print "\n"; print "\n"; print "\n"; @@ -676,7 +675,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { print ''; print ''; - print '
propalid\">$objp->refidp\">$objp->nom". strftime("%d %b",$objp->dp)."
'; + print '
'; print "".'
Autres Propositions'; $htmls->select_array("propalid", $otherprop); print ''; @@ -711,7 +710,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { $num = $db->num_rows(); $i = 0; - print ''; + print '
'; $var=True; while ($i < $num) { @@ -738,7 +737,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) } else { - print $db->error() . "
" . $sql; + dolibarr_print_error($db); } print '
'; print '
'; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index fff82483cb1..bf1214532bc 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -20,9 +20,18 @@ * $Source$ * */ + +/*! + \file htdocs/product/index.php + \ingroup product + \brief Page accueil des produits et services + \version $Revision$ +*/ + require("./pre.inc.php"); $user->getrights('produit'); + $langs->load("products"); @@ -30,15 +39,16 @@ if (!$user->rights->produit->lire) accessforbidden(); -if ($action == 'update') + +if ($_POST["action"] == 'update') { - $sql = "UPDATE ".MAIN_DB_PREFIX."product SET description='$desc' where rowid = $rowid"; + $sql = "UPDATE ".MAIN_DB_PREFIX."product SET description='".$_POST["desc"]."' where rowid = ".$_POST["rowid"]; $db->query($sql); } /* - * + * Affichage page accueil * */ @@ -53,7 +63,7 @@ print ''; print_titre($langs->trans("ProductsAndServices")); -print ''; +print '
'; print '
'; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 6447258f70b..488a24d921d 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -20,6 +20,14 @@ * $Source$ * */ + +/*! + \file htdocs/product/liste.php + \ingroup product + \brief Page liste des produits ou services + \version $Revision$ +*/ + require("./pre.inc.php"); $user->getrights('produit'); @@ -33,6 +41,7 @@ if (!$user->rights->produit->lire) * * */ + $type=$_GET["type"]; $page = $_GET["page"]; @@ -124,8 +133,8 @@ if ($result) if (isset($envente) && $envente == 0) { if (isset($_POST["type"]) || isset($_GET["type"])) { - if ($type) { $texte = $langs->trans("ProductsNotOnSell"); } - else { $texte = $langs->trans("ServicesNotOnSell"); } + if ($type) { $texte = $langs->trans("ServicesNotOnSell"); } + else { $texte = $langs->trans("ProductsNotOnSell"); } } else { $texte = $langs->trans("ProductsAndServicesNotOnSell"); } @@ -134,8 +143,8 @@ if ($result) { $envente=1; if (isset($_POST["type"]) || isset($_GET["type"])) { - if ($type) { $texte = $langs->trans("ProductsOnSell"); } - else { $texte = $langs->trans("ServicesOnSell"); } + if ($type) { $texte = $langs->trans("ServicesOnSell"); } + else { $texte = $langs->trans("ProductsOnSell"); } } else { $texte = $langs->trans("ProductsAndServicesOnSell"); } @@ -152,21 +161,21 @@ if ($result) print_barre_liste($texte, $page, "liste.php", "&sref=$sref&snom=$snom&fourn_id=$fourn_id&type=$type", $sortfield, $sortorder,'',$num); } - print ''; + print '
'; print "\n"; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 871c8e809ec..82e1bc82e3d 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -32,6 +32,7 @@ require("./pre.inc.php"); require("../../propal.class.php"); $langs->load("products"); +$langs->load("bills"); $types[0] = $langs->trans("Product"); $types[1] = $langs->trans("Service"); @@ -107,8 +108,8 @@ if ($_GET["id"]) print '
'; print '
'; print ''; - print $langs->trans("Ref").':    '; - print $langs->trans("Label").':  '; + print $langs->trans("Ref").':    '; + print $langs->trans("Label").':  '; print '
'; @@ -138,19 +139,19 @@ if ($_GET["id"]) dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); - print '
"; print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref","&envente=$envente&type=$type&fourn_id=$fourn_id"); print ""; print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label","&envente=$envente&type=$type&fourn_id=$fourn_id"); print ""; - print_liste_field_titre("Prix de vente","liste.php", "p.price","&envente=$envente&type=$type&fourn_id=$fourn_id"); + print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price","&envente=$envente&type=$type&fourn_id=$fourn_id"); print "
  
   
'; + print '
'; print ''; print ''; print ""; print ''; - print ''; + print ''; print "
'.$langs->trans("Ref").''.$product->ref.''.$langs->trans("Statistics").'
".$langs->trans("Label")."$product->libelle'; print 'Propositions commerciales : '.$product->count_propale($socid); print "
Proposé à ".$product->count_propale_client($socid)." clients"; - print '
Factures : '.$product->count_facture($socid); + print '
'.$langs->trans("Bills").' : '.$product->count_facture($socid); print '
Prix actuel'.price($product->price).'
'.$langs->trans("CurrentPrice").''.price($product->price).'
"; - print '
'; + print '
'; print ''; print ''; print ''; if (file_exists($filenbvente) && filemtime($filenbvente)) { - print ''; + print ''; } else { print ''; } - print ''; + print ''; if (file_exists($filenbpiece) && filemtime($filenbpiece)) { - print ''; + print ''; } else { print ''; } - print ''; + print ''; print ''; print ''; @@ -193,22 +194,22 @@ if ($_GET["id"]) print ''; if (file_exists($filenbpropal) && filemtime($filenbpropal)) { - print ''; + print ''; } else { print ''; } - print ''; + print ''; if (file_exists($filenbpiece) && filemtime($filenbpiece33)) { - print ''; + print ''; } else { print ''; } - print ''; + print ''; print '
Nombre de ventes
sur les 12 derniers mois
Nombre de pièces vendues
'; @@ -163,22 +164,22 @@ if ($_GET["id"]) print '
Généré le '.dolibarr_print_date(filemtime($filenbvente),"%d %b %Y %H:%M:%S").''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbvente),"%d %b %Y %H:%M:%S")).''.$langs->trans("ChartNotGenerated").'[Re-calculer]['.$langs->trans("ReCalculate").']Généré le '.dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S").''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).''.$langs->trans("ChartNotGenerated").'[Re-calculer]
['.$langs->trans("ReCalculate").']
Statistiques effectuées sur les factures payées uniquement
Nombre de propositions commerciales
sur les 12 derniers mois
Généré le '.dolibarr_print_date(filemtime($filenbpropal),"%d %b %Y %H:%M:%S").''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpropal),"%d %b %Y %H:%M:%S")).''.$langs->trans("ChartNotGenerated").'[Re-calculer]['.$langs->trans("ReCalculate").']Généré le '.dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S").''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).''.$langs->trans("ChartNotGenerated").'[Re-calculer]
['.$langs->trans("ReCalculate").']

'; diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php index 17955c38fd6..cf496b153a6 100644 --- a/htdocs/product/stats/index.php +++ b/htdocs/product/stats/index.php @@ -52,13 +52,13 @@ if ($db->query($sql)) } $db->free(); -print_fiche_titre('Statistiques produits et services', $mesg); +print_fiche_titre($langs->trans("ProductsAndServicesStatistics"), $mesg); print '
'; -print ''; +print '
'; -print ""; -print ""; +print ''; +print ''; print "\n"; $var=True; @@ -127,7 +127,7 @@ if ($db->query($sql)) } } else { - print $db->error()." $sql"; + dolibarr_print_error($db); } print "
RésuméValeur
'.$langs->trans("Summary").''.$langs->trans("Value").'
\n"; $db->free();