';
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index e45a316858f..a5213413d54 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -2,7 +2,8 @@
/* Copyright (C) 2004 Rodolphe Quiedeville
* Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2005-2009 Regis Houssin
- * Copyright (C) 2011-2012 Juanjo Menent
+ * Copyright (C) 2011-2012 Juanjo Menent
+ * Copyright (C) 2013 Philippe Grand
*
* 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
@@ -35,6 +36,10 @@ accessforbidden();
$action = GETPOST('action','alpha');
+/*
+ * Actions
+ */
+
$compta_mode = defined('COMPTA_MODE')?COMPTA_MODE:'RECETTES-DEPENSES';
if ($action == 'setcomptamode')
@@ -87,7 +92,7 @@ if ($action == 'update' || $action == 'add')
}*/
/*
- * Affichage page
+ * View
*/
llxHeader();
@@ -97,9 +102,18 @@ $form=new Form($db);
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans('ComptaSetup'),$linkback,'setup');
-
print ' ';
+$h = 0;
+
+$head[$h][0] = DOL_URL_ROOT."/admin/compta.php";
+$head[$h][1] = $langs->trans("Compta");
+$head[$h][2] = 'Compta';
+$hselected=$h;
+$h++;
+
+dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
+
print '
';
// Cas du parametre COMPTA_MODE
diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php
index 80e1547b33f..5e32dd097d0 100644
--- a/htdocs/admin/contract.php
+++ b/htdocs/admin/contract.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2011-2013 Philippe Grand
*
* 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
@@ -27,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$langs->load("admin");
$langs->load("errors");
+$langs->load("contracts");
if (!$user->admin) accessforbidden();
@@ -88,6 +90,20 @@ print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
print " ";
+$h = 0;
+
+$head[$h][0] = DOL_URL_ROOT."/admin/contract.php";
+$head[$h][1] = $langs->trans("Contracts");
+$head[$h][2] = 'Contract';
+$hselected=$h;
+$h++;
+
+dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
+
+/*
+ * Contracts Numbering model
+ */
+
print_titre($langs->trans("ContractsNumberingModules"));
print '
';
@@ -129,7 +145,7 @@ if (is_resource($handle))
print $module->info();
print '';
- // Show example of numbering module
+ // Show example of numbering model
print '
';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; }
diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php
index 21c2b3a1a59..0176436c928 100644
--- a/htdocs/admin/dons.php
+++ b/htdocs/admin/dons.php
@@ -1,6 +1,7 @@
* Copyright (C) 2012 Juanjo Menent
+ * Copyright (C) 2013 Philippe Grand
*
* 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
@@ -47,7 +48,7 @@ if ($action == 'specimen')
$don = new Don($db);
$don->initAsSpecimen();
- // Charge le modele
+ // Search template files
$dir = DOL_DOCUMENT_ROOT . "/core/modules/dons/";
$file = $modele.".modules.php";
if (file_exists($dir.$file))
@@ -75,67 +76,39 @@ if ($action == 'specimen')
}
}
-if ($action == 'setdoc')
+// Set default model
+else if ($action == 'setdoc')
{
- $value = GETPOST('value','alpha');
- $label = GETPOST('label','alpha');
- $scandir = GETPOST('scandir','alpha');
-
- $db->begin();
+ if (dolibarr_set_const($db, "DON_ADDON_MODEL",$value,'chaine',0,'',$conf->entity))
+ {
+ // La constante qui a ete lue en avant du nouveau set
+ // on passe donc par une variable pour avoir un affichage coherent
+ $conf->global->DON_ADDON_MODEL = $value;
+ }
- if (dolibarr_set_const($db, "DON_ADDON_MODEL",$value,'chaine',0,'',$conf->entity))
- {
- $conf->global->DON_ADDON_MODEL = $value;
- }
-
- // On active le modele
- $type='donation';
- $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
- $sql_del.= " WHERE nom = '".$db->escape($value)."' AND type = '".$type."'";
- $result1=$db->query($sql_del);
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
- $sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", ";
- $sql.= ($label?"'".$db->escape($label)."'":'null').", ";
- $sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
- $sql.= ")";
- $result2=$db->query($sql);
- if ($result1 && $result2)
- {
- $db->commit();
- }
- else
- {
- $db->rollback();
- }
+ // On active le modele
+ $ret = delDocumentModel($value, $type);
+ if ($ret > 0)
+ {
+ $ret = addDocumentModel($value, $type, $label, $scandir);
+ }
}
-if ($action == 'set')
+// Activate a model
+else if ($action == 'set')
{
- $value = GETPOST('value','alpha');
- $label = GETPOST('label','alpha');
- $scandir = GETPOST('scandir','alpha');
-
- $type='donation';
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
- $sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
- $sql.= ($label?"'".$db->escape($label)."'":'null').", ";
- $sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
- $sql.= ")";
- $resql=$db->query($sql);
+ $ret = addDocumentModel($value, $type, $label, $scandir);
}
-if ($action == 'del')
+else if ($action == 'del')
{
- $value = GETPOST('value','alpha');
-
- $type='donation';
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
- $sql .= " WHERE nom = '".$value."' AND type = '".$type."'";
- $resql=$db->query($sql);
+ $ret = delDocumentModel($value, $type);
+ if ($ret > 0)
+ {
+ if ($conf->global->DON_ADDON_MODEL == "$value") dolibarr_del_const($db, 'DON_ADDON_MODEL',$conf->entity);
+ }
}
-
/*
* View
*/
@@ -147,6 +120,17 @@ llxHeader('',$langs->trans("DonationsSetup"),'DonConfiguration');
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("DonationsSetup"),$linkback,'setup');
+print ' ';
+
+$h = 0;
+
+$head[$h][0] = DOL_URL_ROOT."/admin/dons.php";
+$head[$h][1] = $langs->trans("Donations");
+$head[$h][2] = 'Donation';
+$hselected=$h;
+$h++;
+
+dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
// Document templates
diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php
index 908b36dbabb..45a142d8190 100644
--- a/htdocs/admin/ecm.php
+++ b/htdocs/admin/ecm.php
@@ -70,6 +70,17 @@ llxHeader('',$langs->trans("ECMSetup"),$help_url);
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("ECMSetup"),$linkback,'setup');
+print ' ';
+
+$h = 0;
+
+$head[$h][0] = DOL_URL_ROOT."/admin/ecm.php";
+$head[$h][1] = $langs->trans("Miscellanous");
+$head[$h][2] = 'general';
+$hselected=$h;
+$h++;
+
+dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
print '
';
print '
';
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index 708acf6bc86..023593ea2a7 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -6,7 +6,7 @@
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2008 Raphael Bertrand (Resultic)
* Copyright (C) 2011-2012 Juanjo Menent
- * Copyright (C) 2011-2012 Philippe Grand
+ * Copyright (C) 2011-2013 Philippe Grand
*
* 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
@@ -67,42 +67,7 @@ if ($action == 'updateMask')
}
}
-if ($action == 'set_FICHINTER_FREE_TEXT')
-{
- $freetext= GETPOST('FICHINTER_FREE_TEXT','alpha');
- $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
-
- if (! $res > 0) $error++;
-
- if (! $error)
- {
- $mesg = "".$langs->trans("SetupSaved")."";
- }
- else
- {
- $mesg = "".$langs->trans("Error")."";
- }
-}
-
-if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
-{
- $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
-
- $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
-
- if (! $res > 0) $error++;
-
- if (! $error)
- {
- $mesg = "".$langs->trans("SetupSaved")."";
- }
- else
- {
- $mesg = "".$langs->trans("Error")."";
- }
-}
-
-if ($action == 'specimen')
+else if ($action == 'specimen') // For fiche inter
{
$modele= GETPOST('module','alpha');
@@ -147,12 +112,13 @@ if ($action == 'specimen')
}
}
-if ($action == 'set')
+// Activate a model
+else if ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
-if ($action == 'del')
+else if ($action == 'del')
{
$ret = delDocumentModel($value, $type);
if ($ret > 0)
@@ -161,7 +127,8 @@ if ($action == 'del')
}
}
-if ($action == 'setdoc')
+// Set default model
+else if ($action == 'setdoc')
{
if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
@@ -178,7 +145,7 @@ if ($action == 'setdoc')
}
}
-if ($action == 'setmod')
+else if ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
@@ -186,6 +153,41 @@ if ($action == 'setmod')
dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity);
}
+else if ($action == 'set_FICHINTER_FREE_TEXT')
+{
+ $freetext= GETPOST('FICHINTER_FREE_TEXT','alpha');
+ $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ $mesg = "".$langs->trans("SetupSaved")."";
+ }
+ else
+ {
+ $mesg = "".$langs->trans("Error")."";
+ }
+}
+
+else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
+{
+ $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
+
+ $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ $mesg = "".$langs->trans("SetupSaved")."";
+ }
+ else
+ {
+ $mesg = "".$langs->trans("Error")."";
+ }
+}
+
/*
* View
@@ -202,6 +204,17 @@ print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
print " ";
+$h = 0;
+
+$head[$h][0] = DOL_URL_ROOT."/admin/fichinter.php";
+$head[$h][1] = $langs->trans("Interventions");
+$head[$h][2] = 'Ficheinter';
+$hselected=$h;
+$h++;
+
+dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
+
+// Interventions numbering model
print_titre($langs->trans("FicheinterNumberingModules"));
@@ -234,22 +247,22 @@ foreach ($dirmodels as $reldir)
$file = $reg[1];
$classname = substr($file,4);
- require_once DOL_DOCUMENT_ROOT ."/core/modules/fichinter/".$file.'.php';
+ require_once $dir.$file.'.php';
$module = new $file;
-
- // Show modules according to features level
- if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
- if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
-
+
if ($module->isEnabled())
{
+ // Show modules according to features level
+ if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
+ if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
+
$var=!$var;
print '
'.$module->nom."
\n";
print $module->info();
print '
';
- // Show example of numbering module
+ // Show example of numbering model
print '
';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print '
';
-
-// SERVICE COMMISSION RATE
-$var=!$var;
-print '
';
-print '
'.$langs->trans("ServiceCommissionRate").'
';
-print '
';
-print ' %';
-print '
';
-print '
'.$langs->trans('ServiceCommissionRateDetails').'
';
-print '
';
-
-// INTERNAL CONTACT TYPE USED AS COMMERCIAL AGENT
-$var=!$var;
-print '
';
-print '
'.$langs->trans("AgentContactType").'
';
-print '
';
-$formcompany = new FormCompany($db);
-$facture = new Facture($db);
-print $formcompany->selectTypeContact($facture, $conf->global->AGENT_CONTACT_TYPE, "AGENT_CONTACT_TYPE","internal","code",1);
-print '
';
-print '
'.$langs->trans('AgentContactTypeDetails').'
';
-print '
';
-
-$var=!$var;
-print '
';
-print '
';
-print '';
-print '
';
-print '
';
-
-print '
';
-
-print '';
-
-dol_fiche_end();
-
-print ' ';
-
-llxFooter();
-$db->close();
-?>
diff --git a/htdocs/commissions/index.php b/htdocs/commissions/index.php
deleted file mode 100644
index cdc6329d858..00000000000
--- a/htdocs/commissions/index.php
+++ /dev/null
@@ -1,329 +0,0 @@
-
- *
- * 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 .
- */
-
-/**
- * \file htdocs/commissions/index.php
- * \ingroup commissions
- * \brief Page des commissions par agent commercial
- */
-
-require '../main.inc.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
-require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
-if (! empty($conf->margin->enabled))
- require_once DOL_DOCUMENT_ROOT.'/margin/lib/margins.lib.php';
-
-$langs->load("companies");
-$langs->load("bills");
-$langs->load("products");
-$langs->load("commissions");
-if (! empty($conf->margin->enabled))
- $langs->load("margins");
-
-// Security check
-$agentid = GETPOST('agentid','int');
-
-$mesg = '';
-
-$sortfield = GETPOST("sortfield",'alpha');
-$sortorder = GETPOST("sortorder",'alpha');
-$page = GETPOST("page",'int');
-if ($page == -1) { $page = 0; }
-$offset = $conf->liste_limit * $page;
-$pageprev = $page - 1;
-$pagenext = $page + 1;
-
-$startdate=$enddate='';
-
-if (!empty($_POST['startdatemonth']))
- $startdate = date('Y-m-d', dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']));
-if (!empty($_POST['enddatemonth']))
- $enddate = date('Y-m-d', dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']));
-
-/*
- * View
- */
-
-$userstatic = new User($db);
-$companystatic = new Societe($db);
-$invoicestatic=new Facture($db);
-
-$form = new Form($db);
-
-llxHeader('',$langs->trans("Commissions"));
-
-$text=$langs->trans("Commissions");
-print_fiche_titre($text);
-
-print '
';
print "\n";
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 26b8a0c5826..9058350747f 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2141,7 +2141,7 @@ abstract class CommonObject
$attributeKey = substr($key,8); // Remove 'options_' prefix
// Add field of attribut
if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
- $sql.=",".$attributeKey;
+ $sql.=",".$attributeKey;
}
$sql .= ") VALUES (".$this->id;
foreach($this->array_options as $key => $value)
@@ -2695,7 +2695,8 @@ abstract class CommonObject
global $form,$bc,$bcdd;
$element=$this->element;
- $text='';
+
+ $text=''; $description=''; $type=0;
// Show product and description
$type=(! empty($line->product_type)?$line->product_type:$line->fk_product_type);
@@ -2703,27 +2704,25 @@ abstract class CommonObject
if (! empty($line->date_start)) $type=1; // deprecated
if (! empty($line->date_end)) $type=1; // deprecated
- if ($line->fk_product > 0)
- {
- $product_static = new Product($this->db);
-
- $product_static->type=$line->fk_product_type;
- $product_static->id=$line->fk_product;
- $product_static->ref=$line->ref;
- $text=$product_static->getNomUrl(1);
- }
-
// Ligne en mode visu
if ($action != 'editline' || $selected != $line->id)
{
- // Produit
+ // Product
if ($line->fk_product > 0)
{
- // Define output language
+ $product_static = new Product($this->db);
+
+ $product_static->type=$line->fk_product_type;
+ $product_static->id=$line->fk_product;
+ $product_static->ref=$line->ref;
+ $text=$product_static->getNomUrl(1);
+
+ // Define output language (TODO Does this works ?)
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
{
$this->fetch_thirdparty();
$prod = new Product($this->db);
+ $prod->fetch($line->fk_product);
$outputlangs = $langs;
$newlang='';
diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php
new file mode 100644
index 00000000000..2acb83e3f05
--- /dev/null
+++ b/htdocs/core/class/html.formcron.class.php
@@ -0,0 +1,93 @@
+
+*
+* 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 2 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 .
+*/
+
+/**
+ * \file cron/class/html.formcron.class.php
+* \brief Fichier de la classe des fonctions predefinie de composants html cron
+*/
+
+
+/**
+ * Class to manage building of HTML components
+*/
+class FormCron extends Form
+{
+ var $db;
+ var $error;
+
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ */
+ function __construct($db)
+ {
+ $this->db = $db;
+ return 1;
+ }
+
+
+ /**
+ * Display On Off selector
+ *
+ * @param string $htmlname Html control name
+ * @param string $selected selected value
+ * @param string $readonly Select is read only or not
+ * @return string HTML select field
+ */
+ function select_typejob($htmlname,$selected=0,$readonly=0)
+ {
+ global $langs;
+
+ $langs->load('cron@cron');
+ if (!empty($readonly)) {
+ if ($selected=='command') {
+ $out= $langs->trans('CronType_command');
+ $out.='';
+ $out.= '';
+ $out.='';
+ } elseif ($selected=='method') {
+ $out= $langs->trans('CronType_method');
+ $out.='';
+ $out.= '';
+ $out.='';
+ }
+ }else {
+
+ $out='';
+
+ if ($selected=='command') {
+ $selected_attr=' selected=\"selected\" ';
+ } else {
+ $selected_attr='';
+ }
+ $out.= '';
+
+ if ($selected=='method') {
+ $selected_attr=' selected=\"selected\" ';
+ } else {
+ $selected_attr='';
+ }
+ $out.= '';
+
+ $out.='';
+ }
+
+ return $out;
+ }
+}
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 8ba3a161712..f06e8027e5f 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -90,6 +90,11 @@ function societe_prepare_head($object)
$head[$h][2] = 'note';
$h++;
+ $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
+ $head[$h][1] = $langs->trans("Referers");
+ $head[$h][2] = 'consumption';
+ $h++;
+
// Attached files
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
new file mode 100644
index 00000000000..abd85131e29
--- /dev/null
+++ b/htdocs/core/lib/cron.lib.php
@@ -0,0 +1,71 @@
+
+ *
+ * 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 .
+ */
+/**
+ * \file cron/lib/cron.lib.php
+ * \brief Ensemble de fonctions de base pour le module jobs
+ * \ingroup jobs
+ */
+
+/**
+ * Return array of tabs to used on pages for third parties cards.
+ *
+ * @param Object $object Object company shown
+ * @return array Array of tabs
+ */
+
+function cronadmin_prepare_head()
+{
+ global $langs, $conf, $user;
+ $h = 0;
+ $head = array();
+
+ $head[$h][0] = dol_buildpath('/cron/admin/cron.php', 1);
+ $head[$h][1] = $langs->trans("CronSetup");
+ $head[$h][2] = 'setup';
+ $h++;
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'cronadmin');
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'cronadmin', 'remove');
+
+
+ return $head;
+}
+
+function cron_prepare_head($object)
+{
+ global $langs, $conf, $user;
+ $h = 0;
+ $head = array();
+
+ $head[$h][0] = dol_buildpath('/cron/card.php', 1).'?id='.$object->id;
+ $head[$h][1] = $langs->trans("CronTask");
+ $head[$h][2] = 'card';
+ $h++;
+
+ $head[$h][0] = dol_buildpath('/cron/info.php', 1).'?id='.$object->id;
+ $head[$h][1] = $langs->trans("CronInfoPage");
+ $head[$h][2] = 'info';
+ $h++;
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'cron');
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'cron', 'remove');
+
+ return $head;
+}
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index c07360abd10..64f415ac085 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -805,17 +805,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
}
// Compta simple
- if (! empty($conf->comptabilite->enabled) && ! empty($conf->global->FACTURE_VENTILATION))
+ if (! empty($conf->comptabilite->enabled) && ($conf->global->MAIN_FEATURES_LEVEL >= 2))
{
$newmenu->add("/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire, '', $mainmenu, 'ventil');
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/lignes.php",$langs->trans("Dispatched"),1,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/",$langs->trans("Setup"),1,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/comptes/fiche.php?action=create",$langs->trans("New"),2,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/comptes/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/",$langs->trans("Export"),1,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/index.php?action=export",$langs->trans("New"),2,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->lire);
}
// Compta expert
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
index 56e0d90fdb3..39c70faab79 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
@@ -546,10 +546,10 @@ class pdf_expedition_merou extends ModelePdfExpedition
$object->GetUrlTrackingStatus($object->tracking_number);
if (! empty($object->tracking_url))
{
- if ($object->expedition_method_id > 0)
+ if ($object->shipping_method_id > 0)
{
// Get code using getLabelFromKey
- $code=$outputlangs->getLabelFromKey($this->db,$object->expedition_method_id,'c_shipment_mode','rowid','code');
+ $code=$outputlangs->getLabelFromKey($this->db,$object->shipping_method_id,'c_shipment_mode','rowid','code');
$label=$outputlangs->trans("SendingMethod".strtoupper($code))." :";
}
else
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
index 172966b89cf..368527612f1 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
@@ -189,10 +189,10 @@ class pdf_expedition_rouget extends ModelePdfExpedition
$object->GetUrlTrackingStatus($object->tracking_number);
if (! empty($object->tracking_url))
{
- if ($object->expedition_method_id > 0)
+ if ($object->shipping_method_id > 0)
{
// Get code using getLabelFromKey
- $code=$outputlangs->getLabelFromKey($this->db,$object->expedition_method_id,'c_shipment_mode','rowid','code');
+ $code=$outputlangs->getLabelFromKey($this->db,$object->shipping_method_id,'c_shipment_mode','rowid','code');
$label=$outputlangs->trans("LinkToTrackYourPackage")." ";
$label.=$outputlangs->trans("SendingMethod".strtoupper($code))." :";
$pdf->SetFont('','B', $default_font_size - 2);
diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php
index 1bae9f61129..832d96a194b 100644
--- a/htdocs/core/modules/modBanque.class.php
+++ b/htdocs/core/modules/modBanque.class.php
@@ -65,7 +65,7 @@ class modBanque extends DolibarrModules
// Config pages
//-------------
- $this->config_page_url = array("bank.php@compta/bank");
+ $this->config_page_url = array("bank.php");
// Dependancies
$this->depends = array();
diff --git a/htdocs/core/modules/modCommissions.class.php b/htdocs/core/modules/modCommissions.class.php
deleted file mode 100644
index 64908f5248c..00000000000
--- a/htdocs/core/modules/modCommissions.class.php
+++ /dev/null
@@ -1,169 +0,0 @@
-
- * Copyright (C) 2012 Laurent Destailleur
- *
- * 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 .
- */
-
-/**
- * \defgroup commissions Module commissions
- * \brief Module commissions
- * \file htdocs/core/modules/modCommissions.class.php
- * \ingroup commissions
- * \brief Description and activation file for module Commissions
- */
-include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
-
-
-/**
- * Class to describe modude Commisions
- */
-class modCommissions extends DolibarrModules
-{
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- */
- function __construct($db)
- {
- $this->db = $db;
-
- // Id for module (must be unique).
- // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
- $this->numero = 60000;
- // Key text used to identify module (for permissions, menus, etc...)
- $this->rights_class = 'Commissions';
-
- // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
- // It is used to group modules in module setup page
- $this->family = "financial";
- // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
- $this->name = preg_replace('/^mod/i','',get_class($this));
- // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
- $this->description = "Commissions management";
- // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
- $this->version = 'experimental';
- // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
- $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
- // Where to store the module in setup page (0=common,1=interface,2=other)
- $this->special = 2;
- // Name of png file (without png) used for this module.
- // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
- $this->picto='commissions';
-
- // Data directories to create when module is enabled.
- $this->dirs = array();
-
- // Config pages. Put here list of php page names stored in admmin directory used to setup module.
- $this->config_page_url = array("commissions.php@commissions");
-
- // Dependencies
- $this->depends = array("modFacture", "modMargin"); // List of modules id that must be enabled if this module is enabled
- $this->requiredby = array(); // List of modules id to disable if this one is disabled
- $this->phpmin = array(5,1); // Minimum version of PHP required by module
- $this->need_dolibarr_version = array(3,2); // Minimum version of Dolibarr required by module
- $this->langfiles = array("commissions");
-
- // Constants
- $this->const = array(0=>array('COMMISSION_BASE',"chaine","TURNOVER",'Default commission base',0)); // List of particular constants to add when module is enabled
-
- // New pages on tabs
- $this->tabs = array();
-
- // Boxes
- $this->boxes = array(); // List of boxes
- $r=0;
-
- // Permissions
- $this->rights = array(); // Permission array used by this module
- $r=0;
-
- // Add here list of permission defined by an id, a label, a boolean and two constant strings.
- // Example:
- // $this->rights[$r][0] = 2000; // Permission id (must not be already used)
- // $this->rights[$r][1] = 'Permision label'; // Permission label
- // $this->rights[$r][3] = 1; // Permission by default for new user (0/1)
- // $this->rights[$r][4] = 'level1'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
- // $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
- // $r++;
-
-
- // Main menu entries
- $this->menu = array(); // List of menus to add
- $r = 0;
-
- // left menu entry
- $this->menu[$r]=array(
- 'fk_menu'=>'fk_mainmenu=accountancy', // Put 0 if this is a top menu
- 'type'=>'left', // This is a Top menu entry
- 'titre'=>'Commissions',
- 'mainmenu'=>'accountancy',
- 'leftmenu'=>'commissions', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school).
- 'url'=>'/commissions/index.php',
- 'langs'=>'commissions', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>200,
- 'enabled'=>'$conf->commissions->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
- 'perms'=>'1', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
- $r++;
- }
-
- /**
- * Function called when module is enabled.
- * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
- * It also creates data directories.
- *
- * @return int 1 if OK, 0 if KO
- */
- function init()
- {
- $sql = array();
-
- $result=$this->load_tables();
-
- return $this->_init($sql);
- }
-
- /**
- * Function called when module is disabled.
- * Remove from database constants, boxes and permissions from Dolibarr database.
- * Data directories are not deleted.
- *
- * @return int 1 if OK, 0 if KO
- */
- function remove()
- {
- $sql = array();
-
- return $this->_remove($sql);
- }
-
-
- /**
- * Create tables and keys required by module
- * Files mymodule.sql and mymodule.key.sql with create table and create keys
- * commands must be stored in directory /mymodule/sql/
- * This function is called by this->init.
- *
- * @return int <=0 if KO, >0 if OK
- */
- function load_tables()
- {
- return;
- }
-}
-
-?>
diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php
index fbc14945f02..53d9afabf30 100644
--- a/htdocs/core/modules/modCron.class.php
+++ b/htdocs/core/modules/modCron.class.php
@@ -1,5 +1,6 @@
+/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
+ * Copyright (C) 2013 Florian Henry
*
* 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
@@ -16,11 +17,11 @@
*/
/**
- * \defgroup webservices Module webservices
- * \brief Module to enable the Dolibarr server of web services
- * \file htdocs/core/modules/modCron.class.php
- * \ingroup cron
- * \brief File to describe cron module
+ * \defgroup cron Module cron
+ * \brief cron module descriptor.
+ * \file cron/core/modules/modCron.class.php
+ * \ingroup cron
+ * \brief Description and activation file for module Jobs
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
@@ -65,11 +66,20 @@ class modCron extends DolibarrModules
//-------------
$this->depends = array();
$this->requiredby = array();
- $this->langfiles = array("cron");
+ $this->langfiles = array("cron@cron");
// Constantes
//-----------
- $this->const = array();
+ $this->const = array(
+ 0=>array(
+ 'MAIN_CRON_KEY',
+ 'chaine',
+ '',
+ 'CRON KEY',
+ 0,
+ 'main',
+ 0
+ ),);
// New pages on tabs
// -----------------
@@ -79,25 +89,60 @@ class modCron extends DolibarrModules
//------
$this->boxes = array();
- // Permissions
- //------------
- $this->rights = array();
- $this->rights_class = 'cron';
- $r=0;
+ // Permissions
+ $this->rights = array(); // Permission array used by this module
+ $this->rights_class = 'cron';
+ $r=0;
+
+ $this->rights[$r][0] = 23001;
+ $this->rights[$r][1] = 'Read cron jobs';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'read';
+ $r++;
+
+ $this->rights[$r][0] = 23002;
+ $this->rights[$r][1] = 'Create cron Jobs';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'create';
+ $r++;
+
+ $this->rights[$r][0] = 23003;
+ $this->rights[$r][1] = 'Delete cron Jobs';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'delete';
+ $r++;
+
+ $this->rights[$r][0] = 23004;
+ $this->rights[$r][1] = 'Execute cron Jobs';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'execute';
+ $r++;
// Main menu entries
$r=0;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
- 'titre'=>'CronJobs',
- 'url'=>'/cron/index.php',
- 'langs'=>'cron@cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>100,
+ 'titre'=>'CronListActive',
+ 'url'=>'/cron/list.php?status=1',
+ 'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>200,
'enabled'=>'$leftmenu==\'modulesadmintools\'', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'$user->admin', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
+
+ $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'CronListInactive',
+ 'url'=>'/cron/list.php?status=0',
+ 'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>201,
+ 'enabled'=>'$leftmenu==\'modulesadmintools\'', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $r++;
}
@@ -114,8 +159,6 @@ class modCron extends DolibarrModules
// Prevent pb of modules not correctly disabled
//$this->remove($options);
- $sql = array();
-
return $this->_init($sql,$options);
}
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index abaef7a1910..051f4f98071 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
+ * To use this template, the following var must be defined
+ * $type, $text, $description, $line
*/
?>
@@ -38,59 +40,59 @@
description)
{
- if ($line->description == '(CREDIT_NOTE)')
- {
- $discount=new DiscountAbsolute($this->db);
- $discount->fetch($line->fk_remise_except);
- echo ($txt?' - ':'').$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
- }
- elseif ($line->description == '(DEPOSIT)')
- {
- $discount=new DiscountAbsolute($this->db);
- $discount->fetch($line->fk_remise_except);
- echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
- // Add date of deposit
- if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
- }
- else
- {
- echo ($txt?' - ':'').dol_htmlentitiesbr($line->description);
- }
+ if ($line->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)
+ {
+ $discount=new DiscountAbsolute($this->db);
+ $discount->fetch($line->fk_remise_except);
+ echo ($txt?' - ':'').$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
+ }
+ elseif ($line->description == '(DEPOSIT)' && $objp->fk_remise_except > 0)
+ {
+ $discount=new DiscountAbsolute($this->db);
+ $discount->fetch($line->fk_remise_except);
+ echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
+ // Add date of deposit
+ if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
+ }
+ else
+ {
+ echo ($txt?' - ':'').dol_htmlentitiesbr($line->description);
}
}
- else
- {
- if ($line->fk_product > 0) {
+ }
+ else
+ {
+ if ($line->fk_product > 0) {
- echo $form->textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
+ echo $form->textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
- // Show range
- print_date_range($line->date_start, $line->date_end);
+ // Show range
+ echo get_date_range($line->date_start, $line->date_end);
- // Add description in form
- if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
- {
- print (! empty($line->description) && $line->description!=$line->product_label)?' '.dol_htmlentitiesbr($line->description):'';
- }
+ // Add description in form
+ if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
+ {
+ print (! empty($line->description) && $line->description!=$line->product_label)?' '.dol_htmlentitiesbr($line->description):'';
+ }
+ } else {
+
+ if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
+ if ($type==1) $text = img_object($langs->trans('Service'),'service');
+ else $text = img_object($langs->trans('Product'),'product');
+
+ if (! empty($line->label)) {
+ $text.= ' '.$line->label.'';
+ echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
} else {
-
- if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
- if ($type==1) $text = img_object($langs->trans('Service'),'service');
- else $text = img_object($langs->trans('Product'),'product');
-
- if (! empty($line->label)) {
- $text.= ' '.$line->label.'';
- echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
- } else {
- echo $text.' '.dol_htmlentitiesbr($line->description);
- }
-
- // Show range
- print_date_range($line->date_start,$line->date_end);
+ echo $text.' '.dol_htmlentitiesbr($line->description);
}
+
+ // Show range
+ echo get_date_range($line->date_start,$line->date_end);
}
- ?>
+ }
+ ?>
tva_tx,'%',$line->info_bits); ?>
diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php
index fd77bcc6851..894e9dc4457 100644
--- a/htdocs/cron/admin/cron.php
+++ b/htdocs/cron/admin/cron.php
@@ -1,34 +1,36 @@
* Copyright (C) 2005-2013 Laurent Destailleur
- * Copyright (C) 2011 Juanjo Menent
- * Copyright (C) 2012 Regis Houssin
- *
- * 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 .
- */
+* Copyright (C) 2011 Juanjo Menent
+* Copyright (C) 2012 Regis Houssin
+* Copyright (C) 2013 Florian Henry
+*
+* 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 .
+*/
/**
- * \file htdocs/cron/admin/cron.php
- * \ingroup cron
- * \brief Page to setup cron module
- */
+ * \file cron/admin/cron.php
+* \ingroup cron
+*/
-require '../../main.inc.php';
+// Dolibarr environment
+$res = @include("../../main.inc.php"); // From htdocs directory
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
-$langs->load("admin");
-$langs->load("cron");
+$langs->load("admin");
+$langs->load("cron");
if (! $user->admin)
accessforbidden();
@@ -36,37 +38,40 @@ if (! $user->admin)
$actionsave=GETPOST("save");
// Sauvegardes parametres
-if ($actionsave)
+if (!empty($actionsave))
{
- $i=0;
+ $i=0;
- $db->begin();
+ $db->begin();
- $i+=dolibarr_set_const($db,'CRON_KEY',trim(GETPOST("CRON_KEY")),'chaine',0,'',$conf->entity);
+ $i+=dolibarr_set_const($db,'MAIN_CRON_KEY',trim(GETPOST("MAIN_CRON_KEY")),'chaine',0,'',0);
- if ($i >= 1)
- {
- $db->commit();
- setEventMessage($langs->trans("SetupSaved"));
- }
- else
- {
- $db->rollback();
- setEventMessage($langs->trans("Error"), 'errors');
- }
+ if ($i >= 1)
+ {
+ $db->commit();
+ setEventMessage($langs->trans("SetupSaved"));
+ }
+ else
+ {
+ $db->rollback();
+ setEventMessage($langs->trans("Error"), 'errors');
+ }
}
/*
* View
- */
+*/
llxHeader();
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("CronSetup"),$linkback,'setup');
-print $langs->trans("CronDesc")." \n";
+// Configuration header
+$head = cronadmin_prepare_head();
+dol_fiche_head($head,'setup',$langs->trans("Module2300Name"),0,'cron');
+
print " \n";
print '
';
-print '';
-
-
-// End of page
-llxFooter();
-$db->close();
-?>
diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php
new file mode 100644
index 00000000000..55c294d54ed
--- /dev/null
+++ b/htdocs/cron/info.php
@@ -0,0 +1,59 @@
+
+*
+* 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, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * \file /cron/cron/info.php
+ * \brief Page fiche d'une operation
+ */
+
+require '../main.inc.php';
+
+require_once DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php";
+require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+
+
+// Security check
+if (!$user->rights->cron->read) accessforbidden();
+
+$id=GETPOST('id','int');
+
+$mesg = '';
+
+/*
+ * View
+*/
+
+llxHeader('',$langs->trans("CronInfo"));
+
+$object = new Cronjob($db);
+$object->fetch($id);
+$object->info($id);
+
+$head = cron_prepare_head($object);
+
+dol_fiche_head($head, 'info', $langs->trans("CronTask"), 0, 'bill');
+
+print '
';
+dol_print_object_info($object);
+print '
';
+print '';
+
+
+$db->close();
+llxFooter();
\ No newline at end of file
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
new file mode 100644
index 00000000000..5e972f0e55b
--- /dev/null
+++ b/htdocs/cron/list.php
@@ -0,0 +1,295 @@
+
+ *
+ * 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 .
+ */
+
+/**
+ * \file cron/cron/list.php
+ * \ingroup cron
+ * \brief Lists Jobs
+ */
+
+
+require '../main.inc.php';
+require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
+
+// librairie jobs
+require_once DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php";
+require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
+
+$langs->load("admin");
+$langs->load("cron");
+
+if (!$user->rights->cron->read) accessforbidden();
+
+/*
+ * Actions
+ */
+$action=GETPOST('action','alpha');
+$confirm=GETPOST('confirm','alpha');
+$id=GETPOST('id','int');
+
+$sortorder=GETPOST('sortorder','alpha');
+$sortfield=GETPOST('sortfield','alpha');
+$page=GETPOST('page','int');
+$status=GETPOST('status','int');
+
+//Search criteria
+$search_label=GETPOST("search_label",'alpha');
+
+if (empty($sortorder)) $sortorder="DESC";
+if (empty($sortfield)) $sortfield="t.datenextrun";
+if (empty($arch)) $arch = 0;
+
+if ($page == -1) {
+ $page = 0 ;
+}
+
+$limit = $conf->global->MAIN_SIZE_LISTE_LIMIT;
+$offset = $limit * $page ;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+
+// Do we click on purge search criteria ?
+if (GETPOST("button_removefilter_x"))
+{
+ $search_label='';
+}
+
+$filter=array();
+if (!empty($search_label)) {
+ $filter['t.label']=$search_label;
+}
+
+// Delete jobs
+if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete){
+
+ //Delete de la tache cron
+ $object = new Cronjob($db);
+ $object->id=$id;
+ $result = $object->delete($user);
+
+ if ($result < 0) {
+ setEventMessage($object->error,'errors');
+ }
+}
+
+// Execute jobs
+if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute){
+
+ //Execute jobs
+ $object = new Cronjob($db);
+ $job = $object->fetch($id);
+
+ $result = $object->run_jobs($user->login);
+ if ($result < 0) {
+ setEventMessage($object->error,'errors');
+ }
+
+}
+
+
+/*
+ * View
+ */
+if (!empty($status)) {
+ $pagetitle=$langs->trans("CronListActive");
+}else {
+ $pagetitle=$langs->trans("CronListInactive");
+}
+
+llxHeader('',$pagetitle);
+
+
+// Form object for popup
+$form = new Form($db);
+
+if ($action == 'delete')
+{
+ $ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
+ if ($ret == 'html') print ' ';
+}
+
+if ($action == 'execute'){
+ $ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
+ if ($ret == 'html') print ' ';
+}
+
+
+print_fiche_titre($pagetitle,'','setup');
+
+print $langs->trans('CronInfo');
+
+// liste des jobs creer
+$object = new Cronjob($db);
+$result=$object->fetch_all($sortorder, $sortfield, $limit, $offset, $status, $filter);
+if ($result < 0) {
+ setEventMessage($object->error,'errors');
+}
+
+
+print "
';
}
else
{
- if ($object->expedition_method_id > 0)
+ if ($object->shipping_method_id > 0)
{
// Get code using getLabelFromKey
- $code=$langs->getLabelFromKey($db,$object->expedition_method_id,'c_shipment_mode','rowid','code');
+ $code=$langs->getLabelFromKey($db,$object->shipping_method_id,'c_shipment_mode','rowid','code');
print $langs->trans("SendingMethod".strtoupper($code));
}
}
diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
index d5fb257cead..9728e9d4a29 100755
--- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
+++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
@@ -81,6 +81,7 @@ alter table llx_socpeople CHANGE COLUMN cp zip varchar(10);
alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text;
alter table llx_societe_address CHANGE COLUMN ville town text;
alter table llx_societe_address CHANGE COLUMN cp zip varchar(10);
+alter table llx_expedition CHANGE COLUMN fk_expedition_methode fk_shipping_method integer;
ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL DEFAULT '' AFTER description;
@@ -153,7 +154,43 @@ ALTER TABLE llx_holiday ADD COLUMN note_public text;
-- Add new trigger on Invoice BILL_UNVALIDATE + Index
INSERT INTO llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (28,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10);
-ALTER TABLE llx_c_action_trigger ADD INDEX idx_action_trigger_rang (rang)
+ALTER TABLE llx_c_action_trigger ADD INDEX idx_action_trigger_rang (rang);
+
+
+ALTER TABLE llx_facture_fourn_det ADD COLUMN fk_code_ventilation integer DEFAULT 0 NOT NULL;
+ALTER TABLE llx_facturedet DROP COLUMN fk_export_compta;
+
+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;
+
ALTER TABLE llx_societe MODIFY COLUMN zip varchar(25);
diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql
index 5a8e33ef38f..a5bb3c10f59 100644
--- a/htdocs/install/mysql/tables/llx_cronjob.sql
+++ b/htdocs/install/mysql/tables/llx_cronjob.sql
@@ -1,32 +1,52 @@
--- ===================================================================
--- Copyright (C) 2013 Laurent Destailleur
---
--- 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 .
---
--- ===================================================================
-
-create table llx_cronjob
-(
- rowid integer AUTO_INCREMENT PRIMARY KEY,
- tms timestamp,
- datec datetime,
- command varchar(256),
- params text,
- frequency varchar(24),
- datelastrun datetime,
- lastresult date,
- lastoutput text,
- fk_user integer DEFAULT NULL,
- note text
-)ENGINE=innodb;
+-- ===================================================================
+-- Copyright (C) 2013 Laurent Destailleur
+-- Copyright (C) 2013 Florian Henry
+--
+-- 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 .
+--
+-- ===================================================================
+
+
+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;
+
+
diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
index 16dacbbb336..325950a4e46 100644
--- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
+++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
@@ -43,5 +43,6 @@ create table llx_facture_fourn_det
product_type integer DEFAULT 0,
date_start datetime DEFAULT NULL, -- date debut si service
date_end datetime DEFAULT NULL, -- date fin si service
+ fk_code_ventilation integer DEFAULT 0 NOT NULL,
import_key varchar(14)
)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql
index 847178d8330..949dee1933c 100644
--- a/htdocs/install/mysql/tables/llx_facturedet.sql
+++ b/htdocs/install/mysql/tables/llx_facturedet.sql
@@ -51,7 +51,6 @@ create table llx_facturedet
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
fk_product_fournisseur_price integer DEFAULT NULL, -- reference prix fournisseur
fk_code_ventilation integer DEFAULT 0 NOT NULL,
- fk_export_compta integer DEFAULT 0 NOT NULL,
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0, -- ordre d'affichage
import_key varchar(14)
diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql
index 6787aee87fd..00680f29d69 100644
--- a/htdocs/install/mysql/tables/llx_paiement.sql
+++ b/htdocs/install/mysql/tables/llx_paiement.sql
@@ -18,10 +18,6 @@
--
-- ===================================================================
-
--- Satut, 0 ou 1, 1 n'est plus supprimable
--- fk_export_compta 0 pas exporte
-
create table llx_paiement
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
@@ -36,7 +32,6 @@ create table llx_paiement
fk_bank integer NOT NULL DEFAULT 0,
fk_user_creat integer, -- utilisateur qui a cree l'info
fk_user_modif integer, -- utilisateur qui a modifie l'info
- statut smallint DEFAULT 0 NOT NULL,
- fk_export_compta integer DEFAULT 0 NOT NULL
-
+ statut smallint DEFAULT 0 NOT NULL, -- Satut, 0 ou 1, 1 n'est plus supprimable
+ fk_export_compta integer DEFAULT 0 NOT NULL -- fk_export_compta 0 pas exporte
)ENGINE=innodb;
diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql
index 0c7f39025f9..b1f9282b6bf 100644
--- a/htdocs/install/pgsql/functions/functions.sql
+++ b/htdocs/install/pgsql/functions/functions.sql
@@ -116,3 +116,4 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_tva FOR EACH ROW EXE
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_usergroup FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cronjob FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
diff --git a/htdocs/langs/ar_SA/main.lang b/htdocs/langs/ar_SA/main.lang
index 5befea18b77..f273f913d04 100644
--- a/htdocs/langs/ar_SA/main.lang
+++ b/htdocs/langs/ar_SA/main.lang
@@ -428,8 +428,6 @@ NbOfThirdParties=عدد من الأطراف الثالثة
NbOfCustomers=عدد من العملاء
NbOfLines=عدد الخطوط
NbOfObjects=عدد الأجسام
-NbOfReferers=عدد referers
-Referers=Referers
TotalQuantity=الكمية الإجمالية
DateFromTo=ل٪ من ق ق ٪
DateFrom=من ق ٪
diff --git a/htdocs/langs/ar_SA/members.lang b/htdocs/langs/ar_SA/members.lang
index 570dfab4069..6b16226f9e5 100644
--- a/htdocs/langs/ar_SA/members.lang
+++ b/htdocs/langs/ar_SA/members.lang
@@ -152,7 +152,7 @@ ShowTypeCard=وتبين من نوع '٪ ق'
HTPasswordExport=الملف htpassword جيل
NoThirdPartyAssociatedToMember=لم يرتبط بها من طرف ثالث لهذا العضو
ThirdPartyDolibarr=Dolibarr طرف ثالث
-MembersAndSubscriptions=وأعضاء Suscriptions
+MembersAndSubscriptions=وأعضاء Subscriptions
// Date 2009-08-11 13:27:01
// STOP - Lines generated via parser
diff --git a/htdocs/langs/bg_BG/members.lang b/htdocs/langs/bg_BG/members.lang
index c2fabf1da50..88d614bb1ad 100644
--- a/htdocs/langs/bg_BG/members.lang
+++ b/htdocs/langs/bg_BG/members.lang
@@ -163,7 +163,7 @@ ShowTypeCard=Покажи тип "%s"
HTPasswordExport=htpassword файл поколение
NoThirdPartyAssociatedToMember=Никоя трета страна, свързана с този потребител
ThirdPartyDolibarr=Dolibarr трета страна
-MembersAndSubscriptions=Членове и Suscriptions
+MembersAndSubscriptions=Членове и Subscriptions
MoreActions=Допълнително действие на запис
MoreActionBankDirect=Създаване на директен запис на сделката по сметка
MoreActionBankViaInvoice=Създаване на фактура и плащане по сметка
diff --git a/htdocs/langs/ca_ES/commissions.lang b/htdocs/langs/ca_ES/commissions.lang
deleted file mode 100644
index da97a4066f2..00000000000
--- a/htdocs/langs/ca_ES/commissions.lang
+++ /dev/null
@@ -1,41 +0,0 @@
-# Dolibarr language file - ca_ES - commissions
-CHARSET=UTF-8
-
-Module60000Desc=Gestió de comissions
-commissionsSetup=Configuració de la gestió de comissions
-
-ProductCommissionRate=Taxa de comissió sobre els productes
-ServiceCommissionRate=Taxa de comissió sobre els serveis
-
-ProductCommissionRateDetails=Taxa usada per calcular les comissions sobre les vendes de productes
-ServiceCommissionRateDetails=Taxa usada per calcular les comissions sobre les vendes de serveis
-
-Commissions=Comissions
-CommissionDetails=Detall de comissions
-
-IncludeUnpayedInvoices=Incloure les factures no cobrades
-TotalCommission=Total comissions
-
-ProductMargin=Marge / productes
-ServiceMargin=Marge / serveis
-
-CommissionRate=Taxes comissions
-
-ProductCommission=Comissió / productes
-ServiceCommission=Comissió / serveis
-
-CommissionBase=Base de càlcul de comissions
-CommissionBasedOnTurnover=Comissions calculades sobre el volum de venda
-CommissionBasedOnMargins=Comissions calculades sobre els marges
-CommissionBaseDetails=Estableix el mètode de càlcul de les comissions
-CommissionBasedOnMarginsDetails=El càlcul basat en els marges requereix l'activació del mòdul marges
-
-TurnoverTotal = Volum de vendes sense IVA
-ProductTurnover=Vendes sense IVA / productes
-ServiceTurnover=Vendes sense IVA / serveis
-
-CommercialAgent=Agent comercial
-
-StartDate=Data d'inici
-EndDate=Data de fi
-Launch=Començar
\ No newline at end of file
diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang
index 39ee41a4ca9..a0a49bb243c 100644
--- a/htdocs/langs/ca_ES/orders.lang
+++ b/htdocs/langs/ca_ES/orders.lang
@@ -84,8 +84,8 @@ NumberOfOrdersByMonth=Nombre de comandes per mes
AmountOfOrdersByMonthHT=Import total de comandes per mes (Sense IVA)
ListOfOrders=Llistat de comandes
CloseOrder=Tancar comanda
-ConfirmCloseOrder=Esteu segur de voler tancar aquesta comanda? Un cop tancat, haurà de facturar-se
-ConfirmCloseOrderIfSending=Esteu segur de voler tancar aquesta comanda? No ha de tancar una comanda que encara no té els seus productes enviats
+ConfirmCloseOrder=Esteu segur que voleu classificar aquesta comanda com a enviat? Un cop enviat una comanda, només podrà facturar-se
+ConfirmCloseOrderIfSending=Esteu segur que voleu tancar aquesta comanda? Només hauria de tancar una comanda quan aquesta hagi estat enviada completament.
ConfirmDeleteOrder=Esteu segur de voler eliminar aquest comanda?
ConfirmValidateOrder=Esteu segur de voler validar aquesta comanda sota la referència %s ?
ConfirmUnvalidateOrder=Esteu segur de voler restaurar la comanda %s a l'estat esborrany?
diff --git a/htdocs/langs/da_DK/members.lang b/htdocs/langs/da_DK/members.lang
index c2975ad715c..9492f48514a 100644
--- a/htdocs/langs/da_DK/members.lang
+++ b/htdocs/langs/da_DK/members.lang
@@ -161,7 +161,7 @@ MemberId=Medlem id
PaymentSubscription=Nye bidrag betaling
NoThirdPartyAssociatedToMember=Nr. tredjepart forbundet til dette medlem
ThirdPartyDolibarr=Dolibarr tredjepart
-MembersAndSubscriptions=Medlemmer og Suscriptions
+MembersAndSubscriptions=Medlemmer og Subscriptions
// STOP - Lines generated via autotranslator.php tool (2009-08-13 20:39:59).
diff --git a/htdocs/langs/el_GR/members.lang b/htdocs/langs/el_GR/members.lang
index 8343aff155c..270e3cd1f1e 100644
--- a/htdocs/langs/el_GR/members.lang
+++ b/htdocs/langs/el_GR/members.lang
@@ -152,7 +152,7 @@ ShowTypeCard=Show type '%s'
HTPasswordExport=htpassword file generation
NoThirdPartyAssociatedToMember=No third party associated to this member
ThirdPartyDolibarr=Dolibarr third party
-MembersAndSubscriptions= Members and Suscriptions
+MembersAndSubscriptions= Members and Subscriptions
MoreActions=Complementary action on recording
MoreActionBankDirect=Create a direct transaction record on account
MoreActionBankViaInvoice=Create an invoice and payment on account
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5e632efbe1e..a9aae951692 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -369,7 +369,7 @@ Module1Desc=Companies and contact management (customers, prospects...)
Module2Name=Commercial
Module2Desc=Commercial management
Module10Name=Accounting
-Module10Desc=Simple accounting management (invoice and payment dispatching)
+Module10Desc=Simple accounting reports (journals, turnover) based onto database content. No dispatching.
Module20Name=Proposals
Module20Desc=Commercial proposal management
Module22Name=Mass E-mailings
@@ -672,6 +672,10 @@ Permission1237=Export supplier orders and their details
Permission1251=Run mass imports of external data into database (data load)
Permission1321=Export customer invoices, attributes and payments
Permission1421=Export customer orders and attributes
+Permission23001 = Read Scheduled task
+Permission23002 = Create/update Scheduled task
+Permission23003 = Delete Scheduled task
+Permission23004 = Execute Scheduled task
Permission2401=Read actions (events or tasks) linked to his account
Permission2402=Create/modify actions (events or tasks) linked to his account
Permission2403=Delete actions (events or tasks) linked to his account
diff --git a/htdocs/langs/en_US/commissions.lang b/htdocs/langs/en_US/commissions.lang
deleted file mode 100644
index 776f4d0c1a1..00000000000
--- a/htdocs/langs/en_US/commissions.lang
+++ /dev/null
@@ -1,44 +0,0 @@
-# Dolibarr language file - fr_FR - commissions
-CHARSET=UTF-8
-
-Module60000Desc=Commissions management
-commissionsSetup=Commissions management setup
-
-ProductCommissionRate=Commission rate on products
-ServiceCommissionRate=Commission rate on services
-
-ProductCommissionRateDetails=Commission rate on product sales
-ServiceCommissionRateDetails=Commission rate on service sales
-
-Commissions=Commissions
-CommissionDetails=Commissions details
-
-IncludeUnpayedInvoices=Include overdue invoices
-TotalCommission=Commissions subtotal
-
-ProductMargin=Margin / products
-ServiceMargin=Margin / services
-
-CommissionRate=Commission rate
-
-ProductCommission=Commission / produics
-ServiceCommission=Commission / services
-
-CommissionBase=Commissions base
-CommissionBasedOnTurnover=Commissions based on turnover
-CommissionBasedOnMargins=Commissions based on margins
-CommissionBaseDetails=Define calculation method for commissions
-CommissionBasedOnMarginsDetails=Commissions based on margins needs margin module activation.
-
-TurnoverTotal = Total turrnover
-ProductTurnover=Product turnover
-ServiceTurnover=Service turnover
-
-CommercialAgent=Commercial agent
-
-StartDate=Start date
-EndDate=End date
-Launch=Start
-
-AgentContactType=Contact type used for commissioning
-AgentContactTypeDetails=Défine what contact type (linked on invoices) will be associated with commercial agents
\ No newline at end of file
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 1ce5db6ccd4..0ae15edba41 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -392,6 +392,7 @@ UniqueThirdParties=Total of unique third parties
InActivity=Open
ActivityCeased=Closed
ActivityStateFilter=Activity status
+ProductsIntoElements=List of products into
# Monkey
MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0.
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index c38ccd07d68..538b4f1784a 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -149,4 +149,6 @@ WarningDepositsNotIncluded=Deposits invoices are not included in this version wi
DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date.
Pcg_version=Pcg version
Pcg_type=Pcg type
-Pcg_subtype=Pcg subtype
\ No newline at end of file
+Pcg_subtype=Pcg subtype
+InvoiceLinesToDispatch=Invoice lines to dispatch
+InvoiceDispatched=Dispatched invoices
\ No newline at end of file
diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang
index 4f504d34e59..c64c74f1f58 100644
--- a/htdocs/langs/en_US/cron.lang
+++ b/htdocs/langs/en_US/cron.lang
@@ -1,11 +1,87 @@
# Dolibarr language file - en_US - cron
CHARSET=UTF-8
-CronSetup=Cron scheduler setup
-CronDesc=This page can be used to setup options of the scheduler manager
+
+#
+# Admin
+#
+CronSetup= Configuration Scheduled task management
URLToLaunchCronJobs=URL to launch cron jobs
+OrToLaunchASpecificJob=Or to launch a specific job
KeyForCronAccess=Security key for URL to launch cron jobs
-DateLastRun=Last run
-LastOutput=Last run output
-LastResult=Last result code
-ListOfCronJobs=List of scheduled jobs
-Command=Command
\ No newline at end of file
+FileToLaunchCronJobs=Command to launch cron jobs
+CronExplainHowToRunUnix=On Unix environement you should use crontab to run Command line each minutes
+CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes
+
+#
+# Page list
+#
+CronDateLastRun=Last run
+CronLastOutput=Last run output
+CronLastResult=Last result code
+CronListOfCronJobs=List of scheduled jobs
+CronCommand=Command
+CronList= Job list
+CronDelete= Delete cron jobs
+CronConfirmDelete= Are you sure to delete this cron jobs ?
+CronExecute=Launch task
+CronConfirmExecute= Are you sure to execute this job now
+CronInfo= Jobs allow to execute task that have been planned
+CronWaitingJobs=Wainting jobs
+CronTask=Task
+CronNone= None
+CronDtStart=Start date
+CronDtEnd=End fin
+CronDtNextLaunch=Next execution
+CronDtLastLaunch=Last execution
+CronFrequency=Frequancy
+CronClass=Classe
+CronMethod=Method
+CronModule=Module
+CronAction=Action
+CronStatus=Status
+CronStatusActive=Active
+CronStatusInactive=Inactive
+CronNoJobs=No jobs registered
+CronPriority=Priority
+CronLabel=Description
+CronNbRun=Nb. launch
+
+#
+#Page card
+#
+CronAdd= Add jobs
+CronHourStart= Start Hour and date of task
+CronEvery= And execute task each
+CronObject= Instance/Object to create
+CronArgs=Parameters
+CronSaveSucess=Save succefully
+CronNote=Comment
+CronFieldMandatory=Fields %s is mandatory
+CronErrEndDateStartDt=End date cannot be before start date
+CronStatusActiveBtn=Active
+CronStatusInactiveBtn=Inactive
+CronTaskInactive=This task is inactive
+CronDtLastResult=Last result date
+CronId=Id
+CronClassFile=Classes (file name)
+CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of module is product
+CronClassFileHelp=The file name to load. For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of class file name is product.class.php
+CronObjectHelp=The object name to load. For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of class file name is Product
+CronMethodHelp=The object method to launch. For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of method is is fecth
+CronArgsHelp=The method arguments. For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of paramters can be 0, ProductRef
+CronCommandHelp=The system command line to execute.
+
+#
+# Info
+#
+CronInfoPage=Information
+
+
+#
+# Common
+#
+CronType=Task type
+CronType_method=Call method of a Dolibarr Class
+CronType_command=Shell command
+CronMenu=Cron
+CronCannotLoadClass=Cannot load class %s or object %s
\ No newline at end of file
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 0b82960dab2..99a60857e3d 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -487,7 +487,7 @@ NbOfCustomers=Number of customers
NbOfLines=Number of lines
NbOfObjects=Number of objects
NbOfReferers=Number of referrers
-Referers=Referrers
+Referers=Consumption
TotalQuantity=Total quantity
DateFromTo=From %s to %s
DateFrom=From %s
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index 77657563851..e1eda16c790 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -155,7 +155,7 @@ ShowTypeCard=Show type '%s'
HTPasswordExport=htpassword file generation
NoThirdPartyAssociatedToMember=No third party associated to this member
ThirdPartyDolibarr=Dolibarr third party
-MembersAndSubscriptions= Members and Suscriptions
+MembersAndSubscriptions= Members and Subscriptions
MoreActions=Complementary action on recording
MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription
MoreActionBankDirect=Create a direct transaction record on account
diff --git a/htdocs/langs/es_ES/commissions.lang b/htdocs/langs/es_ES/commissions.lang
deleted file mode 100644
index 2077ca5990c..00000000000
--- a/htdocs/langs/es_ES/commissions.lang
+++ /dev/null
@@ -1,41 +0,0 @@
-# Dolibarr language file - es_ES - commissions
-CHARSET=UTF-8
-
-Module60000Desc=Gestión de comisiones
-commissionsSetup=Configuración de la gestión de comisiones
-
-ProductCommissionRate=Tasa de comisión sobre los productos
-ServiceCommissionRate=Tasa de comisión sobre los servicios
-
-ProductCommissionRateDetails=Tasa usada para calcular las comisiones sobre las ventas de productos
-ServiceCommissionRateDetails=Tasa usada para calcular las comisiones sobre las ventas de servicios
-
-Commissions=Comisiones
-CommissionDetails=Detalle de comisiones
-
-IncludeUnpayedInvoices=Incluir las facturas no cobradas
-TotalCommission=Total comisiones
-
-ProductMargin=Margen / productos
-ServiceMargin=Margen / servicios
-
-CommissionRate=Tasas comisiones
-
-ProductCommission=Comisión / productos
-ServiceCommission=Comisión / servicios
-
-CommissionBase=Base de cálculo de comisiones
-CommissionBasedOnTurnover=Comisiones calculadas sobre el volumen de venta
-CommissionBasedOnMargins=Comisiones calculadas sobre los márgenes
-CommissionBaseDetails=Establece el método de cálculo de las comisiones
-CommissionBasedOnMarginsDetails=El cálculo basado en los márgenes requiere la activación del módulo márgenes
-
-TurnoverTotal = Volumen de ventas sin IVA
-ProductTurnover=Ventas sin IVA / productos
-ServiceTurnover=Ventas sin IVA / servicios
-
-CommercialAgent=Agente comercial
-
-StartDate=Fecha de inicio
-EndDate=Fecha de fin
-Launch=Comenzar
\ No newline at end of file
diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang
index 65044ab09a7..3b1069cf7a6 100644
--- a/htdocs/langs/es_ES/orders.lang
+++ b/htdocs/langs/es_ES/orders.lang
@@ -84,8 +84,8 @@ NumberOfOrdersByMonth=Número de pedidos por mes
AmountOfOrdersByMonthHT=Importe total de pedidos por mes (sin IVA)
ListOfOrders=Listado de pedidos
CloseOrder=Cerrar pedido
-ConfirmCloseOrder=¿Está seguro de querer cerrar este pedido? Una vez cerrado, deberá facturarse
-ConfirmCloseOrderIfSending=¿Está seguro de querer cerrar este pedido? No debe cerrar un pedido que aún no tiene sus productos enviados
+ConfirmCloseOrder=¿Está seguro de querer clasificar este pedido como enviado? Una vez enviado un pedido, solo podrá facturarse
+ConfirmCloseOrderIfSending=¿Está seguro de querer cerrar este pedido? Solamente debería cerrar un pedido cuando este haya sido enviado completamente.
ConfirmDeleteOrder=¿Está seguro de querer eliminar este pedido?
ConfirmValidateOrder=¿Está seguro de querer validar este pedido bajo la referencia %s ?
ConfirmUnvalidateOrder=¿Está seguro de querer restaurar el pedido %s al estado borrador?
diff --git a/htdocs/langs/et_EE/members.lang b/htdocs/langs/et_EE/members.lang
index b2d7eb1bc7a..ef7bcef6304 100644
--- a/htdocs/langs/et_EE/members.lang
+++ b/htdocs/langs/et_EE/members.lang
@@ -162,7 +162,7 @@ ShowTypeCard=Näita tüüp "%s"
HTPasswordExport=htpassword fail põlvkonna
NoThirdPartyAssociatedToMember=Ükski kolmas isik on seotud selle liige
ThirdPartyDolibarr=Dolibarr kolmanda osapoole
-MembersAndSubscriptions=Liikmete ja Suscriptions
+MembersAndSubscriptions=Liikmete ja Subscriptions
MoreActions=Täiendav tegevus salvestus
MoreActionBankDirect=Loo otseseid tehingukulusid rekord konto
MoreActionBankViaInvoice=Loo arve ja ettemaks
diff --git a/htdocs/langs/fa_IR/members.lang b/htdocs/langs/fa_IR/members.lang
index e7ecd54bf5c..b0a46554eb6 100644
--- a/htdocs/langs/fa_IR/members.lang
+++ b/htdocs/langs/fa_IR/members.lang
@@ -152,7 +152,7 @@ ShowTypeCard=وتبين من نوع '٪ ق'
HTPasswordExport=الملف htpassword جيل
NoThirdPartyAssociatedToMember=لم يرتبط بها من طرف ثالث لهذا العضو
ThirdPartyDolibarr=Dolibarr طرف ثالث
-MembersAndSubscriptions=وأعضاء Suscriptions
+MembersAndSubscriptions=وأعضاء Subscriptions
// Date 2009-08-11 13:27:01
// STOP - Lines generated via parser
diff --git a/htdocs/langs/fi_FI/members.lang b/htdocs/langs/fi_FI/members.lang
index b4c5c52f2d4..cad773224bc 100644
--- a/htdocs/langs/fi_FI/members.lang
+++ b/htdocs/langs/fi_FI/members.lang
@@ -159,7 +159,7 @@ MemberId=Jäsen id
PaymentSubscription=Uusi osuus maksu
NoThirdPartyAssociatedToMember=Kolmansista osapuolista ei näihin jäsen
ThirdPartyDolibarr=Dolibarr kolmannen osapuolen
-MembersAndSubscriptions=Jäsenet ja Suscriptions
+MembersAndSubscriptions=Jäsenet ja Subscriptions
// STOP - Lines generated via autotranslator.php tool (2009-08-13 20:45:19).
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 3834defebc8..a20821cd61b 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -368,7 +368,7 @@ Module1Desc= Gestion des tiers (sociétés, particuliers) et contacts
Module2Name= Commercial
Module2Desc= Gestion commerciale
Module10Name= Comptabilité
-Module10Desc= Gestion simpliste de comptabilité (ventilation de factures et paiements uniquement)
+Module10Desc= Activation de rapports simplistes de comptabilité (ca, journaux) basé sur la base. Pas de ventilation.
Module20Name= Propositions commerciales
Module20Desc= Gestion des devis/propositions commerciales
Module22Name= EMailings
@@ -678,6 +678,10 @@ Permission1411= Lire les mouvements comptables
Permission1412= Créer/modifier/annuler les mouvements comptables
Permission1415= Lire CA, bilans, résultats, journaux, grands livres
Permission1421= Exporter les commandes clients et attributs
+Permission23001 = Voir les taches planifiée
+Permission23002 = Créer/Modifier les taches planifiée
+Permission23003 = Supprimer les taches planifiée
+Permission23004 = Executer les taches planifiée
Permission2401= Lire les actions (événements ou tâches) liées à son compte
Permission2402= Créer/modifier les actions (événements ou tâches) liées à son compte
Permission2403= Supprimer les actions (événements ou tâches) liées à son compte
diff --git a/htdocs/langs/fr_FR/commissions.lang b/htdocs/langs/fr_FR/commissions.lang
deleted file mode 100644
index 5fb83f32320..00000000000
--- a/htdocs/langs/fr_FR/commissions.lang
+++ /dev/null
@@ -1,44 +0,0 @@
-# Dolibarr language file - fr_FR - commissions
-CHARSET=UTF-8
-
-Module60000Desc=Gestion des commissions
-commissionsSetup=Paramétrage de la gestion des commissions
-
-ProductCommissionRate=Taux de commissionnement sur les produits
-ServiceCommissionRate=Taux de commissionnement sur les services
-
-ProductCommissionRateDetails=Taux utilisé pour calculer les commissions sur les ventes de produits
-ServiceCommissionRateDetails=Taux utilisé pour calculer les commissions sur les ventes de services
-
-Commissions=Commissions
-CommissionDetails=Détail des commissions
-
-IncludeUnpayedInvoices=Inclure les factures non réglées
-TotalCommission=Total des commissions
-
-ProductMargin=Marge / produits
-ServiceMargin=Marge / services
-
-CommissionRate=Taux de commissionnement
-
-ProductCommission=Commission / produits
-ServiceCommission=Commission / services
-
-CommissionBase=Base de calcul des commissions
-CommissionBasedOnTurnover=Commissions calculées sur le CA
-CommissionBasedOnMargins=Commissions calculées sur les marges
-CommissionBaseDetails=Définit le mode de calcul des commissions
-CommissionBasedOnMarginsDetails=Le calcul basé sur les marges nécessite l'activation du module marges.
-
-TurnoverTotal = Chiffre d'affaire réalisé HT
-ProductTurnover=CA HT / produits
-ServiceTurnover=CA HT / services
-
-CommercialAgent=Agent commercial
-
-StartDate=Date de début
-EndDate=Date de fin
-Launch=Démarrer
-
-AgentContactType=Type de contact commissionné
-AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera associé aux agents commerciaux
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang
index 254d1e8af16..99612d8ec2d 100644
--- a/htdocs/langs/fr_FR/companies.lang
+++ b/htdocs/langs/fr_FR/companies.lang
@@ -394,6 +394,7 @@ UniqueThirdParties=Total de tiers uniques
InActivity=En activité
ActivityCeased=Clos
ActivityStateFilter=Statut d'activité
+ProductsIntoElements=Liste des produits dans les %s
# Monkey
MonkeyNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn pour les codes clients et %syymm-nnnn pour les codes fournisseurs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0.
diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang
index 01ba085620b..12ea0024f63 100644
--- a/htdocs/langs/fr_FR/compta.lang
+++ b/htdocs/langs/fr_FR/compta.lang
@@ -161,3 +161,5 @@ DatePaymentTermCantBeLowerThanObjectDate=La date limite de règlement ne peut ê
Pcg_version=Version du plan
Pcg_type=Classe de compte
Pcg_subtype=Sous classe de compte
+InvoiceLinesToDispatch=Lignes de factures à ventiler
+InvoiceDispatched=Factures ventilées
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang
index 1a9bf136e02..d0aaccfecf7 100644
--- a/htdocs/langs/fr_FR/cron.lang
+++ b/htdocs/langs/fr_FR/cron.lang
@@ -1,11 +1,93 @@
# Dolibarr language file - fr_FR - cron
CHARSET=UTF-8
-CronSetup=Configuration du séquenceur de taches
-CronDesc=Cette page permet de configurer certaines options du séquenceur de taches
+
+#
+# Admin
+#
+CronSetup = Page de configuration du module - Gestion de tâches planifiées
URLToLaunchCronJobs=URL pour lancer les taches automatiques
+OrToLaunchASpecificJob=Ou pour lancer une tache spécifique
KeyForCronAccess=Clé de sécurité pour l'URL de lancement des taches automatiques
-DateLastRun=Dernier lancement
-LastOutput=Dernière sortie
-LastResult=Dernière code retour
-ListOfCronJobs=Liste des taches programmées
-Command=Commande
\ No newline at end of file
+FileToLaunchCronJobs=Commande pour lancer les taches automatiques
+CronExplainHowToRunUnix=Sur un environement Unix vous pouvez paramétré CronTab pour executer cette commande toute les minutes
+CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utilisr le planificateur de tache pour lancer cette commande toute les minutes
+
+#
+# Menu
+#
+CronListActive= Liste des tâches planifiées active
+CronListInactive= Liste des tâches planifiées inactive
+
+
+#
+# Page list
+#
+CronDateLastRun=Dernier lancement
+CronLastOutput=Dernière sortie
+CronLastResult=Dernier code retour
+CronCommand=Commande
+CronList= Liste des tâches planifiées
+CronDelete= Supprimer la tâche planifiée
+CronConfirmDelete= Êtes-vous sûr de vouloir supprimer cette tâche planifiée ?
+CronExecute=Exécuter cette tâche
+CronConfirmExecute= Êtes-vous sûr de vouloir exécuter cette tâche maintenant?
+CronInfo= Les jobs permettent d'exécuter des tâches à intervales réguliers
+CronWaitingJobs= Vos jobs en attente:
+CronTask= Tâche
+CronNone=Aucun(e)
+CronDtStart=Date début
+CronDtEnd=Date fin
+CronDtNextLaunch=Prochaine éxécution
+CronDtLastLaunch=Dernière éxécution
+CronFrequency=Fréquence
+CronClass=Classes
+CronMethod=Méthode
+CronModule=Module
+CronAction=Action
+CronStatus=Status
+CronStatusActive=Active
+CronStatusInactive=Inactive
+CronEach=Tou(te)s
+CronNoJobs= Aucun jobs actuellement
+CronPriority=Priorité
+CronLabel=Description
+CronNbRun=Nb. exec.
+CronDtLastResult=Date du derniétre resulat de la dernière éxécution
+
+#
+#Page card
+#
+CronAdd= Ajoutez une tâche
+CronHourStart= Jour et Heure de début de la tâche
+CronEvery= Puis execution toutes les
+CronObject= Instance/Objet à créer
+CronArgs= Argument
+CronSaveSucess=Enregistrement effectué
+CronNote=Note
+CronFieldMandatory=Le champ %s est obligatoire
+CronErrEndDateStartDt=La date de fin ne peux être avant la date de début
+CronStatusActiveBtn=Activer
+CronStatusInactiveBtn=Désactiver
+CronTaskInactive=Cette tâche est désactivée
+CronId=Id
+CronClassFile=Classes (fichier)
+CronModuleHelp=Nom du repertoire du module dolibarr (fonctionne automatiquement avec les modules externe Dolibarr). Par exemple pour appeler la mèthode fetch de l'object Product de Dolibarr /htdocs/product/class/product.class.php, la valeur de module est product
+CronClassFileHelp=Le fichier qui contient l'objet . Par exemple pour appeler la mèthode fetch de l'object Product de Dolibarr /htdocs/product/class/product.class.php, la valeur de classe est product.class.php
+CronObjectHelp=Le nom de l'object a crée. Par exemple pour appeler la mèthode fetch de l'object Product de Dolibarr /htdocs/product/class/product.class.php, la valeur de objet est Product
+CronMethodHelp=La mèthode a lancer. Par exemple pour appeler la mèthode fetch de l'object Product de Dolibarr /htdocs/product/class/product.class.php, la valeur de mèthode est fecth
+CronArgsHelp=Les arguments de la mèthode. For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, la valeur de paramétre pourrait être 0, RefProduit
+CronCommandHelp=La commande système a éxecuter
+
+#
+# Info
+#
+CronInfoPage=Suivie
+
+#
+# Common
+#
+CronType=Type d'action a executer
+CronType_method=Méthode d'une classe d'un module Dolibarr
+CronType_command=Commande Shell
+CronMenu=Cron
+CronCannotLoadClass=impossible de charger la classe %s ou l'object %s
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index a7093fd8b75..b31b711f3a3 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -490,7 +490,7 @@ NbOfCustomers=Nombre de clients
NbOfLines=Nombre de lignes
NbOfObjects=Nombre d'objets
NbOfReferers=Nombre de références
-Referers=Référents
+Referers=Consommation
TotalQuantity=Quantité totale
DateFromTo=Du %s au %s
DateFrom=A partir du %s
diff --git a/htdocs/langs/he_IL/members.lang b/htdocs/langs/he_IL/members.lang
index b8f1a2389d0..647559b284a 100644
--- a/htdocs/langs/he_IL/members.lang
+++ b/htdocs/langs/he_IL/members.lang
@@ -162,7 +162,7 @@ ShowTypeCard=הצג מסוג "%s"
HTPasswordExport=htpassword הדור הקובץ
NoThirdPartyAssociatedToMember=אין צד שלישי הקשור משתמש זה
ThirdPartyDolibarr=Dolibarr צד שלישי
-MembersAndSubscriptions=משתמשים ו Suscriptions
+MembersAndSubscriptions=משתמשים ו Subscriptions
MoreActions=פעולה משלימה על ההקלטה
MoreActionBankDirect=יצירת הרשומה העסקה ישירה על חשבון
MoreActionBankViaInvoice=יצירת חשבונית התשלום על חשבון
diff --git a/htdocs/langs/hu_HU/members.lang b/htdocs/langs/hu_HU/members.lang
index a1baf95f0c6..ff2cbf8d7ec 100644
--- a/htdocs/langs/hu_HU/members.lang
+++ b/htdocs/langs/hu_HU/members.lang
@@ -162,7 +162,7 @@ ShowTypeCard=Mutasd típusú "%s"
HTPasswordExport=htpassword fájl létrehozása
NoThirdPartyAssociatedToMember=Harmadik félnek nem társult a tag
ThirdPartyDolibarr=Dolibarr harmadik fél
-MembersAndSubscriptions=A tagok és Suscriptions
+MembersAndSubscriptions=A tagok és Subscriptions
MoreActions=Kiegészítő fellépés a felvételi
MoreActionBankDirect=Hozzon létre egy közvetlen tranzakciós rekord miatt
MoreActionBankViaInvoice=Hozzon létre egy számlát és előleg
diff --git a/htdocs/langs/is_IS/members.lang b/htdocs/langs/is_IS/members.lang
index d64fc0dbd55..20f211f24ef 100644
--- a/htdocs/langs/is_IS/members.lang
+++ b/htdocs/langs/is_IS/members.lang
@@ -157,7 +157,7 @@ ShowTypeCard=Sýna tegund ' %s '
HTPasswordExport=htpassword skrá kynslóð
NoThirdPartyAssociatedToMember=Engar þriðja aðila í tengslum við þennan
ThirdPartyDolibarr=Dolibarr þriðja aðila
-MembersAndSubscriptions=Aðilar og Suscriptions
+MembersAndSubscriptions=Aðilar og Subscriptions
// STOP - Lines generated via autotranslator.php tool (2010-06-30 00:15:29).
diff --git a/htdocs/langs/it_IT/members.lang b/htdocs/langs/it_IT/members.lang
index 4000e50c514..e1645587088 100644
--- a/htdocs/langs/it_IT/members.lang
+++ b/htdocs/langs/it_IT/members.lang
@@ -88,7 +88,7 @@ MemberModifiedInDolibarr =Membri modificati su Dolibarr
MEMBER_NEWFORM_PAYONLINE =Saltate sulla integrato pagina di pagamento online
MemberNotOrNoMoreExpectedToSubscribe =Membri non iscritti o non più attesi per iscrizione
MemberPublicLinks =Link/pagine pubbliche
-MembersAndSubscriptions =Deputati e Suscriptions
+MembersAndSubscriptions =Deputati e Subscriptions
MembersArea =Sezione riservata membri
MembersAttributes =Attributi dei membri
MembersByCountryDesc =Questa schermata mostra le statistiche dei membri per paese. Il grafico dipende da servizi online di Google ed è disponibile solo se il server può connettersi ad internet.
diff --git a/htdocs/langs/ja_JP/members.lang b/htdocs/langs/ja_JP/members.lang
index 4fee5b42355..afc8a3f759b 100644
--- a/htdocs/langs/ja_JP/members.lang
+++ b/htdocs/langs/ja_JP/members.lang
@@ -162,7 +162,7 @@ ShowTypeCard=タイプ "%s"を表示
HTPasswordExport=htpasswordファイルの生成
NoThirdPartyAssociatedToMember=このメンバに関連付けられているサードパーティません
ThirdPartyDolibarr=Dolibarrサードパーティ
-MembersAndSubscriptions=メンバーとSuscriptions
+MembersAndSubscriptions=メンバーとSubscriptions
MoreActions=記録上の相補的なアクション
MoreActionBankDirect=アカウントに直接トランザクション·レコードを作成します。
MoreActionBankViaInvoice=アカウントの請求書と支払いを作成します。
diff --git a/htdocs/langs/nb_NO/members.lang b/htdocs/langs/nb_NO/members.lang
index 471b4e735a9..62c8faf8822 100644
--- a/htdocs/langs/nb_NO/members.lang
+++ b/htdocs/langs/nb_NO/members.lang
@@ -29,7 +29,7 @@ DescADHERENT_CARD_TEXT_RIGHT=Tekst trykt på kort medlem (justere på høyre)
DescADHERENT_MAILMAN_LISTS=Liste (er) for automatisk insription av nye medlemmer (separert med komma)
NoThirdPartyAssociatedToMember=Ingen tredjepart knyttet til dette medlemmet
ThirdPartyDolibarr=Dolibarr tredjepart
-MembersAndSubscriptions=Medlemmer og Suscriptions
+MembersAndSubscriptions=Medlemmer og Subscriptions
// STOP - Lines generated via autotranslator.php tool (2010-07-17 11:48:27).
diff --git a/htdocs/langs/pl_PL/members.lang b/htdocs/langs/pl_PL/members.lang
index 4782007adfd..0810e643b43 100644
--- a/htdocs/langs/pl_PL/members.lang
+++ b/htdocs/langs/pl_PL/members.lang
@@ -162,7 +162,7 @@ MemberId=Państwa id
PaymentSubscription=Nowy wkład płatności
NoThirdPartyAssociatedToMember=Nr trzeciej związane do tego członka
ThirdPartyDolibarr=Dolibarr trzeciej
-MembersAndSubscriptions=Członkowie i Suscriptions
+MembersAndSubscriptions=Członkowie i Subscriptions
// STOP - Lines generated via autotranslator.php tool (2009-08-13 21:07:31).
diff --git a/htdocs/langs/pt_PT/members.lang b/htdocs/langs/pt_PT/members.lang
index 0c42a9c3295..d82002190b5 100644
--- a/htdocs/langs/pt_PT/members.lang
+++ b/htdocs/langs/pt_PT/members.lang
@@ -149,7 +149,7 @@ SetLinkToThirdParty=Link para uma Dolibarr terceiro
SubscriptionId=Assinaturas id
MemberId=Estados-id
PaymentSubscription=Nova contribuição pagamento
-MembersAndSubscriptions=Deputados e Suscriptions
+MembersAndSubscriptions=Deputados e Subscriptions
// STOP - Lines generated via autotranslator.php tool (2009-08-13 21:10:10).
diff --git a/htdocs/langs/ro_RO/members.lang b/htdocs/langs/ro_RO/members.lang
index 067614c8b30..d14d60ab82b 100644
--- a/htdocs/langs/ro_RO/members.lang
+++ b/htdocs/langs/ro_RO/members.lang
@@ -160,7 +160,7 @@ MemberId=Statele id
PaymentSubscription=New plata contribuţiei
NoThirdPartyAssociatedToMember=Nu părţi terţe asociate la prezenta membru
ThirdPartyDolibarr=Dolibarr terţă parte
-MembersAndSubscriptions=Membrii şi Suscriptions
+MembersAndSubscriptions=Membrii şi Subscriptions
// STOP - Lines generated via autotranslator.php tool (2009-08-13 21:12:07).
diff --git a/htdocs/langs/sv_SE/members.lang b/htdocs/langs/sv_SE/members.lang
index bf398731fe3..ded4d0542d6 100644
--- a/htdocs/langs/sv_SE/members.lang
+++ b/htdocs/langs/sv_SE/members.lang
@@ -157,7 +157,7 @@ ShowTypeCard=Visa typ "%s"
HTPasswordExport=htpassword fil generation
NoThirdPartyAssociatedToMember=Ingen tredje part som är associerade till denna medlem
ThirdPartyDolibarr=Dolibarr tredje part
-MembersAndSubscriptions=Medlemmar och Suscriptions
+MembersAndSubscriptions=Medlemmar och Subscriptions
// STOP - Lines generated via autotranslator.php tool (2010-08-27 08:51:26).
diff --git a/htdocs/langs/zh_TW/members.lang b/htdocs/langs/zh_TW/members.lang
index c08035af7a1..1b344cfd452 100644
--- a/htdocs/langs/zh_TW/members.lang
+++ b/htdocs/langs/zh_TW/members.lang
@@ -157,7 +157,7 @@ ShowTypeCard=顯示類型'%s'
HTPasswordExport=htpassword文件生成
NoThirdPartyAssociatedToMember=無關聯的第三方該會員
ThirdPartyDolibarr=Dolibarr第三者
-MembersAndSubscriptions=議員和Suscriptions
+MembersAndSubscriptions=議員和Subscriptions
// STOP - Lines generated via autotranslator.php tool (2010-06-08 21:22:55).
diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php
index a195ef6de04..6ca0879a88a 100644
--- a/htdocs/margin/agentMargins.php
+++ b/htdocs/margin/agentMargins.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2012-2013 Christophe Battarel
*
* 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
@@ -40,7 +40,13 @@ $mesg = '';
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
if (! $sortorder) $sortorder="ASC";
-if (! $sortfield) $sortfield="s.nom";
+if (! $sortfield)
+{
+ if ($agentid > 0)
+ $sortfield="s.nom";
+ else
+ $sortfield="u.name";
+}
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
@@ -75,7 +81,7 @@ $titre=$langs->trans("Margins");
$picto='margin';
dol_fiche_head($head, 'agentMargins', $titre, 0, $picto);
-print '