';
print ''.$langs->trans("Root").' >> ';
foreach ($ways as $way)
diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php
index fbaf00e53db..7510c0a5b96 100644
--- a/htdocs/comm/multiprix.php
+++ b/htdocs/comm/multiprix.php
@@ -84,12 +84,12 @@ if ($_socid > 0)
if ($objsoc->client == 1) $tabchoice='customer';
if ($objsoc->client == 2) $tabchoice='prospect';
- dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company');
-
-
print '';
$this->db->free($resqlorderlist);
} else {
@@ -5333,11 +5334,11 @@ class Form
print '
';
print '
';
print '';
+ print '
';
print '
' . $objp->ref . '
';
print '
' . $objp->ref_supplier . '
';
print '
' . price($objp->total_ht) . '
';
print '
' . $objp->name . '
';
- print '';
print '
';
$i ++;
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index fc8ee1c30d0..5af984ba659 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -595,13 +595,20 @@ class FormOther
*/
static function showColor($color, $textifnotdefined='')
{
+ $textcolor='FFF';
+ if ($color)
+ {
+ $hex=$color;
+ $r = hexdec($hex[0].$hex[1]);
+ $g = hexdec($hex[2].$hex[3]);
+ $b = hexdec($hex[4].$hex[5]);
+ $bright = (max($r, $g, $b) + min($r, $g, $b)) / 510.0; // HSL algorithm
+ if ($bright > 0.6) $textcolor='000';
+ }
+
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-
$color = colorArrayToHex(colorStringToArray($color,array()),'');
- $textcolor='000';
- $tmpcolorweight=0;
- foreach(colorStringToArray($color,array()) as $x) $tmpcolorweight+=$x;
- if ($tmpcolorweight < 400) $textcolor='FFF';
+
if ($color) print '';
else print $textifnotdefined;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 3b25ffe3809..2538bf9d0b7 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3398,7 +3398,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
* Return localtax rate for a particular vat, when selling a product with vat $vatrate, from a $thirdparty_buyer to a $thirdparty_seller
* Note: This function applies same rules than get_default_tva
*
- * @param float $vatrate Vat rate
+ * @param float $vatrate Vat rate. Can be '8.5' or '8.5 (8.5NPR)' for example
* @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2)
* @param Societe $thirdparty_buyer Object of buying third party
* @param Societe $thirdparty_seller Object of selling third party
@@ -3589,7 +3589,7 @@ function get_localtax_by_third($local)
* Instead this function must be called when adding a line to get the array of localtax and type, and then
* provide it to the function calcul_price_total.
*
- * @param float $vatrate VAT Rate
+ * @param float $vatrate VAT Rate. Value can be '8.5' or '8.5 (8.5NPR)'.
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
* @param Societe $buyer Company object
* @param Societe $seller Company object
@@ -3740,7 +3740,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
}
else dol_print_error($db);
}
- else $ret=$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
+ else $ret=$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS; // Forced value if autodetect fails
}
dol_syslog("get_product_vat_for_country: ret=".$ret);
diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php
index 4d7803474d8..52653fa7f4d 100644
--- a/htdocs/core/lib/price.lib.php
+++ b/htdocs/core/lib/price.lib.php
@@ -47,7 +47,7 @@
* @param int $info_bits Miscellaneous informations on line
* @param int $type 0/1=Product/service
* @param Societe $seller Thirdparty seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
- * @param array $localtaxes_array Array with localtaxes info (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function).
+ * @param array $localtaxes_array Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function).
* @param integer $progress Situation invoices progress (value from 0 to 100, 100 by default)
* @param double $multicurrency_tx Currency rate (1 by default)
* @return result[ 0=total_ht,
@@ -117,7 +117,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
$localtax2_type = $localtaxes_array[2];
$localtax2_rate = $localtaxes_array[3];
}
- else // deprecated method. values and type for localtaxes must be provided by caller and loade with getLocalTaxesFromRate
+ else // deprecated method. values and type for localtaxes must be provided by caller and loaded with getLocalTaxesFromRate
{
$sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type";
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as cv";
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index 40a4fb104cb..1d3114f8819 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -101,7 +101,7 @@ function product_prepare_head($object)
$head[$h][2] = 'stats';
$h++;
- $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$object->id;
+ $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?showmessage=1&id=".$object->id;
$head[$h][1] = $langs->trans('Referers');
$head[$h][2] = 'referers';
$h++;
@@ -203,22 +203,25 @@ function product_admin_prepare_head()
*
* @param Product $product Product object
* @param int $socid Thirdparty id
- * @return integer
+ * @return integer NB of lines shown into array
*/
function show_stats_for_company($product,$socid)
{
global $conf,$langs,$user,$db;
+ $nblines = 0;
+
print '
- -->
-
+
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 273d947c6e7..06b2f8372a6 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2007 Franky Van Liedekerke
* Copyright (C) 2010-2014 Juanjo Menent
- * Copyright (C) 2010-2014 Philippe Grand
+ * Copyright (C) 2010-2016 Philippe Grand
* Copyright (C) 2012-2015 Marcos García
* Copyright (C) 2013 Florian Henry
* Copyright (C) 2013 Cédric Salvador
@@ -53,7 +53,7 @@ class CommandeFournisseur extends CommonOrder
var $id;
/**
- * Supplier invoice reference
+ * Supplier order reference
* @var string
*/
var $ref;
@@ -103,7 +103,7 @@ class CommandeFournisseur extends CommonOrder
var $user_approve_id;
var $user_approve_id2; // Used when SUPPLIER_ORDER_DOUBLE_APPROVAL is set
- //Incorterms
+ //Incoterms
var $fk_incoterms;
var $location_incoterms;
var $libelle_incoterms; //Used into tooltip
@@ -114,7 +114,7 @@ class CommandeFournisseur extends CommonOrder
* @var CommandeFournisseurLigne[]
*/
public $lines = array();
- //Ajout pour supplier_proposal
+ //Add for supplier_proposal
var $origin;
var $origin_id;
var $linked_objects=array();
@@ -260,7 +260,7 @@ class CommandeFournisseur extends CommonOrder
$this->db->free($resql);
- // Retreive all extrafield
+ // Retrieve all extrafields
// fetch optionals attributes and labels
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
$extrafields=new ExtraFields($this->db);
@@ -416,7 +416,7 @@ class CommandeFournisseur extends CommonOrder
{
$this->db->begin();
- // Definition du nom de modele de numerotation de commande
+ // Definition of supplier order numbering model name
$soc = new Societe($this->db);
$soc->fetch($this->fourn_id);
@@ -461,7 +461,7 @@ class CommandeFournisseur extends CommonOrder
// Rename directory if dir was a temporary ref
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
- // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref)
+ // We rename directory ($this->ref = ancienne ref, $num = nouvelle ref)
// in order not to lose the attached files
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);
@@ -644,8 +644,8 @@ class CommandeFournisseur extends CommonOrder
/**
- * Renvoie la reference de commande suivante non utilisee en fonction du modele
- * de numerotation actif defini dans COMMANDE_SUPPLIER_ADDON_NUMBER
+ * Returns the following order reference not used depending on the numbering model activated
+ * defined within COMMANDE_SUPPLIER_ADDON_NUMBER
*
* @param Societe $soc objet societe
* @return string reference libre pour la facture
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 80e584efc4d..124693ed6da 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -527,7 +527,7 @@ if (empty($action))
$paramlist.=($search_payment_num?"&search_payment_num=".urlencode($search_payment_num):"");
if ($optioncss != '') $paramlist.='&optioncss='.urlencode($optioncss);
- print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num);
+ print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num, 0, 'title_accountancy.png');
print '