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

This commit is contained in:
Maxime Kohlhaas 2012-10-01 11:26:42 +02:00
commit f62772a1c5
29 changed files with 207 additions and 200 deletions

View File

@ -1,7 +1,8 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* *
* 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
@ -40,6 +41,7 @@ $langs->load("mails");
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$rowid=GETPOST('rowid','int'); $rowid=GETPOST('rowid','int');
$typeid=GETPOST('typeid','int'); $typeid=GETPOST('typeid','int');
@ -87,7 +89,7 @@ if ($rowid)
*/ */
// Create third party from a member // Create third party from a member
if ($action == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes' && $user->rights->societe->creer) if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer)
{ {
if ($result > 0) if ($result > 0)
{ {
@ -589,10 +591,10 @@ if ($rowid)
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans("LinkedToDolibarrUser"); print $langs->trans("LinkedToDolibarrUser");
print '</td>'; print '</td>';
if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a></td>'; if ($action != 'editlogin' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td class="valeur">'; print '</td><td class="valeur">';
if ($_GET['action'] == 'editlogin') if ($action == 'editlogin')
{ {
/*$include=array(); /*$include=array();
if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only
@ -748,49 +750,40 @@ if ($rowid)
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
print "\n".'<script type="text/javascript" language="javascript">'; print "\n".'<script type="text/javascript" language="javascript">';
print 'jQuery(document).ready(function () { print '$(document).ready(function () {
jQuery(".bankswitchclass").'.($bankdirect||$bankviainvoice||in_array(GETPOST('paymentsave'),array('bankdirect','bankviainvoice'))?'show()':'hide()').'; $(".bankswitchclass, .bankswitchclass2").'.($bankdirect||$bankviainvoice||in_array(GETPOST('paymentsave'),array('bankdirect','bankviainvoice'))?'show()':'hide()').';
jQuery(".bankswitchclass2").'.($bankdirect||$bankviainvoice||in_array(GETPOST('paymentsave'),array('bankdirect','bankviainvoice'))?'show()':'hide()').'; $("#none, #invoiceonly").click(function() {
jQuery("#none").click(function() { $(".bankswitchclass").hide();
jQuery(".bankswitchclass").hide(); $(".bankswitchclass2").hide();
jQuery(".bankswitchclass2").hide();
}); });
jQuery("#bankdirect").click(function() { $("#bankdirect, #bankviainvoice").click(function() {
jQuery(".bankswitchclass").show(); $(".bankswitchclass").show();
jQuery(".bankswitchclass2").show(); $(".bankswitchclass2").show();
}); });
jQuery("#bankviainvoice").click(function() { $("#selectoperation").change(function() {
jQuery(".bankswitchclass").show(); var code = $(this).val();
jQuery(".bankswitchclass2").show(); if (code == "CHQ")
});
jQuery("#invoiceonly").click(function() {
jQuery(".bankswitchclass").hide();
jQuery(".bankswitchclass2").hide();
});
jQuery("#selectoperation").change(function() {
code=jQuery("#selectoperation option:selected").val();
if (code == \'CHQ\')
{ {
jQuery(\'.fieldrequireddyn\').addClass(\'fieldrequired\'); $(".fieldrequireddyn").addClass("fieldrequired");
if (jQuery(\'#fieldchqemetteur\').val() == \'\') if ($("#fieldchqemetteur").val() == "")
{ {
jQuery(\'#fieldchqemetteur\').val(jQuery(\'#memberlabel\').val()); $("#fieldchqemetteur").val($("#memberlabel").val());
} }
} }
else else
{ {
jQuery(\'.fieldrequireddyn\').removeClass(\'fieldrequired\'); $(".fieldrequireddyn").removeClass("fieldrequired");
} }
}); });
'; ';
if (GETPOST('paymentsave')) print 'jQuery("#'.GETPOST('paymentsave').'").attr(\'checked\',true);'; if (GETPOST('paymentsave')) print '$("#'.GETPOST('paymentsave').'").attr("checked",true);';
print '});'; print '});';
print '</script>'."\n"; print '</script>'."\n";
} }
// Confirm create third party // Confirm create third party
if ($_GET["action"] == 'create_thirdparty') if ($action == 'create_thirdparty')
{ {
$name = $object->getFullName($langs); $name = $object->getFullName($langs);
if (! empty($name)) if (! empty($name))
@ -803,14 +796,14 @@ if ($rowid)
} }
// Create a form array // Create a form array
$formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
print '<form name="cotisation" method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<form name="cotisation" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="cotisation">'; print '<input type="hidden" name="action" value="cotisation">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">'; print '<input type="hidden" name="rowid" value="'.$rowid.'">';
@ -888,15 +881,15 @@ if ($rowid)
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('MoreActions'); print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('MoreActions');
print '</td>'; print '</td>';
print '<td>'; print '<td>';
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(!$bankdirect&&!$bankviainvoice?' checked="checked"':'').'> '.$langs->trans("None").'<br>'; print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($bankviainvoice)?' checked="checked"':'').'> '.$langs->trans("None").'<br>';
if (! empty($conf->banque->enabled)) if (! empty($conf->banque->enabled))
{ {
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.($bankdirect?' checked="checked"':''); print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(! empty($bankdirect)?' checked="checked"':'');
print '> '.$langs->trans("MoreActionBankDirect").'<br>'; print '> '.$langs->trans("MoreActionBankDirect").'<br>';
} }
if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
{ {
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.($invoiceonly?' checked="checked"':''); print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(empty($conf->global->ADHERENT_BANK_USE) || $invoiceonly?' checked="checked"':'');
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"'; if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
print '> '.$langs->trans("MoreActionInvoiceOnly"); print '> '.$langs->trans("MoreActionInvoiceOnly");
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
@ -911,7 +904,7 @@ if ($rowid)
} }
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
{ {
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice?' checked="checked"':''); print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice && !empty($conf->global->ADHERENT_BANK_USE)?' checked="checked"':'');
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"'; if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
print '> '.$langs->trans("MoreActionBankViaInvoice"); print '> '.$langs->trans("MoreActionBankViaInvoice");
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';

View File

@ -294,12 +294,12 @@ if ($resql)
$staticmember->id=$obj->rowid; $staticmember->id=$obj->rowid;
$staticmember->lastname=$obj->lastname; $staticmember->lastname=$obj->lastname;
$staticmember->firstname=$obj->firstname; $staticmember->firstname=$obj->firstname;
if (! empty($obj->fk_soc)) { if (! empty($obj->fk_soc)) {
$staticmember->socid = $obj->fk_soc; $staticmember->socid = $obj->fk_soc;
$staticmember->fetch_thirdparty(); $staticmember->fetch_thirdparty();
$staticmember->name=$staticmember->thirdparty->name; $staticmember->name=$staticmember->thirdparty->name;
} else { } else {
$staticmember->name=$obj->company; $staticmember->name=$obj->company;
} }
$staticmember->ref=$staticmember->getFullName($langs); $staticmember->ref=$staticmember->getFullName($langs);
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>'; print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';

View File

@ -268,12 +268,12 @@ if ($resql)
$memberstatic->lastname=$objp->lastname; $memberstatic->lastname=$objp->lastname;
$memberstatic->firstname=$objp->firstname; $memberstatic->firstname=$objp->firstname;
if (! empty($objp->fk_soc)) { if (! empty($objp->fk_soc)) {
$memberstatic->socid = $objp->fk_soc; $memberstatic->socid = $objp->fk_soc;
$memberstatic->fetch_thirdparty(); $memberstatic->fetch_thirdparty();
$companyname=$memberstatic->thirdparty->name; $companyname=$memberstatic->thirdparty->name;
} else { } else {
$companyname=$objp->company; $companyname=$objp->company;
} }
$var=!$var; $var=!$var;

View File

@ -116,18 +116,18 @@ if ($action == 'add')
$leftmenu=''; $mainmenu=''; $leftmenu=''; $mainmenu='';
if (! empty($_POST['menuId']) && ! is_numeric($_POST['menuId'])) if (! empty($_POST['menuId']) && ! is_numeric($_POST['menuId']))
{ {
$tmp=explode('&',$_POST['menuId']); $tmp=explode('&',$_POST['menuId']);
foreach($tmp as $s) foreach($tmp as $s)
{ {
if (preg_match('/fk_mainmenu=/',$s)) if (preg_match('/fk_mainmenu=/',$s))
{ {
$mainmenu=preg_replace('/fk_mainmenu=/','',$s); $mainmenu=preg_replace('/fk_mainmenu=/','',$s);
} }
if (preg_match('/fk_leftmenu=/',$s)) if (preg_match('/fk_leftmenu=/',$s))
{ {
$leftmenu=preg_replace('/fk_leftmenu=/','',$s); $leftmenu=preg_replace('/fk_leftmenu=/','',$s);
} }
} }
} }
$langs->load("errors"); $langs->load("errors");

View File

@ -23,7 +23,7 @@
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->load("admin"); $langs->load("admin");
@ -40,22 +40,22 @@ llxHeader();
$title='InfoPHP'; $title='InfoPHP';
if (isset($title)) if (isset($title))
{ {
print_fiche_titre($langs->trans($title), '', 'setup'); print_fiche_titre($langs->trans($title), '', 'setup');
} }
// Get php_info array // Get php_info array
$phparray=phpinfo_array(); $phparray=phpinfo_array();
foreach($phparray as $key => $value) foreach($phparray as $key => $value)
{ {
//print_titre($key); //print_titre($key);
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
//print '<td width="220px">'.$langs->trans("Parameter").'</td>'; //print '<td width="220px">'.$langs->trans("Parameter").'</td>';
print '<td width="220px">'.$key.'</td>'; print '<td width="220px">'.$key.'</td>';
print '<td colspan="2">'.$langs->trans("Value").'</td>'; print '<td colspan="2">'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
//var_dump($value); //var_dump($value);
@ -65,10 +65,10 @@ foreach($phparray as $key => $value)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td>'.$keyparam.'</td>'; print '<td>'.$keyparam.'</td>';
$valtoshow=$keyvalue; $valtoshow=$keyvalue;
if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80); if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
print '<td colspan="2">'.$valtoshow.'</td>'; print '<td colspan="2">'.$valtoshow.'</td>';
print '</tr>'; print '</tr>';
} }
else else
@ -77,13 +77,13 @@ foreach($phparray as $key => $value)
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td>'.$keyparam.'</td>'; print '<td>'.$keyparam.'</td>';
$i=0; $i=0;
foreach($keyvalue as $keyparam2 => $keyvalue2) foreach($keyvalue as $keyparam2 => $keyvalue2)
{ {
print '<td>'; print '<td>';
$valtoshow=$keyvalue2; $valtoshow=$keyvalue2;
if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow))); if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow)));
//print $keyparam2.' = '; //print $keyparam2.' = ';
print $valtoshow; print $valtoshow;
$i++; $i++;
print '</td>'; print '</td>';
} }
@ -92,7 +92,7 @@ foreach($phparray as $key => $value)
} }
print '</table><br>'; print '</table><br>';
} }
llxFooter(); llxFooter();

View File

@ -40,12 +40,12 @@ $langs->load('orders');
$langs->load('deliveries'); $langs->load('deliveries');
$langs->load('companies'); $langs->load('companies');
if (! $user->rights->facture->creer) if (! $user->rights->facture->creer)
accessforbidden(); accessforbidden();
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility $id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
$ref = GETPOST('ref','alpha'); $ref = GETPOST('ref','alpha');
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha'); $confirm = GETPOST('confirm','alpha');
$sref = GETPOST('sref'); $sref = GETPOST('sref');
$sref_client = GETPOST('sref_client'); $sref_client = GETPOST('sref_client');

View File

@ -1856,8 +1856,8 @@ if ($action == 'create')
{ {
$newinvoice_static->id=$key; $newinvoice_static->id=$key;
$newinvoice_static->ref=$valarray['ref']; $newinvoice_static->ref=$valarray['ref'];
$newinvoice_static->statut=$valarray['status']; $newinvoice_static->statut=$valarray['status'];
$newinvoice_static->type=$valarray['type']; $newinvoice_static->type=$valarray['type'];
$newinvoice_static->paye=$valarray['paye']; $newinvoice_static->paye=$valarray['paye'];
$optionsav.='<option value="'.$key.'"'; $optionsav.='<option value="'.$key.'"';

View File

@ -410,6 +410,7 @@ class FactureRec extends Facture
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
* @param int $rang Position of line * @param int $rang Position of line
* @param int $special_code Special code * @param int $special_code Special code
* @param string $label Label of the line
* @return int <0 if KO, Id of line if OK * @return int <0 if KO, Id of line if OK
*/ */
function addline($facid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='') function addline($facid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='')

View File

@ -1880,6 +1880,7 @@ class Facture extends CommonInvoice
* @param int $fk_parent_line Id of parent line * @param int $fk_parent_line Id of parent line
* @param int $fk_fournprice To calculate margin * @param int $fk_fournprice To calculate margin
* @param int $pa_ht Buying price of line * @param int $pa_ht Buying price of line
* @param string $label Label of the line
* @return int <0 if KO, Id of line if OK * @return int <0 if KO, Id of line if OK
*/ */
function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='') function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='')
@ -2035,6 +2036,7 @@ class Facture extends CommonInvoice
* @param int $skip_update_total ??? * @param int $skip_update_total ???
* @param int $fk_fournprice To calculate margin * @param int $fk_fournprice To calculate margin
* @param int $pa_ht Buying price of line * @param int $pa_ht Buying price of line
* @param string $label Label of the line
* @return int < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
*/ */
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='') function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='')

View File

@ -140,7 +140,7 @@ if ($socid > 0)
print '<td aling="left">'.$fac->getLibStatut(2,$totalpaye).'</td>'; print '<td aling="left">'.$fac->getLibStatut(2,$totalpaye).'</td>';
print '<td align="right">'.price($fac->total_ttc)."</td>\n"; print '<td align="right">'.price($fac->total_ttc)."</td>\n";
if (($fac->statut == 3 ) || ($fac->statut == 2 && ! $fact->close_code) ) $solde = $solde = $solde + $totalpaye; if (($fac->statut == 3 ) || ($fac->statut == 2 && ! $fact->close_code) ) $solde = $solde = $solde + $totalpaye;
else $solde = $solde + $fac->total_ttc; else $solde = $solde + $fac->total_ttc;
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';

View File

@ -98,12 +98,12 @@ class box_members extends ModeleBoxes
$memberstatic->lastname=$objp->lastname; $memberstatic->lastname=$objp->lastname;
$memberstatic->firstname=$objp->firstname; $memberstatic->firstname=$objp->firstname;
if (! empty($objp->fk_soc)) { if (! empty($objp->fk_soc)) {
$memberstatic->socid = $objp->fk_soc; $memberstatic->socid = $objp->fk_soc;
$memberstatic->fetch_thirdparty(); $memberstatic->fetch_thirdparty();
$memberstatic->name=$memberstatic->thirdparty->name; $memberstatic->name=$memberstatic->thirdparty->name;
} else { } else {
$memberstatic->name=$objp->company; $memberstatic->name=$objp->company;
} }
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',

View File

@ -168,13 +168,14 @@ abstract class CommonDocGenerator
/** /**
* Rect pdf * Rect pdf
* *
* @param unknown_type $pdf * @param PDF $pdf Object PDF
* @param unknown_type $x * @param float $x Abscissa of first point
* @param unknown_type $y * @param float $y Ordinate of first point
* @param unknown_type $l * @param float $l ??
* @param unknown_type $h * @param float $h ??
* @param int $hidetop Hide top * @param int $hidetop Hide top
* @param int $hidebottom Hide bottom * @param int $hidebottom Hide bottom
* @return void
*/ */
function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0) function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
{ {

View File

@ -38,8 +38,8 @@ class ExtraFields
var $attribute_label; var $attribute_label;
// Tableau contenant le nom des champs en clef et la taille de ces champs en value // Tableau contenant le nom des champs en clef et la taille de ces champs en value
var $attribute_size; var $attribute_size;
// Tableau contenant le statut unique ou non // Tableau contenant le statut unique ou non
var $attribute_unique; var $attribute_unique;
var $error; var $error;
var $errno; var $errno;
@ -311,10 +311,10 @@ class ExtraFields
$result=$this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc); $result=$this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
if ($result > 0) if ($result > 0)
{ {
if ($label) if ($label)
{ {
$result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique); $result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique);
} }
if ($result > 0) if ($result > 0)
{ {
$sql=''; $sql='';
@ -324,7 +324,7 @@ class ExtraFields
} }
else else
{ {
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname; $sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
} }
dol_syslog(get_class($this).'::update sql='.$sql); dol_syslog(get_class($this).'::update sql='.$sql);
$resql=$this->db->query($sql,1,'dml'); $resql=$this->db->query($sql,1,'dml');

View File

@ -103,8 +103,7 @@ function member_prepare_head($object)
/** /**
* Return array head with list of tabs to view object informations * Return array head with list of tabs to view object informations
* *
* @param Object $object Member * @return array head
* @return array head
*/ */
function member_admin_prepare_head() function member_admin_prepare_head()
{ {

View File

@ -146,28 +146,28 @@ function group_prepare_head($object)
return $head; return $head;
} }
/** /**
* Prepare array with list of tabs * Prepare array with list of tabs
* *
* @param Object $object Object related to tabs * @param Object $object Object related to tabs
* @param array $aEntities Entities array * @param array $aEntities Entities array
* @return array Array of tabs * @return array Array of tabs
*/ */
function entity_prepare_head($object, $aEntities) function entity_prepare_head($object, $aEntities)
{ {
global $mc; global $mc;
$head = array(); $head = array();
foreach($aEntities as $entity) foreach($aEntities as $entity)
{ {
$mc->getInfo($entity); $mc->getInfo($entity);
$head[$entity][0] = $_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;entity='.$entity; $head[$entity][0] = $_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;entity='.$entity;
$head[$entity][1] = $mc->label; $head[$entity][1] = $mc->label;
$head[$entity][2] = $entity; $head[$entity][2] = $entity;
} }
return $head; return $head;
} }
/** /**

View File

@ -481,7 +481,7 @@ elseif ($action == 'addline')
$localtax1tx= get_localtax($tvatx, 1, $object->thirdparty); $localtax1tx= get_localtax($tvatx, 1, $object->thirdparty);
$localtax2tx= get_localtax($tvatx, 2, $object->thirdparty); $localtax2tx= get_localtax($tvatx, 2, $object->thirdparty);
$remise_percent=GETPOST('remise_percent'); $remise_percent=GETPOST('remise_percent');
$type = $product->type; $type = $product->type;
$result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent); $result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent);
@ -499,7 +499,7 @@ elseif ($action == 'addline')
$tauxtva = price2num($_POST['tauxtva']); $tauxtva = price2num($_POST['tauxtva']);
$localtax1tx= get_localtax($tauxtva, 1, $object->thirdparty); $localtax1tx= get_localtax($tauxtva, 1, $object->thirdparty);
$localtax2tx= get_localtax($tauxtva, 2, $object->thirdparty); $localtax2tx= get_localtax($tauxtva, 2, $object->thirdparty);
$remise_percent=GETPOST('remise_percent'); $remise_percent=GETPOST('remise_percent');
if (! $_POST['dp_desc']) if (! $_POST['dp_desc'])
{ {

View File

@ -382,7 +382,7 @@ if($cp_events == 1) {
} }
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?leftmenu=setup" name="event_create">'."\n"; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?leftmenu=setup" name="event_create">'."\n";
print '<input type="hidden" name="action" value="create_event" />'."\n"; print '<input type="hidden" name="action" value="create_event" />'."\n";
print $langs->trans('TitleCreateEventCP'); print $langs->trans('TitleCreateEventCP');

View File

@ -140,8 +140,8 @@ if ($action == 'create')
if ($action == 'update') if ($action == 'update')
{ {
$date_debut = dol_mktime(0, 0, 0, $_POST['date_debut_month'], $_POST['date_debut_day'], $_POST['date_debut_year']); $date_debut = dol_mktime(0, 0, 0, $_POST['date_debut_month'], $_POST['date_debut_day'], $_POST['date_debut_year']);
$date_fin = dol_mktime(0, 0, 0, $_POST['date_fin_month'], $_POST['date_fin_day'], $_POST['date_fin_year']); $date_fin = dol_mktime(0, 0, 0, $_POST['date_fin_month'], $_POST['date_fin_day'], $_POST['date_fin_year']);
// Si pas le droit de modifier une demande // Si pas le droit de modifier une demande
if(!$user->rights->holiday->write) if(!$user->rights->holiday->write)
@ -304,7 +304,7 @@ if ($action == 'confirm_send')
// Si l'option pour avertir le valideur en cas de solde inférieur à la demande // Si l'option pour avertir le valideur en cas de solde inférieur à la demande
if($cp->getConfCP('AlertValidatorSolde')) { if($cp->getConfCP('AlertValidatorSolde')) {
$nbopenedday=num_open_day($cp->date_debut,$cp->date_fin,0,1); $nbopenedday=num_open_day($cp->date_debut,$cp->date_fin,0,1);
if ($nbopenedday > $cp->getCPforUser($cp->fk_user)) if ($nbopenedday > $cp->getCPforUser($cp->fk_user))
{ {
$message.= "\n"; $message.= "\n";

View File

@ -294,7 +294,7 @@ if (! empty($holiday->holiday))
print '<td style="text-align: center;">'.$infos_CP['date_fin'].'</td>'; print '<td style="text-align: center;">'.$infos_CP['date_fin'].'</td>';
print '<td>'; print '<td>';
$nbopenedday=num_open_day($infos_CP['date_debut'],$infos_CP['date_fin'],0,1); $nbopenedday=num_open_day($infos_CP['date_debut'],$infos_CP['date_fin'],0,1);
print $nbopenedday.' '.$langs->trans('Jours'); print $nbopenedday.' '.$langs->trans('Jours');
print '<td align="center"><a href="./fiche.php?id='.$infos_CP['rowid'].'">'.$statut.'</a></td>'; print '<td align="center"><a href="./fiche.php?id='.$infos_CP['rowid'].'">'.$statut.'</a></td>';
print '</tr>'."\n"; print '</tr>'."\n";

View File

@ -122,7 +122,7 @@ if($num == '0') {
print '<td>'.$holiday['date_debut'].'</td>'; print '<td>'.$holiday['date_debut'].'</td>';
print '<td>'.$holiday['date_fin'].'</td>'; print '<td>'.$holiday['date_fin'].'</td>';
print '<td>'; print '<td>';
$nbopenedday=num_open_day($holiday['date_debut'],$holiday['date_fin'],0,1); $nbopenedday=num_open_day($holiday['date_debut'],$holiday['date_fin'],0,1);
print $nbopenedday; print $nbopenedday;
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -82,7 +82,7 @@ UserSetup=Configuració gestió dels usuaris
MenuSetup=Administració dels menús per base de dades MenuSetup=Administració dels menús per base de dades
MenuLimits=Límits i precisió MenuLimits=Límits i precisió
MenuIdParent=Id del menú pare MenuIdParent=Id del menú pare
DetailMenuIdParent=IDr del menú pare (0 per a un menú superior) DetailMenuIdParent=IDr del menú pare (buit per a un menú superior)
DetailPosition=Número d'ordre per a la posició del menú DetailPosition=Número d'ordre per a la posició del menú
PersonalizedMenusNotSupported=Menús personalitzats no generats PersonalizedMenusNotSupported=Menús personalitzats no generats
AllMenus=Tots AllMenus=Tots
@ -1304,6 +1304,8 @@ Sell=Venda
InvoiceDateUsed=Data utilitzada de factura InvoiceDateUsed=Data utilitzada de factura
YourCompanyDoesNotUseVAT=La seva empresa està configurada com no subjecta a l'IVA (Inici - Configuració - Empresa/Institució), per la qual cosa no hi ha opció per a la parametrització de l'IVA. YourCompanyDoesNotUseVAT=La seva empresa està configurada com no subjecta a l'IVA (Inici - Configuració - Empresa/Institució), per la qual cosa no hi ha opció per a la parametrització de l'IVA.
AccountancyCode=Codi comptable AccountancyCode=Codi comptable
AccountancyCodeSell=Codi comptable vendes
AccountancyCodeBuy=Codi comptable compres
##### Agenda ##### ##### Agenda #####
AgendaSetup=Mòdul configuració d'accions i agenda AgendaSetup=Mòdul configuració d'accions i agenda
PasswordTogetVCalExport=Clau d'autorització vCal export link PasswordTogetVCalExport=Clau d'autorització vCal export link

View File

@ -141,6 +141,8 @@ OrderSource6=Revistes
QtyOrdered=Qt. demanda QtyOrdered=Qt. demanda
AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda
SetDemandReason=Indicar origen de la comanda SetDemandReason=Indicar origen de la comanda
CreateInvoiceForThisCustomer=Crear una factura a partir de diverses comandes d'aquest client
CloseProcessedOrdersAutomatically=Classificar automàticament com "Processades" les comandes seleccionades.
# Document models # Document models
PDFEinsteinDescription=Model de comanda complet (logo...) PDFEinsteinDescription=Model de comanda complet (logo...)

View File

@ -83,7 +83,7 @@ UserSetup=Configuración gestión de los usuarios
MenuSetup=Administración de los menús por base de datos MenuSetup=Administración de los menús por base de datos
MenuLimits=Límites y precisión MenuLimits=Límites y precisión
MenuIdParent=Id del menú padre MenuIdParent=Id del menú padre
DetailMenuIdParent=ID del menú padre (0 para un menú superior) DetailMenuIdParent=ID del menú padre (vacío para un menú superior)
DetailPosition=Número de orden para la posición del menú DetailPosition=Número de orden para la posición del menú
PersonalizedMenusNotSupported=Menús personalizados no generados PersonalizedMenusNotSupported=Menús personalizados no generados
AllMenus=Todos AllMenus=Todos
@ -1256,7 +1256,7 @@ MantisTestKo1=La conexión al servidor '%s' es correcta pero la base de datos' %
MantisTestKo2=La conexión al servidor '%s' por el usuario '%s' a fallado. MantisTestKo2=La conexión al servidor '%s' por el usuario '%s' a fallado.
MantisErrorConnectOkButWrongDatabase=La conexión es correcta pero la base de datos no parece ser una base de datos Mantis. MantisErrorConnectOkButWrongDatabase=La conexión es correcta pero la base de datos no parece ser una base de datos Mantis.
##### Stock ##### ##### Stock #####
StockSetup=configuración del módulo Stock StockSetup=Configuración del módulo Stocks
UserWarehouse=Utilizar los stocks personales de usuarios UserWarehouse=Utilizar los stocks personales de usuarios
##### Menu ##### ##### Menu #####
MenuDeleted=Menú eliminado MenuDeleted=Menú eliminado
@ -1308,7 +1308,10 @@ InvoiceDateUsed=Fecha usada de factura
YourCompanyDoesNotUseVAT=Su empresa está configurada como no sujeta al IVA (Inicio - Configuración - Empresa/Institución), por lo que no hay opción para la paremetrización del IVA. YourCompanyDoesNotUseVAT=Su empresa está configurada como no sujeta al IVA (Inicio - Configuración - Empresa/Institución), por lo que no hay opción para la paremetrización del IVA.
AccountancyCode=Código contable AccountancyCode=Código contable
Deductible=Deducible Deductible=Deducible
AccountancyCodeSell=Código contable ventas
AccountancyCodeBuy=Código contable compras
##### Agenda ##### ##### Agenda #####
AgendaSetup=Módulo configuración de acciones y agenda AgendaSetup=Módulo configuración de acciones y agenda
PasswordTogetVCalExport=Clave de autorización vcal export link PasswordTogetVCalExport=Clave de autorización vcal export link
PastDelayVCalExport=No exportar los eventos de más de PastDelayVCalExport=No exportar los eventos de más de

View File

@ -32,7 +32,7 @@ TotalTicket=Total ticket
NoVAT=Sin IVA en esta venta NoVAT=Sin IVA en esta venta
Change=Cambio Change=Cambio
CalTip=Haga clic para ver el calendario CalTip=Haga clic para ver el calendario
CashDeskSetupStock=La configuración decrementa el stock en la creación de facturas, pero no ha indicado almacén.<br>Cambie la configuración del módulo stock, o escoja un almacén CashDeskSetupStock=La configuración decrementa el stock en la creación de facturas, pero no ha indicado almacén.<br>Cambie la configuración del módulo stocks, o escoja un almacén
BankToPay=Cuenta de cobro BankToPay=Cuenta de cobro
ShowCompany=Ver empresa ShowCompany=Ver empresa
ShowStock=Ver almacén ShowStock=Ver almacén

View File

@ -79,6 +79,7 @@ Poste=Puesto
DefaultLang=Idioma por defecto DefaultLang=Idioma por defecto
VATIsUsed=Sujeto a IVA VATIsUsed=Sujeto a IVA
VATIsNotUsed=No sujeto a IVA VATIsNotUsed=No sujeto a IVA
CopyAddressFromSoc=Copiar dirección de la empresa
##### Local Taxes #####= ##### Local Taxes #####=
LocalTax1IsUsedES=Sujeto a RE LocalTax1IsUsedES=Sujeto a RE
LocalTax1IsNotUsedES=No sujeto a RE LocalTax1IsNotUsedES=No sujeto a RE

View File

@ -84,7 +84,8 @@ NewSoldeCP=Nuevo saldo
alreadyCPexist=Ya se ha efectuado una petición de vacaciones para este periodo. alreadyCPexist=Ya se ha efectuado una petición de vacaciones para este periodo.
UserName=Nombre Apellidos UserName=Nombre Apellidos
Employee=Empleado Employee=Empleado
FirstDayOfHoliday=Primer día libre
LastDayOfHoliday=Último día libre
## Configuration du Module ## ## Configuration du Module ##
ConfCP=Configuración del módulo Vacaciones ConfCP=Configuración del módulo Vacaciones

View File

@ -15,8 +15,8 @@ PHPSupportPOSTGETOk=Este PHP soporta bien las variables POST y GET.
PHPSupportPOSTGETKo=Es posible que este PHP no soporte las variables POST y/o GET. Compruebe el parámetro <b>variables_order</b> del php.ini. PHPSupportPOSTGETKo=Es posible que este PHP no soporte las variables POST y/o GET. Compruebe el parámetro <b>variables_order</b> del php.ini.
PHPSupportGD=Este PHP soporta las funciones gráficas GD. PHPSupportGD=Este PHP soporta las funciones gráficas GD.
PHPSupportUTF8=Este PHP soporta las funciones UTFB. PHPSupportUTF8=Este PHP soporta las funciones UTFB.
PHPMemoryOK=Su memoria máxima de sesión PHP esta definida a <b>%s</b>. Esto debería ser suficiente. PHPMemoryOK=Su memoria máxima de sesión PHP esta definida a <b>%s</b>. Esto debería ser suficiente.
PHPMemoryTooLow=Su memoria máxima de sesión PHP está definida en <b>%s</b> bytes. Esto es muy poco. Se recomienda modificar el parámetro <b>memory_limit</b> de su archivo <b>php.ini</b> a al menos <b>%s</b> octetos. PHPMemoryTooLow=Su memoria máxima de sesión PHP está definida en <b>%s</b> bytes. Esto es muy poco. Se recomienda modificar el parámetro <b>memory_limit</b> de su archivo <b>php.ini</b> a por lo menos <b>%s</b> bytes.
Recheck=Haga click aquí para realizar un test más exhaustivo Recheck=Haga click aquí para realizar un test más exhaustivo
ErrorPHPDoesNotSupportSessions=Su instalación PHP no soporta las sesiones. Esta funcionalidad es necesaria para hacer funcionar a Dolibarr. Compruebe su configuración de PHP. ErrorPHPDoesNotSupportSessions=Su instalación PHP no soporta las sesiones. Esta funcionalidad es necesaria para hacer funcionar a Dolibarr. Compruebe su configuración de PHP.
ErrorPHPDoesNotSupportGD=Este PHP no soporta las funciones gráficas GD. Ningún gráfico estará disponible. ErrorPHPDoesNotSupportGD=Este PHP no soporta las funciones gráficas GD. Ningún gráfico estará disponible.

View File

@ -141,6 +141,8 @@ OrderSource6=Revistas
QtyOrdered=Cant. pedida QtyOrdered=Cant. pedida
AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido
SetDemandReason=Indicar origen del pedido SetDemandReason=Indicar origen del pedido
CreateInvoiceForThisCustomer=Crear una factura a partir de varios pedidos de este cliente
CloseProcessedOrdersAutomatically=Clasificar automáticamente como "Procesados" los pedidos seleccionados.
# Document models # Document models
PDFEinsteinDescription=Modelo de pedido completo (logo...) PDFEinsteinDescription=Modelo de pedido completo (logo...)

View File

@ -269,11 +269,11 @@ if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivat
// For multicompany transversal mode // For multicompany transversal mode
if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode))
{ {
$aEntities=array_keys($permsgroupbyentity); $aEntities=array_keys($permsgroupbyentity);
sort($aEntities); sort($aEntities);
$entity = (GETPOST('entity', 'int')?GETPOST('entity', 'int'):$aEntities[0]); $entity = (GETPOST('entity', 'int')?GETPOST('entity', 'int'):$aEntities[0]);
$head = entity_prepare_head($fuser, $aEntities); $head = entity_prepare_head($fuser, $aEntities);
$title = $langs->trans("Entities"); $title = $langs->trans("Entities");
dol_fiche_head($head, $entity, $title, 1, 'multicompany@multicompany'); dol_fiche_head($head, $entity, $title, 1, 'multicompany@multicompany');
} }
@ -281,7 +281,7 @@ print "\n";
print '<table width="100%" class="noborder">'; print '<table width="100%" class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>'; print '<td>'.$langs->trans("Module").'</td>';
if ($caneditperms) print '<td>&nbsp</td>'; if ($caneditperms) print '<td>&nbsp</td>';
print '<td align="center" width="24">&nbsp;</td>'; print '<td align="center" width="24">&nbsp;</td>';
print '<td>'.$langs->trans("Permissions").'</td>'; print '<td>'.$langs->trans("Permissions").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
@ -314,29 +314,29 @@ if ($result)
continue; continue;
} }
if (isset($obj->module) && ($oldmod <> $obj->module)) if (isset($obj->module) && ($oldmod <> $obj->module))
{ {
$oldmod = $obj->module; $oldmod = $obj->module;
$var = !$var; $var = !$var;
// Rupture detectee, on recupere objMod // Rupture detectee, on recupere objMod
$objMod=$modules[$obj->module]; $objMod=$modules[$obj->module];
$picto=($objMod->picto?$objMod->picto:'generic'); $picto=($objMod->picto?$objMod->picto:'generic');
if ($caneditperms && (empty($objMod->rights_admin_allowed) || empty($fuser->admin))) if ($caneditperms && (empty($objMod->rights_admin_allowed) || empty($fuser->admin)))
{ {
// On affiche ligne pour modifier droits // On affiche ligne pour modifier droits
print '<tr '. $bc[$var].'>'; print '<tr '. $bc[$var].'>';
print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName(); print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName();
print '<a name="'.$objMod->getName().'">&nbsp;</a></td>'; print '<a name="'.$objMod->getName().'">&nbsp;</a></td>';
print '<td align="center" nowrap="nowrap">'; print '<td align="center" nowrap="nowrap">';
print '<a title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$fuser->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>"; print '<a title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$fuser->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>";
print '/'; print '/';
print '<a title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$fuser->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("None")."</a>"; print '<a title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$fuser->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("None")."</a>";
print '</td>'; print '</td>';
print '<td colspan="2">&nbsp;</td>'; print '<td colspan="2">&nbsp;</td>';
print '</tr>'."\n"; print '</tr>'."\n";
} }
} }
print '<tr '. $bc[$var].'>'; print '<tr '. $bc[$var].'>';
@ -344,47 +344,47 @@ if ($result)
// Picto and label of permission // Picto and label of permission
print '<td>'.img_object('',$picto).' '.$objMod->getName().'</td>'; print '<td>'.img_object('',$picto).' '.$objMod->getName().'</td>';
// Permission and tick // Permission and tick
if (! empty($fuser->admin) && ! empty($objMod->rights_admin_allowed)) // Permission own because admin if (! empty($fuser->admin) && ! empty($objMod->rights_admin_allowed)) // Permission own because admin
{ {
if ($caneditperms) if ($caneditperms)
{ {
print '<td align="center">'.img_picto($langs->trans("Administrator"),'star').'</td>'; print '<td align="center">'.img_picto($langs->trans("Administrator"),'star').'</td>';
} }
print '<td align="center" nowrap="nowrap">'; print '<td align="center" nowrap="nowrap">';
print img_picto($langs->trans("Active"),'tick'); print img_picto($langs->trans("Active"),'tick');
print '</td>'; print '</td>';
} }
else if (in_array($obj->id, $permsuser)) // Permission own by user else if (in_array($obj->id, $permsuser)) // Permission own by user
{ {
if ($caneditperms) if ($caneditperms)
{ {
print '<td align="center"><a href="perms.php?id='.$fuser->id.'&amp;action=delrights&amp;rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_remove($langs->trans("Remove")).'</a></td>'; print '<td align="center"><a href="perms.php?id='.$fuser->id.'&amp;action=delrights&amp;rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
} }
print '<td align="center" nowrap="nowrap">'; print '<td align="center" nowrap="nowrap">';
print img_picto($langs->trans("Active"),'tick'); print img_picto($langs->trans("Active"),'tick');
print '</td>'; print '</td>';
} }
else if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group else if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group
{ {
if ($caneditperms) if ($caneditperms)
{ {
print '<td align="center">'; print '<td align="center">';
print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup"));
print '</td>'; print '</td>';
} }
print '<td align="center" nowrap="nowrap">'; print '<td align="center" nowrap="nowrap">';
print img_picto($langs->trans("Active"),'tick'); print img_picto($langs->trans("Active"),'tick');
print '</td>'; print '</td>';
} }
else else
{ {
// Do not own permission // Do not own permission
if ($caneditperms) if ($caneditperms)
{ {
print '<td align="center"><a href="perms.php?id='.$fuser->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_add($langs->trans("Add")).'</a></td>'; print '<td align="center"><a href="perms.php?id='.$fuser->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_add($langs->trans("Add")).'</a></td>';
} }
print '<td>&nbsp</td>'; print '<td>&nbsp</td>';
} }
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle)); $perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle));