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

This commit is contained in:
Laurent Destailleur 2013-06-27 17:47:03 +02:00
commit 7e74d9890b
37 changed files with 279 additions and 192 deletions

View File

@ -129,7 +129,9 @@ WARNING: If you used external modules, some of them may need to be upgraded due
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
- Fix: [ bug #934 ] Error on proformat invoice creation (pgsql)
- Fix: [ bug #947 ] Can't create proposal lines with unit price = 0
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
- Fix: Dutch (nl_NL) translation

View File

@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "3.5.0", "3.4.0", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
return ( "3.5.0", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
}
sub script_dolibarr_category

View File

@ -68,7 +68,7 @@ print '<br>';
print '<br>';
//print '<hr style="color: #DDDDDD;">';
print img_picto('','puce').' '.$langs->trans("SetupDescription4",DOL_URL_ROOT.'/admin/modules.php?mainmenu=home');
if (count($conf->modules) <= 1) // If only user module enabled
if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->global->MAIN_MINNB_MODULE)) // If only user module enabled
{
$langs->load("errors");
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));

View File

@ -659,7 +659,8 @@ else if ($action == "addline" && $user->rights->propal->creer)
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
$error++;
}
if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht != 0) || $price_ht == '')) // Unit price can be 0 but not ''. Also price can be negative for proposal.
if ((empty($idprod) || GETPOST('usenewaddlineform')) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal.
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
$error++;

View File

@ -315,7 +315,7 @@ else if ($action == 'add' && $user->rights->commande->creer)
}
//Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i],'fetch_optionals') ) // For avoid conflicts if trigger used
{
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_option=$lines[$i]->array_options;

View File

@ -1008,12 +1008,12 @@ else if ($action == 'add' && $user->rights->facture->creer)
$fk_parent_line = 0;
}
//Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_option=$lines[$i]->array_options;
}
//Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i],'fetch_optionals'))
{
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_option=$lines[$i]->array_options;
}
$result = $object->addline(
$id,

View File

@ -327,7 +327,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$var=!$var;
print "<tr ".$bc[$var].">";
// Third party
// Product
$fullname=$name[$key];
if ($key >= 0) {
$linkname='<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$key.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.'</a>';
@ -339,23 +339,24 @@ if ($modecompta == 'CREANCES-DETTES') {
// Amount w/o VAT
print '<td align="right">';
if ($key > 0) {
/*if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else {
print '<a href="#">';
}
}*/
print price($amount_ht[$key]);
//print '</a>';
print '</td>';
// Amount with VAT
print '<td align="right">';
if ($key > 0) {
/*if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else {
print '<a href="#">';
}
}*/
print price($amount[$key]);
print '</a>';
//print '</a>';
print '</td>';
// Percent;

View File

@ -3497,7 +3497,7 @@ class Form
// Year
if ($empty || $set_time == -1)
{
$retstring.='<input'.($disabled?' disabled="disabled"':'').' class="flat" type="text" size="3" maxlength="4" name="'.$prefix.'year" value="'.$syear.'">';
$retstring.='<input'.($disabled?' disabled="disabled"':'').' placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" class="flat" type="text" size="3" maxlength="4" name="'.$prefix.'year" value="'.$syear.'">';
}
else
{

View File

@ -207,7 +207,7 @@ class FormFile
return $this->getDocumentsLink($modulepart, $filename, $filedir);
}
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
$hookmanager->initHooks(array('formfile'));
$forname='builddoc';
$out='';
$var=true;
@ -450,14 +450,18 @@ class FormFile
$langs->load("errors");
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
}
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
$out.= $genbutton;
$out.= '</th>';
if ($printer) $out.= '<th></th>';
if($hookmanager->hooks['formfile'])
{
foreach($hookmanager->hooks['formfile'] as $module)
{
if(method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
}
}
$out.= '</tr>';
// Execute hooks
@ -529,6 +533,7 @@ class FormFile
$out.= ($param?'&'.$param:'');
$out.= '">'.img_printer().'</a></td>';
}
if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
}
$out.= '</tr>';

View File

@ -56,15 +56,16 @@ class DoliDBPgsql
//! >=1 if a transaction is opened, 0 otherwise
var $transaction_opened;
var $lastquery;
var $lastqueryerror; // Ajout d'une variable en cas d'erreur
// Saved last error
var $lastqueryerror;
var $lasterror;
var $lasterrno;
var $unescapeslashquot=0; // By default we do not force the unescape of \'. This is used only to process sql with mysql escaped data.
var $standard_conforming_strings=1; // Database has option standard_conforming_strings to on
var $ok;
var $error;
var $lasterror;
/**
@ -597,17 +598,17 @@ class DoliDBPgsql
{
if (! $ret)
{
if ($this->errno() != 'DB_ERROR_25P02')
if ($this->errno() != 'DB_ERROR_25P02') // Do not overwrite errors if this is a consecutive error
{
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
}
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." = ".$this->errno(), LOG_WARNING);
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_WARNING);
//print "\n>> ".$query."<br>\n";
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
if ($usesavepoint && $this->transaction_opened)
if ($usesavepoint && $this->transaction_opened) // Warning, after that errno will be erased
{
@pg_query($this->db, 'ROLLBACK TO SAVEPOINT mysavepoint');
}

View File

@ -1236,16 +1236,19 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$
* @param string $modulepart Module of document
* @param string $original_file Relative path with filename
* @param string $entity Restrict onto entity
* @param User $fuser User object (forced)
* @param string $refname Ref of object to check permission for external users (autodetect if not provided)
* @return mixed Array with access information : accessallowed & sqlprotectagainstexternals & original_file (as full path name)
*/
function dol_check_secure_access_document($modulepart,$original_file,$entity,$refname='')
function dol_check_secure_access_document($modulepart,$original_file,$entity,$fuser='',$refname='')
{
global $user, $conf, $db;
if (! is_object($fuser)) $fuser=$user;
if (empty($modulepart)) return 'ErrorBadParameter';
if (empty($entity)) $entity=0;
dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file);
dol_syslog('modulepart='.$modulepart.' original_file= '.$original_file);
// We define $accessallowed and $sqlprotectagainstexternals
$accessallowed=0;
$sqlprotectagainstexternals='';
@ -1253,7 +1256,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// find the subdirectory name as the reference
if (empty($refname)) $refname=basename(dirname($original_file)."/");
// Wrapping for some images
if ($modulepart == 'companylogo')
{
@ -1275,101 +1278,101 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les apercu factures
elseif ($modulepart == 'apercufacture')
{
if ($user->rights->facture->lire) $accessallowed=1;
if ($fuser->rights->facture->lire) $accessallowed=1;
$original_file=$conf->facture->dir_output.'/'.$original_file;
}
// Wrapping pour les apercu propal
elseif ($modulepart == 'apercupropal')
{
if ($user->rights->propale->lire) $accessallowed=1;
if ($fuser->rights->propale->lire) $accessallowed=1;
$original_file=$conf->propal->dir_output.'/'.$original_file;
}
// Wrapping pour les apercu commande
elseif ($modulepart == 'apercucommande')
{
if ($user->rights->commande->lire) $accessallowed=1;
if ($fuser->rights->commande->lire) $accessallowed=1;
$original_file=$conf->commande->dir_output.'/'.$original_file;
}
// Wrapping pour les apercu intervention
elseif ($modulepart == 'apercufichinter')
{
if ($user->rights->ficheinter->lire) $accessallowed=1;
if ($fuser->rights->ficheinter->lire) $accessallowed=1;
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
}
// Wrapping pour les images des stats propales
elseif ($modulepart == 'propalstats')
{
if ($user->rights->propale->lire) $accessallowed=1;
if ($fuser->rights->propale->lire) $accessallowed=1;
$original_file=$conf->propal->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats commandes
elseif ($modulepart == 'orderstats')
{
if ($user->rights->commande->lire) $accessallowed=1;
if ($fuser->rights->commande->lire) $accessallowed=1;
$original_file=$conf->commande->dir_temp.'/'.$original_file;
}
elseif ($modulepart == 'orderstatssupplier')
{
if ($user->rights->fournisseur->commande->lire) $accessallowed=1;
if ($fuser->rights->fournisseur->commande->lire) $accessallowed=1;
$original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file;
}
// Wrapping pour les images des stats factures
elseif ($modulepart == 'billstats')
{
if ($user->rights->facture->lire) $accessallowed=1;
if ($fuser->rights->facture->lire) $accessallowed=1;
$original_file=$conf->facture->dir_temp.'/'.$original_file;
}
elseif ($modulepart == 'billstatssupplier')
{
if ($user->rights->fournisseur->facture->lire) $accessallowed=1;
if ($fuser->rights->fournisseur->facture->lire) $accessallowed=1;
$original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file;
}
// Wrapping pour les images des stats expeditions
elseif ($modulepart == 'expeditionstats')
{
if ($user->rights->expedition->lire) $accessallowed=1;
if ($fuser->rights->expedition->lire) $accessallowed=1;
$original_file=$conf->expedition->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats expeditions
elseif ($modulepart == 'tripsexpensesstats')
{
if ($user->rights->deplacement->lire) $accessallowed=1;
if ($fuser->rights->deplacement->lire) $accessallowed=1;
$original_file=$conf->deplacement->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats expeditions
elseif ($modulepart == 'memberstats')
{
if ($user->rights->adherent->lire) $accessallowed=1;
if ($fuser->rights->adherent->lire) $accessallowed=1;
$original_file=$conf->adherent->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats produits
elseif (preg_match('/^productstats_/i',$modulepart))
{
if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1;
if ($fuser->rights->produit->lire || $fuser->rights->service->lire) $accessallowed=1;
$original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file;
}
// Wrapping for products or services
elseif ($modulepart == 'tax')
{
if ($user->rights->tax->charges->lire) $accessallowed=1;
if ($fuser->rights->tax->charges->lire) $accessallowed=1;
$original_file=$conf->tax->dir_output.'/'.$original_file;
}
// Wrapping for products or services
elseif ($modulepart == 'actions')
{
if ($user->rights->agenda->myactions->read) $accessallowed=1;
if ($fuser->rights->agenda->myactions->read) $accessallowed=1;
$original_file=$conf->agenda->dir_output.'/'.$original_file;
}
// Wrapping for categories
elseif ($modulepart == 'category')
{
if ($user->rights->categorie->lire) $accessallowed=1;
if ($fuser->rights->categorie->lire) $accessallowed=1;
$original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file;
}
// Wrapping pour les prelevements
elseif ($modulepart == 'prelevement')
{
if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1412,7 +1415,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
elseif ($modulepart == 'scanner_user_temp')
{
$accessallowed=1;
$original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file;
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
}
// Wrapping pour les images fckeditor
elseif ($modulepart == 'fckeditor')
@ -1424,7 +1427,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping for third parties
else if ($modulepart == 'company' || $modulepart == 'societe')
{
if ($user->rights->societe->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->societe->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1435,7 +1438,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping for invoices
else if ($modulepart == 'facture' || $modulepart == 'invoice')
{
if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1445,7 +1448,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
else if ($modulepart == 'unpaid')
{
if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1455,7 +1458,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les fiches intervention
else if ($modulepart == 'ficheinter')
{
if ($user->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1466,7 +1469,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les deplacements et notes de frais
else if ($modulepart == 'deplacement')
{
if ($user->rights->deplacement->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->deplacement->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1476,7 +1479,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les propales
else if ($modulepart == 'propal')
{
if ($user->rights->propale->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->propale->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1488,7 +1491,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les commandes
else if ($modulepart == 'commande' || $modulepart == 'order')
{
if ($user->rights->commande->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->commande->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1499,7 +1502,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les projets
else if ($modulepart == 'project')
{
if ($user->rights->projet->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1510,7 +1513,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les commandes fournisseurs
else if ($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier')
{
if ($user->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1521,7 +1524,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les factures fournisseurs
else if ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier')
{
if ($user->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1532,18 +1535,18 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les rapport de paiements
else if ($modulepart == 'facture_paiement')
{
if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
if ($user->societe_id > 0) $original_file=$conf->facture->dir_output.'/payments/private/'.$user->id.'/'.$original_file;
if ($fuser->societe_id > 0) $original_file=$conf->facture->dir_output.'/payments/private/'.$fuser->id.'/'.$original_file;
else $original_file=$conf->facture->dir_output.'/payments/'.$original_file;
}
// Wrapping pour les exports de compta
else if ($modulepart == 'export_compta')
{
if ($user->rights->compta->ventilation->creer || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->compta->ventilation->creer || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1553,7 +1556,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les expedition
else if ($modulepart == 'expedition')
{
if ($user->rights->expedition->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->expedition->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1563,7 +1566,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les bons de livraison
else if ($modulepart == 'livraison')
{
if ($user->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1573,7 +1576,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les actions
else if ($modulepart == 'actions')
{
if ($user->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1583,7 +1586,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les actions
else if ($modulepart == 'actionsreport')
{
if ($user->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1593,7 +1596,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les produits et services
else if ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service')
{
if (($user->rights->produit->lire || $user->rights->service->lire) || preg_match('/^specimen/i',$original_file))
if (($fuser->rights->produit->lire || $fuser->rights->service->lire) || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1604,7 +1607,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les contrats
else if ($modulepart == 'contract')
{
if ($user->rights->contrat->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->contrat->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1614,7 +1617,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les dons
else if ($modulepart == 'donation')
{
if ($user->rights->don->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->don->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1624,7 +1627,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les remises de cheques
else if ($modulepart == 'remisecheque')
{
if ($user->rights->banque->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->banque->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1638,7 +1641,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Aucun test necessaire car on force le rep de download sur
// le rep export qui est propre a l'utilisateur
$accessallowed=1;
$original_file=$conf->export->dir_temp.'/'.$user->id.'/'.$original_file;
$original_file=$conf->export->dir_temp.'/'.$fuser->id.'/'.$original_file;
}
// Wrapping for import module
@ -1662,7 +1665,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour les backups
else if ($modulepart == 'systemtools')
{
if ($user->admin)
if ($fuser->admin)
{
$accessallowed=1;
}
@ -1672,7 +1675,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping for upload file test
else if ($modulepart == 'admin_temp')
{
if ($user->admin)
if ($fuser->admin)
$accessallowed=1;
$original_file=$conf->admin->dir_temp.'/'.$original_file;
}
@ -1689,7 +1692,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Wrapping pour Foundation module
else if ($modulepart == 'member')
{
if ($user->rights->adherent->lire || preg_match('/^specimen/i',$original_file))
if ($fuser->rights->adherent->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
@ -1700,7 +1703,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
else if ($modulepart == 'scanner_user_temp')
{
$accessallowed=1;
$original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file;
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
}
// GENERIC Wrapping
@ -1713,18 +1716,18 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
// Define $accessallowed
if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg))
{
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
$original_file=$conf->$reg[1]->dir_temp.'/'.$user->id.'/'.$original_file;
if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1;
$original_file=$conf->$reg[1]->dir_temp.'/'.$fuser->id.'/'.$original_file;
}
else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg))
{
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1;
$original_file=$conf->$reg[1]->dir_temp.'/'.$original_file;
}
else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg))
{
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
$original_file=$conf->$reg[1]->dir_output.'/'.$user->id.'/'.$original_file;
if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1;
$original_file=$conf->$reg[1]->dir_output.'/'.$fuser->id.'/'.$original_file;
}
else
{
@ -1732,24 +1735,24 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
$subperm=GETPOST('subperm');
if ($perm || $subperm)
{
if (($perm && ! $subperm && $user->rights->$modulepart->$perm) || ($perm && $subperm && $user->rights->$modulepart->$perm->$subperm)) $accessallowed=1;
if (($perm && ! $subperm && $fuser->rights->$modulepart->$perm) || ($perm && $subperm && $fuser->rights->$modulepart->$perm->$subperm)) $accessallowed=1;
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
}
else
{
if ($user->rights->$modulepart->lire || $user->rights->$modulepart->read) $accessallowed=1;
if ($fuser->rights->$modulepart->lire || $fuser->rights->$modulepart->read) $accessallowed=1;
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
}
}
if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen
if ($user->admin) $accessallowed=1; // If user is admin
if ($fuser->admin) $accessallowed=1; // If user is admin
// For modules who wants to manage different levels of permissions for documents
$subPermCategoryConstName = strtoupper($modulepart).'_SUBPERMCATEGORY_FOR_DOCUMENTS';
if (! empty($conf->global->$subPermCategoryConstName))
{
$subPermCategory = $conf->global->$subPermCategoryConstName;
if (! empty($subPermCategory) && (($user->rights->$modulepart->$subPermCategory->lire) || ($user->rights->$modulepart->$subPermCategory->read) || ($user->rights->$modulepart->$subPermCategory->download)))
if (! empty($subPermCategory) && (($fuser->rights->$modulepart->$subPermCategory->lire) || ($fuser->rights->$modulepart->$subPermCategory->read) || ($fuser->rights->$modulepart->$subPermCategory->download)))
{
$accessallowed=1;
}
@ -1763,7 +1766,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$re
eval('$sqlprotectagainstexternals = "'.$conf->global->$sqlProtectConstName.'";');
}
}
$ret = array(
'accessallowed' => $accessallowed,
'sqlprotectagainstexternals'=>$sqlprotectagainstexternals,

View File

@ -53,7 +53,7 @@ function project_prepare_head($object)
|| ! empty($conf->ficheinter->enabled) || ! empty($conf->agenda->enabled) || ! empty($conf->deplacement->enabled))
{
$head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$object->id;
$head[$h][1] = $langs->trans("Referers");
$head[$h][1] = $langs->trans("ProjectReferers");
$head[$h][2] = 'element';
$h++;
}
@ -644,4 +644,4 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0)
print "</table>";
}
?>
?>

View File

@ -198,6 +198,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
-- Check deposit

View File

@ -523,7 +523,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoPHP'), 1);
//if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1);
$newmenu->add('/admin/system/database.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoDatabase'), 1);
$newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("Backup"),1);
$newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("Restore"),1);
$newmenu->add("/admin/tools/update.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("MenuUpgrade"),1);
@ -534,6 +533,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add('/admin/system/about.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('About'), 1);
$newmenu->add("/support/index.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp');
}
// Modules system tools
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
{

View File

@ -893,11 +893,12 @@ abstract class DolibarrModules
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::insert_permissions error ".$this->error, LOG_ERR);
dol_syslog(get_class($this)."::insert_permissions errno = ".$this->db->errno()." error ".$this->error, LOG_ERR);
$err++;
break;
}
else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO);
}
$this->db->free($resqlinsert);

View File

@ -55,7 +55,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$langs->load("companies");
$this->db = $db;
$this->name = "ODT templates";
$this->name = "ODT/ODS templates";
$this->description = $langs->trans("DocumentModelOdt");
$this->scandir = 'FACTURE_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan
@ -114,6 +114,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
'object_source_invoice_ref'=>$invoice_source->ref,
'object_hour'=>dol_print_date($object->date,'hour'),
'object_date'=>dol_print_date($object->date,'day'),
'object_date_rfc'=>dol_print_date($object->date,'dayrfc'),
'object_date_limit'=>dol_print_date($object->date_lim_reglement,'day'),
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
@ -220,7 +221,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
else
{
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}

View File

@ -178,4 +178,4 @@ header('Pragma: public');
readfile($original_file_osencoded);
?>
if (is_object($db)) $db->close();

View File

@ -66,4 +66,4 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob
DROP table llx_adherent_options;
DROP table llx_adherent_options_label;
ALTER TABLE llx_user ADD accountancy_code VARCHAR( 24 ) NULL;

View File

@ -1,51 +1,51 @@
-- ===================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
--
-- 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
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
CREATE TABLE llx_cronjob
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
datec datetime,
jobtype varchar(10) NOT NULL,
label text NOT NULL,
command varchar(255),
classesname varchar(255),
objectname varchar(255),
methodename varchar(255),
params text NOT NULL,
md5params varchar(32),
module_name varchar(255),
priority integer DEFAULT 0,
datelastrun datetime,
datenextrun datetime,
datestart datetime,
dateend datetime,
datelastresult datetime,
lastresult text,
lastoutput text,
unitfrequency integer NOT NULL DEFAULT 0,
frequency integer NOT NULL DEFAULT 0,
nbrun integer,
status integer NOT NULL DEFAULT 1,
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,
note text
-- ===================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
--
-- 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
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
CREATE TABLE llx_cronjob
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
datec datetime,
jobtype varchar(10) NOT NULL,
label text NOT NULL,
command varchar(255),
classesname varchar(255),
objectname varchar(255),
methodename varchar(255),
params text NOT NULL,
md5params varchar(32),
module_name varchar(255),
priority integer DEFAULT 0,
datelastrun datetime,
datenextrun datetime,
datestart datetime,
dateend datetime,
datelastresult datetime,
lastresult text,
lastoutput text,
unitfrequency integer NOT NULL DEFAULT 0,
frequency integer NOT NULL DEFAULT 0,
nbrun integer,
status integer NOT NULL DEFAULT 1,
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,
note text
)ENGINE=innodb;

View File

@ -62,5 +62,6 @@ create table llx_user
statut tinyint DEFAULT 1,
photo varchar(255), -- filename or url of photo
lang varchar(6),
color varchar(6)
color varchar(6),
accountancy_code varchar(24) NULL
)ENGINE=innodb;

View File

@ -313,7 +313,7 @@ LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory
ExamplesWithCurrentSetup=Examples with current running setup
ListOfDirectories=List of OpenDocument templates directories
ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between eah directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b>.
NumberOfModelFilesFound=Number of ODT templates files found in those directories
NumberOfModelFilesFound=Number of ODT/ODS templates files found in those directories
ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir
FollowingSubstitutionKeysCanBeUsed=<br>To know how to create your odt document templates, before storing them in those directories, read wiki documentation:
FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template
@ -1002,7 +1002,7 @@ ModuleCompanyCodeDigitaria=Accountancy code depends on third party code. The cod
UseNotifications=Use notifications
NotificationsDesc=EMails notifications feature allows you to silently send automatic mail, for some Dolibarr events, to third parties (customers or suppliers) that are configured to. Choice of active notification and targets contacts is made one third party at time.
ModelModules=Documents templates
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for OpenOffice, KOffice, TextEdit,...)
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...)
WatermarkOnDraft=Watermark on draft document
CompanyIdProfChecker=Rules on Professional Ids
MustBeUnique=Must be unique ?

View File

@ -106,4 +106,5 @@ TypeContact_project_task_external_CONTRIBUTOR=Contributor
# Documents models
DocumentModelBaleine=A complete project's report model (logo...)
PlannedWorkload = Planned workload
WorkloadOccupation= Workload affectation
WorkloadOccupation= Workload affectation
ProjectReferers=Refering objects

View File

@ -42,7 +42,7 @@ ErrCatAlreadyExists=Este nombre esta siendo utilizado
AddProductToCat=¿Añadir este producto a una categoría?
ImpossibleAddCat=Imposible añadir la categoría
ImpossibleAssociateCategory=Imposible asociar la categoría
WasAddedSuccessfully=se ha añadido con éxito.
WasAddedSuccessfully=La categoría se ha añadido con éxito.
ObjectAlreadyLinkedToCategory=El elemento ya está enlazado a esta categoría
CategorySuccessfullyCreated=La categoría %s se insertado correctamente.
ProductIsInCategories=Este producto/servicio se encuentra en las siguientes categorías
@ -97,4 +97,4 @@ CatMemberList=Listado categorías de miembros
CatSupLinks=Proveedores
CatCusLinks=Clientes/Clientes potenciales
CatProdLinks=Productos
CatMemberLinks=Miembros
CatMemberLinks=Miembros

View File

@ -314,7 +314,7 @@ LanguageFilesCachedIntoShmopSharedMemory=Fichiers .lang en mémoire partagée
ExamplesWithCurrentSetup=Exemples avec le paramétrage actif courant
ListOfDirectories=Liste des répertoires des modèles OpenDocument
ListOfDirectoriesForModelGenODT=Liste des répertoires contenant des documents modèles OpenDocument.<br><br>Indiquer les chemins complets de répertoire.<br>Ajouter un retour à la ligne entre chaque répertoire.<br>Pour indiquer un répertoire du module GED, indiquer<br><b>DOL_DATA_ROOT/ecm/nomdurepertoireged</b><br><br>Les fichiers modèles dans ces répertoires doivent se terminer par <b>.odt</b>.
NumberOfModelFilesFound=Nombre de fichiers modèles ODT trouvés dans ce(s) répertoire(s)
NumberOfModelFilesFound=Nombre de fichiers modèles ODT/ODS trouvés dans ce(s) répertoire(s)
ExampleOfDirectoriesForModelGen=Exemple de syntaxe :<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir
FollowingSubstitutionKeysCanBeUsed=<br>Pour savoir comment rédiger des modèles de document odt avant de les placer dans un de ces répertoires, consulter la documentation du wiki :
FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Créer_un_modèle_de_document_ODT
@ -1004,7 +1004,7 @@ ModuleCompanyCodeDigitaria=Renvoie un code comptable composé suivant le code ti
UseNotifications=Utiliser les notifications
NotificationsDesc=La fonction des notifications par emails permet d'envoyer automatiquement un email, pour certains événements Dolibarr, aux tiers (sociétés clients, prospects ou fournisseurs) configurés pour. Le choix des notifications et contacts destinataires se fait tiers par tiers.
ModelModules=Modèle de documents
DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT OpenOffice, KOffice, TextEdit…)
DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT ou .ODS OpenOffice, KOffice, TextEdit…)
WatermarkOnDraft=Filigrane sur les documents brouillons
CompanyIdProfChecker=Règles sur les Identifiants professionnels
MustBeUnique=Doit être unique ?

View File

@ -108,4 +108,5 @@ DocumentModelBaleine=Modèle de rapport de projet complet (logo...)
SelectElement=Eléments associable au projet :
AddElement=Associer
PlannedWorkload = Charge de travail prévue
WorkloadOccupation= Pourcentage affectation
WorkloadOccupation= Pourcentage affectation
ProjectReferers=Objets associés

View File

@ -61,8 +61,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
if (! $error)
{
@ -93,12 +93,12 @@ llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup');
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php";
$head[$h][1] = $langs->trans("Account");
$head[$h][2] = 'payboxaccount';
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php";
$head[$h][1] = $langs->trans("Account");
$head[$h][2] = 'payboxaccount';
$h++;
dol_fiche_head($head, 'payboxaccount', '');
@ -198,17 +198,17 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,''
$doleditor->Create();
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").'</td><td>';
print '<input size="32" type="email" name="PAYBOX_PAYONLINE_SENDEMAIL" value="'.$conf->global->PAYBOX_PAYONLINE_SENDEMAIL.'">';
print ' &nbsp; '.$langs->trans("Example").': myemail@myserver.com';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").'</td><td>';
print '<input size="32" type="email" name="PAYBOX_PAYONLINE_SENDEMAIL" value="'.$conf->global->PAYBOX_PAYONLINE_SENDEMAIL.'">';
print ' &nbsp; '.$langs->trans("Example").': myemail@myserver.com';
print '</td></tr>';
print '<tr><td colspan="2" align="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
print '</table></form>';
dol_fiche_end();
dol_fiche_end();
print '<br><br>';

View File

@ -67,8 +67,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
if (! $error)
{
@ -203,12 +203,12 @@ $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,''
$doleditor->Create();
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").'</td><td>';
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").'</td><td>';
print '<input size="32" type="email" name="PAYPAL_PAYONLINE_SENDEMAIL" value="'.$conf->global->PAYPAL_PAYONLINE_SENDEMAIL.'">';
print ' &nbsp; '.$langs->trans("Example").': myemail@myserver.com';
print '</td></tr>';
print '</td></tr>';
$var=true;
print '<tr class="liste_titre">';

View File

@ -226,6 +226,7 @@ if ($search_all)
$sql.= " OR s.code_client LIKE '%".$db->escape($search_all)."%'";
$sql.= " OR s.email LIKE '%".$db->escape($search_all)."%'";
$sql.= " OR s.url LIKE '%".$db->escape($search_all)."%'";
$sql.= " OR s.siren LIKE '%".$db->escape($search_all)."%'";
$sql.= ")";
}
if ($search_nom)
@ -235,6 +236,7 @@ if ($search_nom)
$sql.= " OR s.code_client LIKE '%".$db->escape($search_nom)."%'";
$sql.= " OR s.email LIKE '%".$db->escape($search_nom)."%'";
$sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'";
$sql.= " OR s.siren LIKE '%".$db->escape($search_nom)."%'";
$sql.= ")";
}
if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'";

View File

@ -256,6 +256,10 @@ input:-webkit-autofill {
background-image:none !important;
-webkit-box-shadow: 0 0 0 50px <?php echo empty($dol_use_jmobile)?'#FBFFEA':'#FFFFFF' ?> inset;
}
::-webkit-input-placeholder { color:#ccc; }
::-moz-placeholder { color:#ccc; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
@ -2150,12 +2154,16 @@ div.ui-radio
{
display: inline-block;
}
.ui-radio input {
.ui-checkbox input, .ui-radio input {
height: auto;
width: auto;
margin: 0;
margin: 4px;
position: static;
}
div.ui-checkbox label+input, div.ui-radio label+input {
position: absolute;
}
.ui-mobile fieldset
{
padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important;

View File

@ -148,6 +148,10 @@ input:-webkit-autofill {
background-image:none !important;
-webkit-box-shadow: 0 0 0 50px <?php echo empty($dol_use_jmobile)?'#FBFFEA':'#FFFFFF' ?> inset;
}
::-webkit-input-placeholder { color:#ccc; }
::-moz-placeholder { color:#ccc; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
@ -2283,12 +2287,16 @@ div.ui-radio
{
display: inline-block;
}
.ui-radio input {
.ui-checkbox input, .ui-radio input {
height: auto;
width: auto;
margin: 0;
margin: 4px;
position: static;
}
div.ui-checkbox label+input, div.ui-radio label+input {
position: absolute;
}
.ui-mobile fieldset
{
padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important;

View File

@ -176,6 +176,10 @@ input.button[type=submit] {
font-size: 10px;
display: inline;
}
::-webkit-input-placeholder { color:#ccc; }
::-moz-placeholder { color:#ccc; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
@ -2493,12 +2497,16 @@ div.ui-radio
{
display: inline-block;
}
.ui-radio input {
.ui-checkbox input, .ui-radio input {
height: auto;
width: auto;
margin: 0;
margin: 4px;
position: static;
}
div.ui-checkbox label+input, div.ui-radio label+input {
position: absolute;
}
.ui-mobile fieldset
{
padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important;

View File

@ -154,6 +154,10 @@ input.button[type=submit] {
font-size: 11px;
font-weight: bold;
}
::-webkit-input-placeholder { color:#ccc; }
::-moz-placeholder { color:#ccc; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
@ -2384,12 +2388,16 @@ div.ui-radio
{
display: inline-block;
}
.ui-radio input {
.ui-checkbox input, .ui-radio input {
height: auto;
width: auto;
margin: 0;
margin: 4px;
position: static;
}
div.ui-checkbox label+input, div.ui-radio label+input {
position: absolute;
}
.ui-mobile fieldset
{
padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important;

View File

@ -285,6 +285,10 @@ input:-webkit-autofill {
background-image:none !important;
-webkit-box-shadow: 0 0 0 50px <?php echo empty($dol_use_jmobile)?'#FBFFEA':'#FFFFFF' ?> inset;
}
::-webkit-input-placeholder { color:#ccc; }
::-moz-placeholder { color:#ccc; } /* firefox 19+ */
:-ms-input-placeholder { color:#ccc; } /* ie */
input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
@ -1571,7 +1575,7 @@ span.butAction, span.butActionDelete {
}
table.border {
table.border, table.dataTable {
border: 1px solid #9CACBB;
border-collapse: collapse;
}
@ -1687,11 +1691,11 @@ table.liste td {
.tagtr { display: table-row; }
.tagtd { display: table-cell; }
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
{
height: 20px !important;
}
div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel
div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
{
background: rgb(<?php echo $colorbacktitle1; ?>);
background-repeat: repeat-x;
@ -2703,16 +2707,20 @@ a.ui-link {
background: #fff;
}
div.ui-radio
div.ui-radio, div.ui-checkbox
{
display: inline-block;
border-bottom: 0px !important;
}
.ui-radio input {
.ui-checkbox input, .ui-radio input {
height: auto;
width: auto;
margin: 0;
margin: 4px;
position: static;
}
div.ui-checkbox label+input, div.ui-radio label+input {
position: absolute;
}
.ui-mobile fieldset
{
padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important;

View File

@ -96,6 +96,8 @@ class User extends CommonObject
var $users; // To store all tree of users hierarchy
var $parentof; // To store an array of all parents for all ids.
var $accountancy_code; // Accountancy code in prevision of the complete accountancy module
/**
@ -149,6 +151,7 @@ class User extends CommonObject
$sql.= " u.datepreviouslogin as datep,";
$sql.= " u.photo as photo,";
$sql.= " u.openid as openid,";
$sql.= " u.accountancy_code,";
$sql.= " u.ref_int, u.ref_ext";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
@ -209,6 +212,7 @@ class User extends CommonObject
$this->openid = $obj->openid;
$this->lang = $obj->lang;
$this->entity = $obj->entity;
$this->accountancy_code = $obj->accountancy_code;
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
@ -1114,6 +1118,7 @@ class User extends CommonObject
$this->address = empty($this->address)?'':$this->address;
$this->zip = empty($this->zip)?'':$this->zip;
$this->town = empty($this->town)?'':$this->town;
$this->accountancy_code = trim($this->accountancy_code);
// Check parameters
if (! empty($conf->global->USER_MAIL_REQUIRED) && ! isValidEMail($this->email))
@ -1142,6 +1147,7 @@ class User extends CommonObject
$sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", job = '".$this->db->escape($this->job)."'";
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
$sql.= ", note = '".$this->db->escape($this->note)."'";
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");

View File

@ -188,6 +188,7 @@ if ($action == 'add' && $canadduser)
$object->email = GETPOST("email");
$object->job = GETPOST("job");
$object->signature = GETPOST("signature");
$object->accountancy_code = GETPOST("accountancy_code");
$object->note = GETPOST("note");
$object->ldap_sid = GETPOST("ldap_sid");
@ -324,6 +325,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$object->email = GETPOST("email");
$object->job = GETPOST("job");
$object->signature = GETPOST("signature");
$object->accountancy_code = GETPOST("accountancy_code");
$object->openid = GETPOST("openid");
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
@ -1192,6 +1194,10 @@ else
}
print '</td>';
print "</tr>\n";
// Accountancy code
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>'.$object->accountancy_code.'</td>';
// Status
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
@ -1821,6 +1827,21 @@ else
}
print '</td>';
print "</tr>\n";
// Accountancy code
print "<tr>";
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>';
if ($caneditfield)
{
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
}
else
{
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
print $object->accountancy_code;
}
print '</td>';
// Status
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';

View File

@ -198,4 +198,3 @@ else // Open and return file
if (is_object($db)) $db->close();
?>

View File

@ -175,7 +175,7 @@ function getVersions($authentication)
/**
* Method to get a document by webservice
*
*
* @param array $authentication Array with permissions
* @param string $modulepart Properties of document
* @param string $file Relative path
@ -224,7 +224,7 @@ function getDocument($authentication, $modulepart, $file, $refname='')
if (empty($refname)) $refname=basename(dirname($original_file)."/");
// Security check
$check_access = dol_check_secure_access_document($modulepart,$original_file,$conf->entity,$refname);
$check_access = dol_check_secure_access_document($modulepart,$original_file,$conf->entity,$refname,$fuser);
$accessallowed = $check_access['accessallowed'];
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
$original_file = $check_access['original_file'];
@ -323,4 +323,4 @@ function getDocument($authentication, $modulepart, $file, $refname='')
// Return the results.
$server->service($HTTP_RAW_POST_DATA);
?>
?>