Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2013-08-21 22:21:33 +02:00
61 changed files with 754 additions and 494 deletions

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
@@ -2229,7 +2229,14 @@ abstract class CommonObject
}else {
$colspan='3';
}
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]);
switch($mode) {
case "view":
$value=$this->array_options["options_".$key];
break;
case "edit":
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]);
break;
}
if ($extrafields->attribute_type[$key] == 'separate')
{
$out .= $extrafields->showSeparator($key);
@@ -2602,6 +2609,7 @@ abstract class CommonObject
{
global $conf,$langs,$object,$hookmanager;
global $form,$bcnd,$var;
global $user;
//Line extrafield
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafieldsline = new ExtraFields($this->db);
@@ -2626,6 +2634,7 @@ abstract class CommonObject
{
global $conf,$langs,$object,$hookmanager;
global $form,$bcnd,$var;
global $user;
//Line extrafield
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@@ -2722,9 +2731,9 @@ abstract class CommonObject
else
print '<td align="right" width="80">'.$langs->trans('CostPrice').'</td>';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous)
print '<td align="right" width="50">'.$langs->trans('MarginRate').'</td>';
if (! empty($conf->global->DISPLAY_MARK_RATES))
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous)
print '<td align="right" width="50">'.$langs->trans('MarkRate').'</td>';
}
@@ -3160,6 +3169,8 @@ abstract class CommonObject
global $langs, $conf, $user;
if (! empty($user->societe_id)) return;
if (! $user->rights->margins->liretous) return;
$marginInfo = $this->getMarginInfos($force_price);
@@ -3213,3 +3224,4 @@ abstract class CommonObject
}
}
?>