diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index c2da46c6911..ba6f53e3785 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -37,6 +37,9 @@ class AccountingAccount extends CommonObject
*/
public $table_element='accounting_account';
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
public $picto = 'billr';
/**
diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php
index 852a70d38c2..dc34d0adf40 100644
--- a/htdocs/accountancy/class/accountingjournal.class.php
+++ b/htdocs/accountancy/class/accountingjournal.class.php
@@ -42,6 +42,10 @@ class AccountingJournal extends CommonObject
public $fk_element = '';
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
+
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
public $picto = 'generic';
/**
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index f9a02252387..fdb0a03aa00 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -53,66 +53,69 @@ class Adherent extends CommonObject
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
- var $mesgs;
+ public $mesgs;
- var $login;
+ public $login;
//! Clear password in memory
- var $pass;
+ public $pass;
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
- var $pass_indatabase;
+ public $pass_indatabase;
//! Encrypted password in database (always defined)
- var $pass_indatabase_crypted;
+ public $pass_indatabase_crypted;
- var $societe;
- var $company;
- var $address;
- var $zip;
- var $town;
+ public $societe;
+ public $company;
+ public $address;
+ public $zip;
+ public $town;
- var $state_id; // Id of department
- var $state_code; // Code of department
- var $state; // Label of department
+ public $state_id; // Id of department
+ public $state_code; // Code of department
+ public $state; // Label of department
- var $email;
- var $skype;
- var $phone;
- var $phone_perso;
- var $phone_mobile;
+ public $email;
+ public $skype;
+ public $phone;
+ public $phone_perso;
+ public $phone_mobile;
- var $morphy;
- var $public;
- var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
- var $photo;
+ public $morphy;
+ public $public;
+ public $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
+ public $photo;
- var $datec;
- var $datem;
- var $datefin;
- var $datevalid;
- var $birth;
+ public $datec;
+ public $datem;
+ public $datefin;
+ public $datevalid;
+ public $birth;
- var $note_public;
- var $note_private;
+ public $note_public;
+ public $note_private;
- var $typeid; // Id type adherent
- var $type; // Libelle type adherent
- var $need_subscription;
+ public $typeid; // Id type adherent
+ public $type; // Libelle type adherent
+ public $need_subscription;
- var $user_id;
- var $user_login;
+ public $user_id;
+ public $user_login;
- var $fk_soc;
+ /**
+ * @var int Thirdparty ID
+ */
+ public $fk_soc;
// Fields loaded by fetch_subscriptions()
- var $first_subscription_date;
- var $first_subscription_amount;
- var $last_subscription_date;
- var $last_subscription_date_start;
- var $last_subscription_date_end;
- var $last_subscription_amount;
- var $subscriptions=array();
+ public $first_subscription_date;
+ public $first_subscription_amount;
+ public $last_subscription_date;
+ public $last_subscription_date_start;
+ public $last_subscription_date_end;
+ public $last_subscription_amount;
+ public $subscriptions=array();
- var $oldcopy; // To contains a clone of this when we need to save old properties of object
+ public $oldcopy; // To contains a clone of this when we need to save old properties of object
/**
* @var int Entity
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index b7d510a3e0f..ba2f2306092 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -36,13 +36,17 @@ class AdherentType extends CommonObject
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'adherent_type';
-
+
/**
* @var string ID to identify managed object
*/
public $element = 'adherent_type';
-
+
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
public $picto = 'group';
+
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
/**
@@ -51,19 +55,25 @@ class AdherentType extends CommonObject
* @see label
*/
public $libelle;
+
/** @var string Label */
public $label;
+
/**
* @var int Subsription required (0 or 1)
* @since 5.0
*/
public $subscription;
+
/** @var string Public note */
public $note;
+
/** @var integer Can vote */
public $vote;
+
/** @var string Email sent during validation */
public $mail_valid;
+
/** @var array Array of members */
public $members=array();
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index 90452816be8..85b024a1582 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -36,21 +36,24 @@ class Subscription extends CommonObject
* @var string ID to identify managed object
*/
public $element='subscription';
-
+
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='subscription';
-
- public $picto='payment';
- var $datec; // Date creation
- var $datem; // Date modification
- var $dateh; // Subscription start date (date subscription)
- var $datef; // Subscription end date
- var $fk_adherent;
- var $amount;
- var $fk_bank;
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
+ public $picto='payment';
+
+ public $datec; // Date creation
+ public $datem; // Date modification
+ public $dateh; // Subscription start date (date subscription)
+ public $datef; // Subscription end date
+ public $fk_adherent;
+ public $amount;
+ public $fk_bank;
/**
diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 14dfb9922f6..19fa67abcff 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -122,6 +122,13 @@ $modules=array(
),
);
+$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));
+
+
+/*
+ * Actions
+ */
+
if ($action == 'update')
{
foreach($modules as $module => $delays)
@@ -201,9 +208,10 @@ if ($action == 'edit')
print '
\';
+ $this->stringtoshow.='\';
},
background: {
opacity: 0.0,
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 550ecea4867..27d7fe521fe 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6674,16 +6674,17 @@ class Form
* @param string $imagesize 'mini', 'small' or '' (original)
* @param int $addlinktofullsize Add link to fullsize image
* @param int $cache 1=Accept to use image in cache
+ * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty.
* @return string HTML code to output photo
*/
- static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0)
+ static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='')
{
global $conf,$langs;
$entity = (! empty($object->entity) ? $object->entity : $conf->entity);
$id = (! empty($object->id) ? $object->id : $object->rowid);
- $ret='';$dir='';$file='';$originalfile='';$altfile='';$email='';
+ $ret='';$dir='';$file='';$originalfile='';$altfile='';$email='';$capture='';
if ($modulepart=='societe')
{
$dir=$conf->societe->multidir_output[$entity];
@@ -6707,6 +6708,7 @@ class Form
$originalfile=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo;
}
$email=$object->email;
+ $capture='user';
}
else if ($modulepart=='userphoto')
{
@@ -6720,6 +6722,7 @@ class Form
}
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
$email=$object->email;
+ $capture='user';
}
else if ($modulepart=='memberphoto')
{
@@ -6733,6 +6736,7 @@ class Form
}
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
$email=$object->email;
+ $capture='user';
}
else
{
@@ -6749,6 +6753,8 @@ class Form
$email=$object->email;
}
+ if ($forcecapture) $capture = $forcecapture;
+
if ($dir)
{
if ($file && file_exists($dir."/".$file))
@@ -6805,7 +6811,7 @@ class Form
if ($object->photo) $ret.=" \n";
$ret.='
';
/*
* Dolibarr Working Board with weather
*/
-$showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
+$showweather=(empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
//Array that contains all WorkboardResponse classes to process them
$dashboardlines=array();
@@ -536,7 +536,7 @@ $boxwork.=''."\n";
if ($showweather)
{
$boxwork.='
';
- $boxwork.='
';
+ $boxwork.='
';
$text='';
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')';
else $text=$langs->transnoentitiesnoconv("NoItemLate");
diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
index f5520b6f232..18b6440f45b 100644
--- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
+++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
@@ -60,7 +60,7 @@ DROP TABLE llx_c_accountancy_category;
DROP TABLE llx_c_accountingaccount;
-- drop old postgresql unique key
--- VPGSQL8.2 DROP INDEX llx_usergroup_rights_fk_usergroup_fk_id_key
+-- VPGSQL8.2 DROP INDEX llx_usergroup_rights_fk_usergroup_fk_id_key;
update llx_propal set fk_statut = 1 where fk_statut = -1;
diff --git a/htdocs/install/mysql/tables/llx_commande.key.sql b/htdocs/install/mysql/tables/llx_commande.key.sql
index 9652079846e..9134092195b 100644
--- a/htdocs/install/mysql/tables/llx_commande.key.sql
+++ b/htdocs/install/mysql/tables/llx_commande.key.sql
@@ -18,7 +18,7 @@
-- ============================================================================
--- Supprimme orphelins pour permettre montee de la cle
+-- Delete orphans
-- V4 DELETE llx_commande FROM llx_commande LEFT JOIN llx_societe ON llx_commande.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
ALTER TABLE llx_commande ADD UNIQUE INDEX uk_commande_ref (ref, entity);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 16ca7cc7201..e9fd709f6dc 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1809,3 +1809,4 @@ UseSearchToSelectResource=Use a search form to choose a resource (rather than a
DisabledResourceLinkUser=Disable feature to link a resource to users
DisabledResourceLinkContact=Disable feature to link a resource to contacts
ConfirmUnactivation=Confirm module reset
+OnMobileOnly=On small screen (smartphone) only
\ No newline at end of file
diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang
index 92d43edc7c1..f968d2ac1fb 100644
--- a/htdocs/langs/en_US/cron.lang
+++ b/htdocs/langs/en_US/cron.lang
@@ -79,5 +79,5 @@ CronCannotLoadObject=Class file %s was loaded, but object %s was not found into
UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs.
JobDisabled=Job disabled
MakeLocalDatabaseDumpShort=Local database backup
-MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep
+MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep
WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run.
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index cf88cf65cc9..96fbf755f9a 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -116,6 +116,7 @@ ErrorLoginDoesNotExists=User with login %s could not be found.
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
ErrorBadValueForCode=Bad value for security code. Try again with new value...
ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative
+ErrorFieldCantBeNegativeOnInvoice=Field %s can't be negative on such type of invoice. If you want to add a discount line, just create the discount first with link %s on screen and apply it to invoice. You can also ask your admin to set option FACTURE_ENABLE_NEGATIVE_LINES to 1 to restore old behaviour.
ErrorQtyForCustomerInvoiceCantBeNegative=Quantity for line into customer invoices can't be negative
ErrorWebServerUserHasNotPermission=User account %s used to execute web server has no permission for that
ErrorNoActivatedBarcode=No barcode type activated
diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang
index d707a0cc313..5e50c173fe7 100644
--- a/htdocs/langs/fr_FR/cron.lang
+++ b/htdocs/langs/fr_FR/cron.lang
@@ -79,5 +79,5 @@ CronCannotLoadObject=Le fichier de classe %s a été chargé, mais l'objet %s n'
UseMenuModuleToolsToAddCronJobs=Aller à la page "Accueil - Outils administration - Travaux planifiées" pour voir la listes des travaux programmées et les modifier.
JobDisabled=Travail désactivé
MakeLocalDatabaseDumpShort=Sauvegarde locale de base
-MakeLocalDatabaseDump=Créez un fichier dump de base local. Les paramètres sont: compression ('gz' ou 'bz' ou 'none'), type de sauvegarde ('mysql' ou 'pgsql'), 1, 'auto' ou nom du fichier à générer, nb de fichiers de sauvegarde à garder
+MakeLocalDatabaseDump=Créez un fichier dump de base local. Les paramètres sont: compression ('gz' ou 'bz' ou 'none'), type de sauvegarde ('mysql', 'pgsql', 'auto'), 1, 'auto' ou nom du fichier à générer, nb de fichiers de sauvegarde à garder
WarningCronDelayed=Attention, à des fins de performance, quelle que soit la prochaine date d'exécution des travaux activés, vos travaux peuvent être retardés jusqu'à %s heures avant d'être exécutés.
diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php
index 35ba8621ae8..667e63b3ecc 100644
--- a/htdocs/product/class/productcustomerprice.class.php
+++ b/htdocs/product/class/productcustomerprice.class.php
@@ -38,29 +38,34 @@ class Productcustomerprice extends CommonObject
*/
public $table_element = 'product_customer_price';
- var $entity;
- var $datec = '';
- var $tms = '';
- var $fk_product;
- var $fk_soc;
- var $price;
- var $price_ttc;
- var $price_min;
- var $price_min_ttc;
- var $price_base_type;
- var $tva_tx;
- var $recuperableonly;
- var $localtax1_type;
- var $localtax1_tx;
- var $localtax2_type;
- var $localtax2_tx;
+ public $entity;
+ public $datec = '';
+ public $tms = '';
+ public $fk_product;
+
+ /**
+ * @var int Thirdparty ID
+ */
+ public $fk_soc;
+
+ public $price;
+ public $price_ttc;
+ public $price_min;
+ public $price_min_ttc;
+ public $price_base_type;
+ public $tva_tx;
+ public $recuperableonly;
+ public $localtax1_type;
+ public $localtax1_tx;
+ public $localtax2_type;
+ public $localtax2_tx;
/**
* @var int User ID
*/
public $fk_user;
- var $lines = array ();
+ public $lines = array ();
/**
* Constructor
@@ -974,7 +979,12 @@ class PriceByCustomerLine
public $datec = '';
public $tms = '';
public $fk_product;
- public $fk_soc;
+
+ /**
+ * @var int Thirdparty ID
+ */
+ public $fk_soc;
+
public $price;
public $price_ttc;
public $price_min;
diff --git a/htdocs/product/dynamic_price/class/index.html b/htdocs/product/dynamic_price/class/index.html
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/htdocs/product/dynamic_price/class/index.html
@@ -0,0 +1 @@
+
diff --git a/htdocs/product/dynamic_price/index.html b/htdocs/product/dynamic_price/index.html
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/htdocs/product/dynamic_price/index.html
@@ -0,0 +1 @@
+
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 5e72fafbc40..14c2a00d477 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -319,11 +319,12 @@ if ($resql)
{
$objp = $db->fetch_object($resql);
- print '