Merge remote-tracking branch 'origin/3.5' into 3.6
This commit is contained in:
commit
08214999a7
@ -176,6 +176,7 @@ Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains number
|
|||||||
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
||||||
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
||||||
Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date
|
Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date
|
||||||
|
Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled
|
||||||
|
|
||||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -21,5 +22,15 @@
|
|||||||
* \brief Page d'index du module margin
|
* \brief Page d'index du module margin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require 'productMargins.php';
|
require '../main.inc.php';
|
||||||
|
|
||||||
|
if ($user->rights->produit->lire) {
|
||||||
|
$page = 'productMargins';
|
||||||
|
} elseif ($user->rights->societe->lire) {
|
||||||
|
$page = 'customerMargins';
|
||||||
|
} else {
|
||||||
|
$page = 'agentMargins';
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location: '.dol_buildpath('/margin/'.$page.'.php', 1));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -56,21 +57,25 @@ function marges_admin_prepare_head()
|
|||||||
*/
|
*/
|
||||||
function marges_prepare_head()
|
function marges_prepare_head()
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf, $user;
|
||||||
$langs->load("marges@marges");
|
$langs->load("marges@marges");
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/margin/productMargins.php";
|
if ($user->rights->produit->lire) {
|
||||||
$head[$h][1] = $langs->trans("ProductMargins");
|
$head[$h][0] = DOL_URL_ROOT."/margin/productMargins.php";
|
||||||
$head[$h][2] = 'productMargins';
|
$head[$h][1] = $langs->trans("ProductMargins");
|
||||||
$h++;
|
$head[$h][2] = 'productMargins';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/margin/customerMargins.php";
|
if ($user->rights->societe->lire) {
|
||||||
$head[$h][1] = $langs->trans("CustomerMargins");
|
$head[$h][0] = DOL_URL_ROOT."/margin/customerMargins.php";
|
||||||
$head[$h][2] = 'customerMargins';
|
$head[$h][1] = $langs->trans("CustomerMargins");
|
||||||
$h++;
|
$head[$h][2] = 'customerMargins';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/margin/agentMargins.php";
|
$head[$h][0] = DOL_URL_ROOT."/margin/agentMargins.php";
|
||||||
$head[$h][1] = $langs->trans("SalesRepresentativeMargins");
|
$head[$h][1] = $langs->trans("SalesRepresentativeMargins");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user