Merge pull request #2367 from marcosgdf/bug-1652
Fix: [ bug #1652 ] Margin tab should not be shown for thirds not clients
This commit is contained in:
commit
9ac38dee45
@ -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) 2015 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
|
||||||
@ -80,7 +81,7 @@ class modMargin extends DolibarrModules
|
|||||||
// New pages on tabs
|
// New pages on tabs
|
||||||
$this->tabs = array(
|
$this->tabs = array(
|
||||||
'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__',
|
'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__',
|
||||||
'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous:/margin/tabs/thirdpartyMargins.php?socid=__ID__'
|
'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous && ($societe->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -94,15 +94,6 @@ if ($socid > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($societe->fournisseur)
|
|
||||||
{
|
|
||||||
print '<tr><td>';
|
|
||||||
print $langs->trans('SupplierCode').'</td><td colspan="3">';
|
|
||||||
print $societe->code_fournisseur;
|
|
||||||
if ($societe->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Total Margin
|
// Total Margin
|
||||||
print '<tr><td>'.$langs->trans("TotalMargin").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("TotalMargin").'</td><td colspan="3">';
|
||||||
print '<span id="totalMargin"></span>'; // set by jquery (see below)
|
print '<span id="totalMargin"></span>'; // set by jquery (see below)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user