diff --git a/ChangeLog b/ChangeLog
index 68d6b1848f1..e70169095be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,14 +43,31 @@ Dolibarr better:
- All fields "fk_societe" were renamed into "fk_soc".
***** ChangeLog for 3.7.1 compared to 3.7.* *****
-- Fix: Bug in the new photo system
-- Fix: Error management
-- Fix: [ Bug #2714 ] Members -> Memberxy-> Agenda -> technical Error
-- Fix: [ Bug #2713 ] 3.7.0 mailing-unsubscribe.php not unsubscribe
+FIX Bug in the new photo system
+FIX Error management
+FIX [ Bug #2714 ] Members -> Memberxy-> Agenda -> technical Error
+FIX [ Bug #2713 ] 3.7.0 mailing-unsubscribe.php not unsubscribe
+FIX #2901
+FIX when we create an agenda event with "Not applicable" status, it is automatically saved with "To do" status
+FIX check the user status during authentication
+FIX top links menu have target attribute with wrong value
+FIX extrafields required on thirdparty
+FIX create contact with extrafield is null when it is require
+FIX width multiselect
+FIX "script" tag with wrong syntax
+Fix bug debian 786479
+FIX update usergroup name
+Fix facturestats was not filtering on invoice type
+FIX #2856 : Wrong table design
+FIX button create payment hide if tax amount is less than 1
+FIX event for restricted user was restricted if company null
+FIX send mail, copy sendto don't read the list of contact
+FIX Properly escape untrusted data to prevent HTML injection.
+FIX send mail, copy sendto don't read the list of contact
-- Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
- your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to
- restore old path.
+Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
+your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to
+restore old path.
WARNING:
@@ -236,8 +253,8 @@ Dolibarr better:
- Table llx_c_pays were renamed into llx_c_country.
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
-- A lot of pages called fiche.php were renamed into card.php
-- A lot of pages called liste.php were renamed into list.php
+- A lot of pages named fiche.php were renamed into card.php
+- A lot of pages named liste.php were renamed into list.php
- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the
warehouse module and your Point Of Sale module setup if you use one.
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index c667754d4ab..bdfc9d8972a 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -455,8 +455,9 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
- # Removed known external modules to avoir any error when packaging on test env
+ # Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
@@ -981,10 +982,10 @@ if ($nboftargetok) {
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
- print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
+ print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
- print "Check that in your Wine setup, you create a Z: drive that point to your /tmp directory.\n";
+ print "Check that in your Wine setup, you create a Z: drive that point to your / directory.\n";
$SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g;
diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml
index 7f16ad02a76..9b5c0931650 100755
--- a/dev/codesniffer/ruleset.xml
+++ b/dev/codesniffer/ruleset.xml
@@ -350,6 +350,11 @@
+
+
+ 0
+
+
";
- } else {
+ }
+ else
+ {
// Show deprecated optional form to add product line here
if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) {
print '
';
@@ -3486,50 +3490,50 @@ if ($action == 'create')
// Show global modifiers
if (! empty($conf->global->INVOICE_US_SITUATION))
{
- if ($object->situation_cycle_ref && $object->statut == 0) {
- print '
';
- print '
\n";
- if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
- print '
';
+ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
+ print '
';
+ }
+ print '
';
+ print '
';
+ print '
';
+ print '
';
+ print '
';
+ print '
';
+ print '
%
';
+ print '
';
+ print '
';
+ print '';
}
- print '
';
- print '
';
- print '
';
- print '
';
- print '
';
- print '
';
- print '
%
';
- print '
';
- print '
';
- print '';
- }
}
// Show object lines
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 075173d31c9..fc3d8936edf 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -92,18 +92,16 @@ class Facture extends CommonInvoice
var $revenuestamp;
/**
* @deprecated
+ * @see note_private, note_public
*/
var $note;
var $note_private;
var $note_public;
/**
- * Check constants for more info:
- * - STATUS_DRAFT
- * - STATUS_VALIDATED
- * - STATUS_PAID
- * - STATUS_ABANDONED
+ * Invoice status
* @var int
+ * @see Facture::STATUS_DRAFT, Facture::STATUS_VALIDATED, Facture::STATUS_PAID, Facture::STATUS_ABANDONED
*/
var $statut;
//! Fermeture apres paiement partiel: discount_vat, badcustomer, abandon
@@ -131,6 +129,9 @@ class Facture extends CommonInvoice
* @deprecated
*/
var $products=array();
+ /**
+ * @var FactureLigne[]
+ */
var $lines=array();
var $line;
var $extraparams=array();
@@ -1119,7 +1120,8 @@ class Facture extends CommonInvoice
$objp = $this->db->fetch_object($result);
$line = new FactureLigne($this->db);
- $line->rowid = $objp->rowid;
+ $line->id = $objp->rowid;
+ $line->rowid = $objp->rowid; // deprecated
$line->label = $objp->custom_label; // deprecated
$line->desc = $objp->description; // Description line
$line->product_type = $objp->product_type; // Type of line
@@ -2105,6 +2107,11 @@ class Facture extends CommonInvoice
*/
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id='', $fk_unit = null)
{
+ // Deprecation warning
+ if ($label) {
+ dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);
+ }
+
global $mysoc, $conf, $langs;
dol_syslog(get_class($this)."::addline facid=$this->id,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type, fk_unit=$fk_unit", LOG_DEBUG);
@@ -2289,6 +2296,11 @@ class Facture extends CommonInvoice
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0, $fk_unit = null)
{
+ // Deprecation warning
+ if ($label) {
+ dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);
+ }
+
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
global $mysoc;
@@ -3685,7 +3697,10 @@ class FactureLigne extends CommonInvoiceLine
var $fk_facture;
//! Id parent line
var $fk_parent_line;
- var $label; // deprecated
+ /**
+ * @deprecated
+ */
+ var $label;
//! Description ligne
var $desc;
@@ -3717,8 +3732,16 @@ class FactureLigne extends CommonInvoiceLine
//var $remise; // Montant calcule de la remise % sur PU HT (exemple 20)
// From llx_product
+ /**
+ * @deprecated
+ * @see product_ref
+ */
var $ref; // Product ref (deprecated)
var $product_ref; // Product ref
+ /**
+ * @deprecated
+ * @see product_label
+ */
var $libelle; // Product label (deprecated)
var $product_label; // Product label
var $product_desc; // Description produit
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 60c47564743..e4f9846309a 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -37,6 +37,7 @@ $langs->load('propal');
$langs->load('compta');
$langs->load('other');
$langs->load("bills");
+$langs->load('companies');
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 6954ad46249..0e1763d4b86 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -36,6 +36,7 @@ if (!$user->rights->facture->lire) accessforbidden();
$langs->load("bills");
$langs->load("banks");
$langs->load("withdrawals");
+$langs->load('companies');
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
$ref=GETPOST('ref','alpha');
@@ -396,7 +397,7 @@ if ($object->id > 0)
}
print "";
print '';
-
+
// Montants
print '
'.$langs->trans('AmountHT').'
';
print '
'.price($object->total_ht).'
';
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index 077bbde2420..60d669fcacf 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -40,7 +40,16 @@ class Paiement extends CommonObject
var $ref;
var $facid;
var $datepaye;
- var $total; // deprecated
+ /**
+ * @deprecated
+ * @see amount, amounts
+ */
+ var $total;
+ /**
+ * @deprecated
+ * @see amount, amounts
+ */
+ var $montant;
var $amount; // Total amount of payment
var $amounts=array(); // Array of amounts
var $author;
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index d58e0add8ab..45b2c51acfa 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -40,6 +40,11 @@ class PaymentSocialContribution extends CommonObject
var $datec='';
var $tms='';
var $datep='';
+ /**
+ * @deprecated
+ * @see amount
+ */
+ var $total;
var $amount; // Total amount of payment
var $amounts=array(); // Array of amounts
var $fk_typepaiement;
diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php
index 9e6624dda72..ad628fd6574 100644
--- a/htdocs/contact/canvas/actions_contactcard_common.class.php
+++ b/htdocs/contact/canvas/actions_contactcard_common.class.php
@@ -51,6 +51,8 @@ abstract class ActionsContactCardCommon
*/
private function getInstanceDao()
{
+ dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
+
if (! is_object($this->object))
{
$modelclassfile = dol_buildpath('/'.$this->dirmodule.'/canvas/'.$this->canvas.'/dao_'.$this->targetmodule.'_'.$this->canvas.'.class.php');
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index 588ce2b01ff..742378a2db3 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -201,12 +201,12 @@ if (empty($reshook))
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
- if ($ret < 0)
+ if ($ret < 0)
{
$error++;
$action = 'create';
}
-
+
if (! GETPOST("lastname"))
{
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));
@@ -1105,18 +1105,14 @@ else
{
if ($user->rights->societe->contact->creer)
{
- print ''.$langs->trans('Modify').'';
+ print ''.$langs->trans('Modify').'';
}
if (! $object->user_id && $user->rights->user->user->creer)
{
- print ''.$langs->trans("CreateDolibarrLogin").'';
+ print ''.$langs->trans("CreateDolibarrLogin").'';
}
- if ($user->rights->societe->contact->supprimer)
- {
- print ''.$langs->trans('Delete').'';
- }
// Activer
if ($object->statut == 0 && $user->rights->societe->contact->creer)
{
@@ -1126,6 +1122,12 @@ else
if ($object->statut == 1 && $user->rights->societe->contact->creer)
{
print ''.$langs->trans("DisableUser").'';
+ }
+
+ // Delete
+ if ($user->rights->societe->contact->supprimer)
+ {
+ print ''.$langs->trans('Delete').'';
}
}
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index ca85995a7d3..0e3c4b0a2bc 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -50,9 +50,21 @@ class Contact extends CommonObject
var $zip;
var $town;
- var $fk_departement; // deprecated
- var $departement_code; // deprecated
- var $departement; // deprecated
+ /**
+ * @deprecated
+ * @see state_id
+ */
+ var $fk_departement;
+ /**
+ * @deprecated
+ * @see state_code
+ */
+ var $departement_code;
+ /**
+ * @deprecated
+ * @see state
+ */
+ var $departement;
var $state_id; // Id of department
var $state_code; // Code of department
var $state; // Label of department
@@ -80,7 +92,11 @@ class Contact extends CommonObject
var $birthday;
var $default_lang;
var $note_public; // Public note
- var $note; // deprecated
+ /**
+ * @deprecated
+ * @see note_public, note_private
+ */
+ var $note;
var $note_private; // Private note
var $no_email; // 1=Don't send e-mail to this contact, 0=do
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 2241a1e67f1..9a5ab3b0f07 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -80,8 +80,9 @@ llxHeader("",$langs->trans("Contact"), $helpurl);
if ($object->id)
{
$head = contact_prepare_head($object);
+ $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
- dol_fiche_head($head, 'documents', $langs->trans("Contact"), 0, 'contact');
+ dol_fiche_head($head, 'documents', $title, 0, 'contact');
// Construit liste des fichiers
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 08bc8387387..fb0038b509f 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -154,6 +154,7 @@ class Contrat extends CommonObject
/**
* @deprecated Use fk_project instead
+ * @see fk_project
*/
var $fk_projet;
@@ -1642,6 +1643,8 @@ class Contrat extends CommonObject
*/
function update_statut($user)
{
+ dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
+
// If draft, we keep it (should not happen)
if ($this->statut == 0) return 1;
@@ -2165,6 +2168,7 @@ class ContratLigne extends CommonObjectLine
/**
* @var string
* @deprecated Use $label instead
+ * @see label
*/
public $libelle;
@@ -2189,6 +2193,7 @@ class ContratLigne extends CommonObjectLine
/**
* @var float
* @deprecated Use $price_ht instead
+ * @see price_ht
*/
public $price;
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 22a33f4d2a8..d0730149b36 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -118,6 +118,7 @@ abstract class CommonDocGenerator
'mycompany_idprof5'=>$mysoc->idprof5,
'mycompany_idprof6'=>$mysoc->idprof6,
'mycompany_vatnumber'=>$mysoc->tva_intra,
+ 'mycompany_object'=>$mysoc->object,
// Only private not exists for "mysoc"
'mycompany_note_private'=>$mysoc->note_private,
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 10f91a07631..4c511726979 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -7,7 +7,7 @@
* Copyright (C) 2012-2013 Christophe Battarel
* Copyright (C) 2011-2014 Philippe Grand
* Copyright (C) 2012-2015 Marcos García
- * Copyright (C) 2012-2014 Raphaël Doursenaud
+ * Copyright (C) 2012-2015 Raphaël Doursenaud
* Copyright (C) 2012 Cedric Salvador
*
* This program is free software; you can redistribute it and/or modify
@@ -44,6 +44,7 @@ abstract class CommonObject
/**
* @var string Error string
* @deprecated Use instead the array of error strings
+ * @see errors
*/
public $error;
@@ -82,7 +83,7 @@ abstract class CommonObject
public $errors=array();
/**
- * @var string Can be used to pass information when only object is provided to method
+ * @var string[] Can be used to pass information when only object is provided to method
*/
public $context=array();
@@ -96,7 +97,24 @@ abstract class CommonObject
public $lastname;
public $firstname;
public $civility_id;
+ /**
+ * @deprecated
+ * @see thirdparty
+ */
+ public $client;
+ /**
+ * @var Societe
+ */
public $thirdparty;
+ /**
+ * @deprecated
+ * @see project
+ */
+ public $projet;
+ /**
+ * @var Project
+ */
+ public $project;
// No constructor as it is an abstract class
@@ -113,13 +131,15 @@ abstract class CommonObject
*/
static function isExistingObject($element, $id, $ref='', $ref_ext='')
{
- global $db;
+ global $db,$conf;
$sql = "SELECT rowid, ref, ref_ext";
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
- if ($id > 0) $sql.= " WHERE rowid = ".$db->escape($id);
- else if ($ref) $sql.= " WHERE ref = '".$db->escape($ref)."'";
- else if ($ref_ext) $sql.= " WHERE ref_ext = '".$db->escape($ref_ext)."'";
+ $sql.= " WHERE entity IN (".getEntity($element).")" ;
+
+ if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
+ else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
+ else if ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'";
else {
$error='ErrorWrongParameters';
dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR);
@@ -759,10 +779,14 @@ abstract class CommonObject
*/
function fetch_projet()
{
+ include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+
+ if (empty($this->fk_project) && ! empty($this->fk_projet)) $this->fk_project = $this->fk_projet; // For backward compatibility
if (empty($this->fk_project)) return 0;
$project = new Project($this->db);
$result = $project->fetch($this->fk_project);
+
$this->projet = $project; // deprecated
$this->project = $project;
return $result;
@@ -1639,9 +1663,10 @@ abstract class CommonObject
/**
* Update public note (kept for backward compatibility)
*
- * @param string $note New value for note
- * @return int <0 if KO, >0 if OK
- * @deprecated
+ * @param string $note New value for note
+ * @return int <0 if KO, >0 if OK
+ * @deprecated
+ * @see update_note()
*/
function update_note_public($note)
{
@@ -3956,15 +3981,16 @@ abstract class CommonObject
* This function is meant to be called from replaceThirdparty with the appropiate tables
* Column name fk_soc MUST be used to identify thirdparties
*
- * @param DoliDB $db Database handler
- * @param int $origin_id Old thirdparty id
- * @param int $dest_id New thirdparty id
- * @param array $tables Tables that need to be changed
+ * @param DoliDB $db Database handler
+ * @param int $origin_id Old thirdparty id (the thirdparty to delete)
+ * @param int $dest_id New thirdparty id (the thirdparty that will received element of the other)
+ * @param array $tables Tables that need to be changed
* @return bool
*/
public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables)
{
- foreach ($tables as $table) {
+ foreach ($tables as $table)
+ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.$table.' SET fk_soc = '.$dest_id.' WHERE fk_soc = '.$origin_id;
if (!$db->query($sql)) {
diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php
index 07019a0fa1d..ef854a2452e 100644
--- a/htdocs/core/class/commonobjectline.class.php
+++ b/htdocs/core/class/commonobjectline.class.php
@@ -39,6 +39,7 @@ abstract class CommonObjectLine extends CommonObject
* Id of the line
* @var int
* @deprecated Try to use id property as possible (even if field into database is still rowid)
+ * @see id
*/
public $rowid;
diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php
index b4882af8a58..5309b5524ee 100644
--- a/htdocs/core/class/commonorder.class.php
+++ b/htdocs/core/class/commonorder.class.php
@@ -43,6 +43,7 @@ abstract class CommonOrderLine extends CommonObjectLine
* Product ref
* @var string
* @deprecated Use product_ref
+ * @see product_ref
*/
public $ref;
@@ -56,6 +57,7 @@ abstract class CommonOrderLine extends CommonObjectLine
* Product label
* @var string
* @deprecated Use product_label
+ * @see product_label
*/
public $libelle;
@@ -78,7 +80,9 @@ abstract class CommonOrderLine extends CommonObjectLine
public $qty;
/**
+ * Unit price
* @deprecated
+ * @see subprice
*/
var $price;
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 53f77262db1..bdb4f57a4cc 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -376,7 +376,7 @@ class Form
* @return string Code html du tooltip (texte+picto)
* @see Use function textwithpicto if you can.
*/
- function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 0, $incbefore = '', $noencodehtmltext = 0)
+ function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0)
{
global $conf;
@@ -391,14 +391,19 @@ class Form
$htmltext=str_replace("\r","",$htmltext);
$htmltext=str_replace("\n","",$htmltext);
+ $extrastyle='';
+ if ($direction < 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-left: 3px !important;'; }
+ if ($direction > 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-right: 3px !important;'; }
+
$htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
- else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
- if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
- else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
+ if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
+ else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
+ if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
$s="";
if (empty($notabs)) $s.='
';
elseif ($notabs == 2) $s.='
';
+ // Define value if value is before
if ($direction < 0) {
$s.='<'.$tag.$paramfortooltipimg;
if ($tag == 'td') {
@@ -407,16 +412,12 @@ class Form
$s.= '>'.$img.''.$tag.'>';
}
// Use another method to help avoid having a space in value in order to use this value with jquery
- // TODO add this in css
- //if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''.$tag.'>';
- $paramfortooltiptd.= (($direction < 0)?' class="inline-block" style="padding: 0px; padding-left: 3px !important;"':'');
- $paramfortooltiptd.= (($direction > 0)?' class="inline-block" style="padding: 0px; padding-right: 3px !important;"':'');
+ // Define label
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''.$tag.'>';
+ // Define value if value is after
if ($direction > 0) {
$s.='<'.$tag.$paramfortooltipimg;
- if ($tag == 'td') {
- $s .= ' valign="middle" width="14"';
- }
+ if ($tag == 'td') $s .= ' valign="middle" width="14"';
$s.= '>'.$img.''.$tag.'>';
}
if (empty($notabs)) $s.='
';
@@ -437,7 +438,7 @@ class Form
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
* @return string HTML code of text, picto, tooltip
*/
- function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 0)
+ function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2)
{
global $conf;
@@ -858,6 +859,7 @@ class Form
* @param int $limit Maximum number of elements
* @return string HTML string with
* @deprecated Use select_thirdparty instead
+ * @see select_thirdparty()
*/
function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0)
{
@@ -1227,6 +1229,7 @@ class Form
* @param int $force_entity 0 or Id of environment to force
* @return void
* @deprecated
+ * @see select_dolusers()
*/
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
{
@@ -1248,10 +1251,11 @@ class Form
* @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
* @param string $morefilter Add more filters into sql request
* @param string $show_every 0=default list, 1=add also a value "Everybody" at beginning of list
+ * @param string $enableonlytext If option $enableonly is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty.
* @return string HTML select string
* @see select_dolgroups
*/
- function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='', $show_every=0)
+ function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='')
{
global $conf,$user,$langs;
@@ -1347,8 +1351,8 @@ class Form
$userstatic->lastname=$obj->lastname;
$userstatic->firstname=$obj->firstname;
- $disableline=0;
- if (is_array($enableonly) && count($enableonly) && ! in_array($obj->rowid,$enableonly)) $disableline=1;
+ $disableline='';
+ if (is_array($enableonly) && count($enableonly) && ! in_array($obj->rowid,$enableonly)) $disableline=($enableonlytext?$enableonlytext:'1');
if ((is_object($selected) && $selected->id == $obj->rowid) || (! is_object($selected) && $selected == $obj->rowid))
{
@@ -1398,6 +1402,10 @@ class Form
}
}
$out.=($moreinfo?')':'');
+ if ($disableline && $disableline != '1')
+ {
+ $out.=' - '.$disableline; // This is text from $enableonlytext parameter
+ }
$out.= '';
$i++;
@@ -1460,7 +1468,7 @@ class Form
$assignedtouser=array();
if (!empty($_SESSION['assignedtouser']))
{
- $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
+ $assignedtouser=json_decode($_SESSION['assignedtouser'], true);
}
$nbassignetouser=count($assignedtouser);
@@ -3029,6 +3037,7 @@ class Form
* @param int $width Force width of box
* @return void
* @deprecated
+ * @see formconfirm()
*/
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{
@@ -3086,7 +3095,7 @@ class Form
// Now add questions
$more.='
';
+ $ret.='';
}
+ $ret.='';
+
return $ret;
}
@@ -4794,10 +4819,10 @@ class Form
* @param int $width Width of photo
* @param int $height Height of photo (auto if 0)
* @param int $caneditfield Add edit fields
- * @param string $photologo CSS name to use on img for photo
+ * @param string $cssclass CSS name to use on img for photo
* @return string HTML code to output photo
*/
- static function showphoto($modulepart,$object,$width=100,$height=0,$caneditfield=0,$cssclass='photowithmargin')
+ static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin')
{
global $conf,$langs;
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 05200feee30..a005fb2b228 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -423,6 +423,7 @@ class FormCompany
* @param string $filter Add a SQL filter on list
* @return void
* @deprecated Use print xxx->select_juridicalstatus instead
+ * @see select_juridicalstatus()
*/
function select_forme_juridique($selected='', $country_codeid=0, $filter='')
{
@@ -513,7 +514,7 @@ class FormCompany
}
}
$out.= '';
- if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
+ if ($user->admin) $out.= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
// Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 926ee8a337a..2fea621626e 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -249,7 +249,7 @@ class FormFile
* @param string $modelselected Model to preselect by default
* @param string $allowgenifempty Allow generation even if list of template ($genallowed) is empty (show however a warning)
* @param string $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
- * @param int $iconPDF Obsolete, see getDocumentsLink
+ * @param int $iconPDF Deprecated, see getDocumentsLink
* @param int $maxfilenamelength Max length for filename shown
* @param string $noform Do not output html form tags
* @param string $param More param on http links
@@ -261,6 +261,11 @@ class FormFile
*/
function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$morepicto='')
{
+ // Deprecation warning
+ if (0 !== $iconPDF) {
+ dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
+ }
+
global $langs, $conf, $user, $hookmanager;
global $form, $bc;
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index b9d5048db74..4e1a8ffc0c5 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -48,7 +48,16 @@ class FormMail extends Form
var $withsubstit; // Show substitution array
var $withfrom;
- var $withto; // Show recipient emails
+ /**
+ * @var int
+ * @deprecated Fill withto with array before calling method.
+ * @see withto
+ */
+ public $withtosocid;
+ /**
+ * @var int|int[]
+ */
+ public $withto; // Show recipient emails
var $withtofree; // Show free text for recipient emails
var $withtocc;
var $withtoccc;
@@ -275,7 +284,7 @@ class FormMail extends Form
$out.= "\n\n";
if ($this->withform == 1)
{
- $out.= '
'."\n";
+ $out.= '
'."\n";
$out.= '';
$out.= '';
$out.= '';
@@ -703,6 +712,23 @@ class FormMail extends Form
$out.= '
'."\n";
if ($this->withform == 1) $out.= ''."\n";
+
+ // Disable enter key if option MAIN_MAILFORM_DISABLE_ENTER is set
+ if (! empty($conf->global->MAIN_MAILFORM_DISABLE_ENTERKEY))
+ {
+ $out.= '';
+ }
+
$out.= "\n";
return $out;
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 08c19463d27..5c2a3bc9274 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -592,6 +592,7 @@ class FormOther
* @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
* @return void
* @deprecated
+ * @see selectColor()
*/
function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='')
{
@@ -611,6 +612,11 @@ class FormOther
*/
function selectColor($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='', $morecss='')
{
+ // Deprecation warning
+ if ($form_name) {
+ dol_syslog(__METHOD__ . ": form_name parameter is deprecated", LOG_WARNING);
+ }
+
global $langs,$conf;
$out='';
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 9469b680631..681c667854f 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -147,13 +147,15 @@ class FormProjets
$labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany");
}
- if (!empty($selected) && $selected == $obj->rowid && $obj->fk_statut > 0)
+ if (!empty($selected) && $selected == $obj->rowid)
{
- $out.= '';
+ $out.= '';
}
else
{
- if ($hideunselectables && $disabled)
+ if ($hideunselectables && $disabled && ($selected != $obj->rowid))
{
$resultat='';
}
@@ -194,12 +196,14 @@ class FormProjets
*
* @param string $table_element Table of the element to update
* @param int $socid socid to filter
- * @return string The HTML select list of element
+ * @return int|string The HTML select list of element or '' if nothing or -1 if KO
*/
function select_element($table_element,$socid=0)
{
global $conf, $langs;
+ if ($table_element == 'projet_task') return ''; // Special cas of element we never link to a project (already always done)
+
$projectkey="fk_projet";
switch ($table_element)
{
@@ -231,7 +235,7 @@ class FormProjets
$sql.= " FROM ".MAIN_DB_PREFIX.$table_element;
$sql.= " WHERE ".$projectkey." is null";
- if (!empty($socid)) $sql.= " AND fk_soc=".$socid;
+ if (! empty($socid) && ! in_array($table_element, array('don'))) $sql.= " AND fk_soc=".$socid;
if (! in_array($table_element, array('expensereport_det'))) $sql.= ' AND entity='.getEntity('project');
$sql.= " ORDER BY ref DESC";
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 0e55da2769a..9b4987ddb56 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -707,6 +707,7 @@ class Translate
* @param string $amount If not '', show currency + amount according to langs ($10, 10€).
* @return string Amount + Currency symbol encoded into UTF8
* @deprecated Use method price to output a price
+ * @see price()
*/
function getCurrencyAmount($currency_code, $amount)
{
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 3901e3231df..3a35c961905 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -833,6 +833,7 @@ function unActivateModule($value, $requiredby=1)
{
$objMod = new $modName($db);
$result=$objMod->remove();
+ if ($result <= 0) $ret=$objMod->error;
}
else
{
@@ -846,7 +847,7 @@ function unActivateModule($value, $requiredby=1)
}
// Desactivation des modules qui dependent de lui
- if ($requiredby)
+ if (! $ret && $requiredby)
{
$countrb=count($objMod->requiredby);
for ($i = 0; $i < $countrb; $i++)
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index efee824c092..9c93fa8fe89 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -82,7 +82,7 @@ function societe_prepare_head(Societe $object)
$h++;
}
//show categorie tab
- if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
+ /*if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$type = Categorie::TYPE_CUSTOMER;
@@ -91,7 +91,7 @@ function societe_prepare_head(Societe $object)
$head[$h][1] = $langs->trans('Categories');
$head[$h][2] = 'category';
$h++;
- }
+ }*/
// Tab to link resources
if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES))
diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index 44507bbb919..088c36e06df 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -278,8 +278,8 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt
* YYYYMMDDHHMMSS
* YYYYMMDDTHHMMSSZ
* YYYY-MM-DDTHH:MM:SSZ (RFC3339)
- * DD/MM/YY or DD/MM/YYYY (this format should not be used anymore)
- * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore)
+ * DD/MM/YY or DD/MM/YYYY (deprecated)
+ * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (deprecated)
* @param int $gm 1 =Input date is GM date,
* 0 =Input date is local date using PHP server timezone
* @return int Date as a timestamp
@@ -292,7 +292,7 @@ function dol_stringtotime($string, $gm=1)
// Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used.
if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i',$string,$reg))
{
- dol_syslog("dol_stringtotime call to function with deprecated parameter", LOG_WARNING);
+ dol_syslog("dol_stringtotime call to function with deprecated parameter format", LOG_WARNING);
// Date est au format 'DD/MM/YY' ou 'DD/MM/YY HH:MM:SS'
// Date est au format 'DD/MM/YYYY' ou 'DD/MM/YYYY HH:MM:SS'
$sday = $reg[1];
diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php
index 1fdd2399610..c9362425459 100644
--- a/htdocs/core/lib/donation.lib.php
+++ b/htdocs/core/lib/donation.lib.php
@@ -24,15 +24,14 @@
/**
* Prepare array with list of admin tabs
*
- * @param Donation $object Donation
* @return array Array of tabs to show
*/
-function donation_admin_prepare_head($object)
+function donation_admin_prepare_head()
{
global $langs, $conf;
$h = 0;
- $head = array ();
+ $head = array();
$head[$h][0] = DOL_URL_ROOT . '/don/admin/donation.php';
$head[$h][1] = $langs->trans("Miscellaneous");
@@ -43,14 +42,14 @@ function donation_admin_prepare_head($object)
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
- complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation_admin');
+ complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin');
$head[$h][0] = DOL_URL_ROOT . '/don/admin/donation_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFields");
$head[$h][2] = 'attributes';
$h++;
- complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation_admin', 'remove');
+ complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin', 'remove');
return $head;
}
@@ -66,7 +65,7 @@ function donation_prepare_head($object)
global $langs, $conf;
$h = 0;
- $head = array ();
+ $head = array();
$head[$h][0] = DOL_URL_ROOT . '/don/card.php?id=' . $object->id;
$head[$h][1] = $langs->trans("Card");
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6a9376b57f9..b164636ceb7 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -45,10 +45,13 @@ include_once DOL_DOCUMENT_ROOT .'/core/lib/json.lib.php';
* @param string $class Class name
* @param string $member Name of property
* @return mixed Return value of static property
- * @deprecated Dolibarr now requires 5.3.0+
+ * @deprecated Dolibarr now requires 5.3.0+, use $class::$property syntax
+ * @see https://php.net/manual/language.oop5.static.php
*/
function getStaticMember($class, $member)
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
// This part is deprecated. Uncomment if for php 5.2.*, and comment next isset class::member
/*if (version_compare(phpversion(), '5.3.0', '<'))
{
@@ -227,7 +230,7 @@ function dol_shutdown()
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie)
* @param int $filter Filter to apply when $check is set to custom. (See http://php.net/manual/en/filter.filters.php for détails)
* @param mixed $options Options to pass to filter_var when $check is set to custom
- * @return string||string[] Value found (string or array), or '' if check fails
+ * @return string|string[] Value found (string or array), or '' if check fails
*/
function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
{
@@ -387,11 +390,12 @@ function dol_buildpath($path, $type=0)
*
* @param object $object Object to clone
* @return object Object clone
- * @deprecated Dolibarr no longer supports PHP4, you can now use native function
+ * @deprecated Dolibarr no longer supports PHP4, use PHP5 native clone construct
+ * @see https://php.net/manual/language.oop5.cloning.php
*/
function dol_clone($object)
{
- dol_syslog("Functions.lib::dol_clone Clone object");
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
$myclone=clone($object);
return $myclone;
@@ -831,6 +835,25 @@ function dol_get_fiche_end($notab=0)
else return '';
}
+/**
+ * Show a string with the label tag dedicated to the HTML edit field.
+ *
+ * @param string $langkey Translation key
+ * @param string $fieldkey Key of the html select field the text refers to
+ * @param int $fieldrequired 1=Field is mandatory
+ */
+function fieldLabel($langkey, $fieldkey, $fieldrequired=0)
+{
+ global $conf, $langs;
+ $ret='';
+ if ($fieldrequired) $ret.='';
+ if (empty($conf->dol_use_jmobile)) $ret.='';
+ if ($fieldrequired) $ret.='';
+ return $ret;
+}
+
/**
* Return string to add class property on html element with pair/impair.
*
@@ -1702,11 +1725,15 @@ function dol_substr($string,$start,$length,$stringencoding='')
* @param string $url Param to add an url to click values
* @return void
* @deprecated
+ * @see DolGraph
*/
function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',$showpercent=0,$url='')
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
global $conf,$langs;
global $theme_datacolor; // To have var kept when function is called several times
+
if (empty($conf->use_javascript_ajax)) return;
$jsgraphlib='flot';
$datacolor=array();
@@ -2186,7 +2213,7 @@ function img_help($usehelpcursor = 1, $usealttitle = 1)
else $usealttitle = $langs->trans('Info');
}
- return img_picto($usealttitle, 'info.png', ($usehelpcursor ? 'style="cursor: help"' : ''));
+ return img_picto($usealttitle, 'info.png', ($usehelpcursor ? 'style="vertical-align: middle; cursor: help"' : 'style="vertical-align: middle;"'));
}
/**
@@ -2201,7 +2228,7 @@ function img_info($titlealt = 'default')
if ($titlealt == 'default') $titlealt = $langs->trans('Informations');
- return img_picto($titlealt, 'info.png');
+ return img_picto($titlealt, 'info.png', 'style="vertical-align: middle;"');
}
/**
@@ -2380,9 +2407,12 @@ function img_mime($file, $titlealt = '')
* @param int $option Option
* @return string Return img tag
* @deprecated
+ * @see img_picto
*/
function img_phone($titlealt = 'default', $option = 0)
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
global $conf,$langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Call');
@@ -2452,7 +2482,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0)
return img_picto($text, 'info', 'class="hideonsmartphone"');
}
- return ($nodiv?'':'
');
}
@@ -2702,9 +2732,12 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
* @param string $title Title to show
* @return string Title to show
* @deprecated Use print_fiche_titre instead
+ * @see print_fiche_titre
*/
function print_titre($title)
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
print '
'.$title.'
';
}
@@ -2717,6 +2750,7 @@ function print_titre($title)
* @param int $pictoisfullpath 1=Icon name is a full absolute url of image
* @param int $id To force an id on html objects
* @return void
+ * @deprecated Use print load_fiche_titre instead
*/
function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id='')
{
@@ -4059,9 +4093,12 @@ function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8')
*
* @return float Time (millisecondes) with microsecondes in decimal part
* @deprecated Dolibarr does not support PHP4, you should use native function
+ * @see microtime()
*/
function dol_microtime_float()
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
return microtime(true);
}
@@ -4281,6 +4318,8 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1)
*/
function setEventMessage($mesgs, $style='mesgs')
{
+ dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
+
if (! is_array($mesgs)) // If mesgs is a string
{
if ($mesgs) $_SESSION['dol_events'][$style][] = $mesgs;
diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php
index 121e719bb6f..e3f00a064e5 100644
--- a/htdocs/core/lib/json.lib.php
+++ b/htdocs/core/lib/json.lib.php
@@ -42,6 +42,7 @@ if (! function_exists('json_encode'))
*
* @param mixed $elements PHP Object to json encode
* @return string Json encoded string
+ * @deprecated PHP >= 5.3 supports native json_encode
*/
function dol_json_encode($elements)
{
@@ -219,6 +220,7 @@ if (! function_exists('json_decode'))
* @param string $json Json encoded to PHP Object or Array
* @param bool $assoc False return an object, true return an array. Try to always use it with true !
* @return mixed Object or Array or false on error
+ * @deprecated PHP >= 5.3 supports native json_decode
*/
function dol_json_decode($json, $assoc=false)
{
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index ee024c60c2a..1bf4c9531df 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -541,8 +541,8 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
{
$projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref;
+ $projectstatic->title=$lines[$i]->projectlabel;
$projectstatic->public=$lines[$i]->public;
- $projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
$taskstatic->id=$lines[$i]->id;
@@ -550,7 +550,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
// Project
print "
';
+
+ print ' ';
}
diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php
index ceec1d34adb..1e13bd725b3 100644
--- a/htdocs/cron/info.php
+++ b/htdocs/cron/info.php
@@ -26,6 +26,8 @@ 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';
+$langs->load("admin");
+$langs->load("cron");
// Security check
if (!$user->rights->cron->read) accessforbidden();
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index 43a4a76e725..15f9234e7b2 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -1,7 +1,7 @@
- * Copyright (C) 2013 Laurent Destailleur
+ * Copyright (C) 2013-2015 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
@@ -165,6 +165,7 @@ print '';
print '
';
- print ' ';
+ dol_fiche_end();
/*
* Autres charges impayees
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index e0b5b791ada..28d61ca45f7 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -77,7 +77,21 @@ class Expedition extends CommonObject
var $trueSize;
var $date_delivery; // Date delivery planed
- var $date_expedition; // Date delivery real
+ /**
+ * @deprecated
+ * @see date_shipping
+ */
+ var $date;
+ /**
+ * @deprecated
+ * @see date_shipping
+ */
+ var $date_expedition;
+ /**
+ * Effective delivery date
+ * @var int
+ */
+ public $date_shipping;
var $date_creation;
var $date_valid;
@@ -459,8 +473,8 @@ class Expedition extends CommonObject
$this->statut = $obj->fk_statut;
$this->user_author_id = $obj->fk_user_author;
$this->date_creation = $this->db->jdate($obj->date_creation);
- $this->date = $this->db->jdate($obj->date_expedition); // TODO obsolete
- $this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO obsolete
+ $this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated
+ $this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO deprecated
$this->date_shipping = $this->db->jdate($obj->date_expedition); // Date real
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed
$this->fk_delivery_address = $obj->fk_address;
@@ -783,10 +797,11 @@ class Expedition extends CommonObject
$orderline = new OrderLine($this->db);
$orderline->fetch($id);
- $fk_product = $orderline->fk_product;
- if (! empty($orderline->fk_product))
+ if (! empty($conf->stock->enabled) && ! empty($orderline->fk_product))
{
+ $fk_product = $orderline->fk_product;
+
if (! ($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS))
{
$this->error=$langs->trans("ErrorWarehouseRequiredIntoShipmentLine");
@@ -1708,9 +1723,10 @@ class ExpeditionLigne
// From llx_commandedet or llx_propaldet
var $qty_asked;
- var $libelle; // Label produit
- var $product_desc; // Description produit
- var $ref;
+ public $product_ref;
+ public $product_label;
+ public $product_desc;
+
// Invoicing
var $remise_percent;
@@ -1720,6 +1736,24 @@ class ExpeditionLigne
var $total_localtax1; // Total Local tax 1
var $total_localtax2; // Total Local tax 2
+ public $fk_origin_line;
+
+ // Deprecated
+ /**
+ * @deprecated
+ * @see fk_origin_line
+ */
+ var $origin_line_id;
+ /**
+ * @deprecated
+ * @see product_ref
+ */
+ var $ref;
+ /**
+ * @deprecated
+ * @see product_label
+ */
+ var $libelle;
/**
* Constructor
diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php
index 9c6d2c7679a..abca7594962 100644
--- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php
@@ -41,6 +41,7 @@ print_titre($langs->trans('RelatedShippings'));
trans("Status"); ?>
-
\ No newline at end of file
+
diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php
index 7c0e9f14a0b..45ba2b24f8c 100644
--- a/htdocs/filefunc.inc.php
+++ b/htdocs/filefunc.inc.php
@@ -37,22 +37,17 @@ if (! defined('EURO')) define('EURO',chr(128));
// Define syslog constants
if (! defined('LOG_DEBUG'))
{
- if (function_exists("define_syslog_variables"))
- {
- define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
- }
- else
- {
- // Pour PHP sans syslog (comme sous Windows)
- define('LOG_EMERG',0);
- define('LOG_ALERT',1);
- define('LOG_CRIT',2);
- define('LOG_ERR',3);
- define('LOG_WARNING',4);
- define('LOG_NOTICE',5);
- define('LOG_INFO',6);
- define('LOG_DEBUG',7);
- }
+ if (! function_exists("syslog")) {
+ // For PHP versions without syslog (like running on Windows OS)
+ define('LOG_EMERG',0);
+ define('LOG_ALERT',1);
+ define('LOG_CRIT',2);
+ define('LOG_ERR',3);
+ define('LOG_WARNING',4);
+ define('LOG_NOTICE',5);
+ define('LOG_INFO',6);
+ define('LOG_DEBUG',7);
+ }
}
// End of common declaration part
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index ccd17a2f97b..6628aeb19d7 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -55,6 +55,7 @@ class CommandeFournisseur extends CommonOrder
/**
* TODO: Remove
* @deprecated
+ * @see product_ref
*/
var $ref;
var $product_ref;
@@ -78,8 +79,13 @@ class CommandeFournisseur extends CommonOrder
var $total_localtax2; // Total Local tax 2
var $total_ttc;
var $source;
+ /**
+ * @deprecated
+ * @see note_private, note_public
+ */
var $note;
- var $note_public;
+ public $note_private;
+ public $note_public;
var $model_pdf;
var $fk_project;
var $cond_reglement_id;
@@ -2465,6 +2471,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
* Supplier ref
* @var string
* @deprecated Use ref_supplier
+ * @see ref_supplier
*/
public $ref_fourn;
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 1cfbe941d9a..03ff0ff1eb2 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -58,12 +58,9 @@ class FactureFournisseur extends CommonInvoice
var $type = self::TYPE_STANDARD;
/**
- * Check constants for more info:
- * - STATUS_DRAFT
- * - STATUS_VALIDATED
- * - STATUS_PAID
- * - STATUS_ABANDONED
+ * Supplier invoice status
* @var int
+ * @see FactureFournisseur::STATUS_DRAFT, FactureFournisseur::STATUS_VALIDATED, FactureFournisseur::STATUS_PAID, FactureFournisseur::STATUS_ABANDONED
*/
var $statut;
//! 1 si facture payee COMPLETEMENT, 0 sinon (ce champ ne devrait plus servir car insuffisant)
@@ -85,7 +82,11 @@ class FactureFournisseur extends CommonInvoice
var $total_localtax1;
var $total_localtax2;
var $total_ttc;
- var $note; // deprecated
+ /**
+ * @deprecated
+ * @see note_private, note_public
+ */
+ var $note;
var $note_private;
var $note_public;
var $propalid;
@@ -100,7 +101,10 @@ class FactureFournisseur extends CommonInvoice
* @var SupplierInvoiceLine[]
*/
public $lines = array();
- var $fournisseur; // deprecated
+ /**
+ * @deprecated
+ */
+ var $fournisseur;
//Incorterms
var $fk_incoterms;
@@ -1896,9 +1900,17 @@ class SupplierInvoiceLine extends CommonObjectLine
var $oldline;
+ /**
+ * @deprecated
+ * @see product_ref
+ */
public $ref;
public $product_ref;
public $ref_supplier;
+ /**
+ * @deprecated
+ * @see label
+ */
public $libelle;
public $product_desc;
@@ -1906,8 +1918,10 @@ class SupplierInvoiceLine extends CommonObjectLine
* Unit price before taxes
* @var float
* @deprecated Use $subprice
+ * @see subprice
*/
public $pu_ht;
+ public $subprice;
/**
* Unit price included taxes
@@ -1919,8 +1933,10 @@ class SupplierInvoiceLine extends CommonObjectLine
* Total VAT amount
* @var float
* @deprecated Use $total_tva instead
+ * @see total_tva
*/
public $tva;
+ public $total_tva;
/**
* Id of the corresponding supplier invoice
@@ -1932,7 +1948,7 @@ class SupplierInvoiceLine extends CommonObjectLine
* Product label
* @var string
*/
- var $label; // deprecated
+ var $label;
/**
* Description of the line
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index 48c238d60be..9c4a95c7c52 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -42,7 +42,11 @@ class ProductFournisseur extends Product
var $product_fourn_price_id; // id of ligne product-supplier
var $id; // product id
- var $fourn_ref; // deprecated
+ /**
+ * @deprecated
+ * @see ref_supplier
+ */
+ var $fourn_ref;
var $delivery_time_days;
var $ref_supplier; // ref supplier (can be set by get_buyprice)
var $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice)
@@ -161,6 +165,7 @@ class ProductFournisseur extends Product
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0)
{
global $conf, $langs;
+ //global $mysoc;
// Clean parameter
if (empty($qty)) $qty=0;
@@ -348,7 +353,8 @@ class ProductFournisseur extends Product
if ($obj)
{
$this->product_fourn_price_id = $rowid;
- $this->fourn_ref = $obj->ref_fourn;
+ $this->fourn_ref = $obj->ref_fourn; // deprecated
+ $this->ref_supplier = $obj->ref_fourn;
$this->fourn_price = $obj->price;
$this->fourn_charges = $obj->charges;
$this->fourn_qty = $obj->quantity;
diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
index 3fb22d4a101..0c2d5eed0af 100644
--- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
@@ -39,6 +39,7 @@ print_titre($langs->trans('RelatedSupplierOrders'));
trans("Status"); ?>
-
\ No newline at end of file
+
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index bf310d92f8d..b4b853b58bc 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1508,7 +1508,16 @@ if ($action == 'create')
$langs->load('orders');
$txt=$langs->trans("SupplierOrder");
}
- print '
'.$txt.'
'.$objectsrc->getNomUrl(1).'
';
+ print '
'.$txt.'
'.$objectsrc->getNomUrl(1);
+ //We check if Origin document has already an invoice attached to it
+ $objectsrc->fetchObjectLinked($originid,'','','invoice_supplier');
+ $cntinvoice=count($objectsrc->linkedObjects['invoice_supplier']);
+ if ($cntinvoice>=1)
+ {
+ setEventMessage('WarningBillExist','warnings');
+ echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')';
+ }
+ echo '
';
print '
'.$langs->trans('TotalHT').'
'.price($objectsrc->total_ht).'
';
print '
'.$langs->trans('TotalVAT').'
'.price($objectsrc->total_tva)."
";
if ($mysoc->country_code=='ES')
diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
index 6bbee5a33fc..81f259d67c6 100644
--- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
@@ -40,6 +40,7 @@ print_titre($langs->trans("RelatedSupplierInvoices"));
trans("Status"); ?>
-
\ No newline at end of file
+
diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php
index 90492fa16f1..f76d9843e02 100644
--- a/htdocs/holiday/class/holiday.class.php
+++ b/htdocs/holiday/class/holiday.class.php
@@ -38,6 +38,10 @@ class Holiday extends CommonObject
var $error;
var $errors=array();
+ /**
+ * @deprecated
+ * @see id
+ */
var $rowid;
var $ref;
diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
index e73b716a654..399f8099ca6 100755
--- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
+++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
@@ -98,36 +98,36 @@ ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL
ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author;
-- Qual
-UPDATE llx_const SET name = 'ACCOUNTING_MODE' WHERE name = 'COMPTA_MODE';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_CUSTOMER' WHERE name = 'COMPTA_ACCOUNT_CUSTOMER';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUPPLIER' WHERE name = 'COMPTA_ACCOUNT_SUPPLIER';
-UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_BUY_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_BUY_ACCOUNT' WHERE name = 'COMPTA_SERVICE_BUY_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT' WHERE name = 'COMPTA_SERVICE_SOLD_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_VAT_ACCOUNT' WHERE name = 'COMPTA_VAT_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_VAT_BUY_ACCOUNT' WHERE name = 'COMPTA_VAT_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MODE')__ WHERE __DECRYPT('name')__ = 'COMPTA_MODE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_CUSTOMER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_CUSTOMER';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUPPLIER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_SUPPLIER';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_SOLD_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_BUY_ACCOUNT';
-- Compatibility with module Accounting Expert
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DATE' WHERE name = 'ACCOUNTINGEX_EXP_DATE';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_PIECE' WHERE name = 'ACCOUNTINGEX_EXP_PIECE';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT' WHERE name = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_LABEL' WHERE name = 'ACCOUNTINGEX_EXP_LABEL';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_AMOUNT' WHERE name = 'ACCOUNTINGEX_EXP_AMOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DEVISE' WHERE name = 'ACCOUNTINGEX_EXP_DEVISE';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUSPENSE' WHERE name = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
-UPDATE llx_const SET name = 'ACCOUNTING_SELL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SELL_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_PURCHASE_JOURNAL' WHERE name = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_SOCIAL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_MISCELLANEOUS_JOURNAL' WHERE name = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' WHERE name = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
-UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_GACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_AACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_LIMIT_LIST_VENTILATION' WHERE name = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
-UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_TODO' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
-UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_DONE' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_MODELCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MODELCSV';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_SEPARATORCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SEPARATORCSV';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DATE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DATE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_PIECE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_PIECE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_GLOBAL_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_LABEL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_LABEL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_AMOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_AMOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DEVISE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DEVISE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUSPENSE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SELL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SELL_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PURCHASE_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SOCIAL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MISCELLANEOUS_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_TRANSFER_CASH')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_GACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_AACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIMIT_LIST_VENTILATION')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_TODO')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_DONE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
-- Drop old table
DROP TABLE llx_compta;
@@ -1133,9 +1133,9 @@ ALTER TABLE llx_c_email_templates ADD UNIQUE INDEX uk_c_email_templates(entity,
ALTER TABLE llx_c_email_templates ADD INDEX idx_type(type_template);
-- Remove OSC module
-DELETE FROM llx_const WHERE name = 'MAIN_MODULE_BOUTIQUE';
-DELETE FROM llx_const WHERE name = 'OSC_DB_HOST';
-DELETE FROM llx_menu WHERE module = 'boutique';
+DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MODULE_BOUTIQUE';
+DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'OSC_DB_HOST';
+DELETE FROM llx_menu WHERE __DECRYPT('module')__ = 'boutique';
-- Add option always editable on extrafield
ALTER TABLE llx_extrafields ADD alwayseditable INTEGER DEFAULT 0 AFTER pos;
@@ -1181,4 +1181,5 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_typ
ALTER TABLE llx_livraison MODIFY COLUMN date_delivery DATETIME NULL DEFAULT NULL;
-INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT 'PRODUCT_USE_OLD_PATH_FOR_PHOTO','1','chaine','Use old path for products images',0,1 FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL' AND value < '3.7.0';
+-- This constant is for compatibility if user come from 3.6 or lower. Must not be enabled on 3.7.0 or +
+INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT __ENCRYPT('PRODUCT_USE_OLD_PATH_FOR_PHOTO')__,__ENCRYPT('1')__,'chaine','Use old path for products images',1,0 FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_VERSION_LAST_INSTALL' AND __DECRYPT('value')__ < '3.7.0';
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index 7a788a7d352..140475ed5df 100755
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -32,7 +32,9 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2
ALTER TABLE llx_societe_rib ADD COLUMN rum varchar(32) after default_rib;
ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16) default 'FRST' after rum;
-
+ALTER TABLE llx_cronjob ADD COLUMN entity integer DEFAULT 0;
+ALTER TABLE llx_cronjob MODIFY COLUMN params text NULL;
+
-- Loan
create table llx_loan
(
@@ -155,12 +157,12 @@ ALTER TABLE llx_facturedet ADD COLUMN situation_percent real;
ALTER TABLE llx_facturedet ADD COLUMN fk_prev_id integer;
-- Convert SMTP config to main entity, so new entities don't get the old values
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SENDMODE";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTP_PORT";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTP_SERVER";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTPS_ID";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTPS_PW";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_EMAIL_TLS";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SENDMODE";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTP_PORT";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTP_SERVER";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTPS_ID";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTPS_PW";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_EMAIL_TLS";
create table llx_bank_account_extrafields
diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql
index a7ed4858024..5580b5ab830 100644
--- a/htdocs/install/mysql/tables/llx_cronjob.sql
+++ b/htdocs/install/mysql/tables/llx_cronjob.sql
@@ -29,7 +29,7 @@ CREATE TABLE llx_cronjob
classesname varchar(255),
objectname varchar(255),
methodename varchar(255),
- params text NOT NULL,
+ params text,
md5params varchar(32),
module_name varchar(255),
priority integer DEFAULT 0,
@@ -47,5 +47,6 @@ CREATE TABLE llx_cronjob
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,
note text,
- libname varchar(255)
+ libname varchar(255),
+ entity integer DEFAULT 0
)ENGINE=innodb;
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 913b21bdd14..6f14791f6b4 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -363,7 +363,13 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
{
migrate_event_assignement($db,$langs,$conf);
-
+ }
+
+ // Scripts for lat version
+ $afterversionarray=explode('.','3.7.9');
+ $beforeversionarray=explode('.','3.8.9');
+ if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
+ {
// Reload modules (this must be always and only into last targeted version)
$listofmodule=array(
'MAIN_MODULE_AGENDA',
@@ -3818,8 +3824,9 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Service");
+
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
$mod=new modService($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3828,8 +3835,9 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Commande");
+
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
$mod=new modCommande($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3838,8 +3846,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Facture");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
$mod=new modFacture($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3878,8 +3886,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ECM");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
$mod=new modECM($db);
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
$mod->init('newboxdefonly');
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 2c6db68dac7..163267ff52f 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -149,7 +149,6 @@ MenuForUsers=Menu for users
LangFile=.lang file
System=System
SystemInfo=System information
-SystemTools=System tools
SystemToolsArea=System tools area
SystemToolsAreaDesc=This area provides administration features. Use the menu to choose the feature you're looking for.
Purge=Purge
@@ -232,8 +231,8 @@ Security=Security
Passwords=Passwords
DoNotStoreClearPassword=Do no store clear passwords in database but store only encrypted value (Activated recommended)
MainDbPasswordFileConfEncrypted=Database password encrypted in conf.php (Activated recommended)
-InstrucToEncodePass=To have password encoded into the conf.php file, replace the line $dolibarr_main_db_pass="..." by $dolibarr_main_db_pass="crypted:%s"
-InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line $dolibarr_main_db_pass="crypted:..." by $dolibarr_main_db_pass="%s"
+InstrucToEncodePass=To have password encoded into the conf.php file, replace the line $dolibarr_main_db_pass="..."; by $dolibarr_main_db_pass="crypted:%s";
+InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line $dolibarr_main_db_pass="crypted:..."; by $dolibarr_main_db_pass="%s";
ProtectAndEncryptPdfFiles=Protection of generated pdf files (Activated NOT recommended, breaks mass pdf generation)
ProtectAndEncryptPdfFilesDesc=Protection of a PDF document keeps it available to read and print with any PDF browser. However, editing and copying is not possible anymore. Note that using this feature make building of a global cumulated pdf not working (like unpaid invoices).
Feature=Feature
@@ -940,6 +939,7 @@ CompanyZip=Zip
CompanyTown=Town
CompanyCountry=Country
CompanyCurrency=Main currency
+CompanyObject=Object of the company
Logo=Logo
DoNotShow=Do not show
DoNotSuggestPaymentMode=Do not suggest
@@ -1637,3 +1637,6 @@ SomethingMakeInstallFromWebNotPossible=Installation of external module is not po
SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is only manual steps a privileged user can do.
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature.
ConfFileMuseContainCustom=Installing an external module from application save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to have option - $dolibarr_main_url_root_alt enabled to value $dolibarr_main_url_root_alt="/custom" - $dolibarr_main_document_root_alt enabled to value "%s/custom"
+HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
+PressF5AfterChangingThis=Press F5 on keyboard after changing this value to have it effective
+NotSupportedByAllThemes=Will works with eldy theme but is not supported by all themes
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index e700271368d..a0626c1087f 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -410,10 +410,10 @@ OutstandingBillReached=Reached max. for outstanding bill
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.
LeopardNumRefModelDesc=The code is free. This code can be modified at any time.
ManagingDirectors=Manager(s) name (CEO, director, president...)
-SearchThirdparty=Search thirdparty
+SearchThirdparty=Search third party
SearchContact=Search contact
-MergeOriginThirdparty=Origin thirdparty
-MergeThirdparties=Merge thirdparties
-ConfirmMergeThirdparties=Are you sure you want to merge this thirdparty? All linked objects (invoices...) will be linked with the destination thirdparty
+MergeOriginThirdparty=Duplicate third party (third party you want to delete)
+MergeThirdparties=Merge third parties
+ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one ? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
ThirdpartiesMergeSuccess=Thirdparties have been merged
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
\ No newline at end of file
diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang
index 5d7abf732ab..ff511f00d27 100644
--- a/htdocs/langs/en_US/cron.lang
+++ b/htdocs/langs/en_US/cron.lang
@@ -4,10 +4,10 @@ About = About
CronAbout = About Cron
CronAboutPage = Cron about page
# Right
-Permission23101 = Read Scheduled task
-Permission23102 = Create/update Scheduled task
-Permission23103 = Delete Scheduled task
-Permission23104 = Execute Scheduled task
+Permission23101 = Read Scheduled job
+Permission23102 = Create/update Scheduled job
+Permission23103 = Delete Scheduled job
+Permission23104 = Execute Scheduled job
# Admin
CronSetup= Scheduled job management setup
URLToLaunchCronJobs=URL to check and launch cron jobs if required
@@ -55,9 +55,9 @@ CronEach=Every
JobFinished=Job launched and finished
#Page card
CronAdd= Add jobs
-CronHourStart= Start hour and date of task
-CronEvery= And execute task each
-CronObject= Instance/Object to create
+CronHourStart= Start hour and date of job
+CronEvery=Execute job each
+CronObject=Instance/Object to create
CronArgs=Parameters
CronSaveSucess=Save succesfully
CronNote=Comment
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index b61140df377..ae766c7a147 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -680,6 +680,7 @@ LinkedToSpecificUsers=Linked to a particular user contact
DeleteAFile=Delete a file
ConfirmDeleteAFile=Are you sure you want to delete file
NoResults=No results
+SystemTools=System tools
ModulesSystemTools=Modules tools
Test=Test
Element=Element
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 18c9b82de96..4fd51981a99 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -75,6 +75,7 @@ ListFichinterAssociatedProject=List of interventions associated with the project
ListExpenseReportsAssociatedProject=List of expense reports associated with the project
ListDonationsAssociatedProject=List of donations associated with the project
ListActionsAssociatedProject=List of events associated with the project
+ListTaskTimeUserProject=List of time consumed on tasks of project
ActivityOnProjectThisWeek=Activity on project this week
ActivityOnProjectThisMonth=Activity on project this month
ActivityOnProjectThisYear=Activity on project this year
@@ -145,4 +146,6 @@ InputPerWeek=Input per week
InputPerAction=Input per action
TimeAlreadyRecorded=Time spent already recorded for this task/day and user %s
ProjectsWithThisUserAsContact=Projects with this user as contact
-TasksWithThisUserAsContact=Tasks assigned to this user
\ No newline at end of file
+TasksWithThisUserAsContact=Tasks assigned to this user
+ResourceNotAssignedToProject=Not assigned to project
+ResourceNotAssignedToTask=Not assigned to task
\ No newline at end of file
diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang
index 0f5f636a3f3..953a9c7540c 100644
--- a/htdocs/langs/en_US/salaries.lang
+++ b/htdocs/langs/en_US/salaries.lang
@@ -10,4 +10,6 @@ SalariesPayments=Salaries payments
ShowSalaryPayment=Show salary payment
THM=Average hourly price
TJM=Average daily price
-CurrentSalary=Current salary
\ No newline at end of file
+CurrentSalary=Current salary
+THMDescription=This value may be used to calculate cost of time consumed on a project entered by users if module project is used
+TJMDescription=This value is currently as information only and is not used for any calculation
diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang
index 9670d002be6..e6764df49a2 100644
--- a/htdocs/langs/en_US/users.lang
+++ b/htdocs/langs/en_US/users.lang
@@ -57,6 +57,7 @@ RemoveFromGroup=Remove from group
PasswordChangedAndSentTo=Password changed and sent to %s.
PasswordChangeRequestSent=Request to change password for %s sent to %s.
MenuUsersAndGroups=Users & Groups
+MenuMyUserCard=My user card
LastGroupsCreated=Last %s created groups
LastUsersCreated=Last %s users created
ShowGroup=Show group
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 52db876fbf0..3a1704f8d8d 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -52,6 +52,11 @@ class Livraison extends CommonObject
var $ref_customer;
var $statut;
+ /**
+ * @deprecated
+ * @see note_public, note_private
+ */
+ var $note;
var $note_public;
var $note_private;
@@ -1014,10 +1019,8 @@ class Livraison extends CommonObject
/**
* Classe de gestion des lignes de bons de livraison
*/
-class LivraisonLigne
+class LivraisonLigne extends CommonObjectLine
{
- var $db;
-
// From llx_expeditiondet
var $qty;
var $qty_asked;
@@ -1027,7 +1030,19 @@ class LivraisonLigne
var $origin_id;
var $label; // Label produit
var $description; // Description produit
+ /**
+ * @deprecated
+ * @see product_ref
+ */
var $ref;
+ /**
+ * @deprecated
+ * @see product_label;
+ */
+ var $libelle;
+
+ public $product_ref;
+ public $product_label;
/**
* Constructor
diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php
index 51961e37e6e..35ce4cbaaa0 100644
--- a/htdocs/loan/class/paymentloan.class.php
+++ b/htdocs/loan/class/paymentloan.class.php
@@ -52,6 +52,12 @@ class PaymentLoan extends CommonObject
var $fk_user_creat;
var $fk_user_modif;
+ /**
+ * @deprecated
+ * @see amount, amounts
+ */
+ var $total;
+
/**
* Constructor
*
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 13ef97c514e..7a390ab7d9d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1877,9 +1877,9 @@ if (! function_exists("llxFooter"))
if ($comment) print ''."\n";
printCommonFooter($zone);
+ //var_dump($langs); // Uncommment to see the property _tab_loaded to see which language file were loaded
if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print ' '."\n"; // End div container
-
print "