From 425d9bff48a8c45b3d108595c8b83d679fe38a5c Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 18 Jun 2015 19:33:29 +0200
Subject: [PATCH] Tooltip to make understanding better.

---
 htdocs/langs/en_US/products.lang |  3 ++-
 htdocs/product/list.php          | 15 +++++++++++----
 htdocs/societe/soc.php           | 12 ++++++------
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 1d7ece0c98d..140cbab05d3 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -294,4 +294,5 @@ LastUpdated=Last updated
 CorrectlyUpdated=Correctly updated
 PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is 
 PropalMergePdfProductChooseFile=Select PDF files
-IncludingProductWithTag=Including product with tag
\ No newline at end of file
+IncludingProductWithTag=Including product with tag
+DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 3c68f261732..0b7e1b0c733 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -310,13 +310,21 @@ else
     		if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,'','',$sortfield,$sortorder);
     		print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
     		if (! empty($conf->service->enabled) && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
-    		if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
+    		if (empty($conf->global->PRODUIT_MULTIPRICES))
+    		{
+    			$titlefield=$langs->trans("SellingPrice");
+    		   	if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
+   				{
+					$titlefields=$form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
+    			}
+    			print_liste_field_titre($titlefields, $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
+    		}
     		if ($user->rights->fournisseur->lire) print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
     		if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>';
     		if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>';
     		print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder);
             print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="center"',$sortfield,$sortorder);
-            print '<td width="1%">&nbsp;</td>';
+            print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '');
     		print "</tr>\n";
 
     		// Lignes des champs de filtre
@@ -350,8 +358,7 @@ else
     		// Sell price
             if (empty($conf->global->PRODUIT_MULTIPRICES))
             {
-        		print '<td class="liste_titre">';
-        		print '&nbsp;';
+        		print '<td class="liste_titre" align="right">';
         		print '</td>';
             }
 
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 863863811e0..654b5aa7b4b 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -1294,9 +1294,6 @@ else
 
 	        $head = societe_prepare_head($object);
 
-	        dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
-
-
             // Load object modCodeTiers
             $module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard');
             if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php')
@@ -1465,6 +1462,10 @@ else
             print '<input type="hidden" name="socid" value="'.$object->id.'">';
             if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print '<input type="hidden" name="code_auto" value="1">';
 
+
+            dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
+
+
             print '<table class="border" width="100%">';
 
             // Name
@@ -1818,7 +1819,8 @@ else
             print '</tr>';
 
             print '</table>';
-            print '<br>';
+
+	        dol_fiche_end();
 
             print '<div align="center">';
             print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
@@ -1827,8 +1829,6 @@ else
             print '</div>';
 
             print '</form>';
-
-	        dol_fiche_end();
         }
     }
     else
-- 
GitLab