diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 7199423669a..e54ac0bc31a 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -790,10 +790,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
if (!empty($socid)) {
- $object = new Societe($db);
- if ($socid > 0) $object->fetch($socid);
+ $soc = new Societe($db);
+ if ($socid > 0) $soc->fetch($socid);
- if (!($object->id > 0)) {
+ if (!($soc->id > 0)) {
$langs->load("errors");
print($langs->trans('ErrorRecordNotFound'));
exit;
@@ -877,7 +877,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print "\n";
// Company
- print '
| '.$langs->trans("Company").' | |
';
+ print '| '.$langs->trans("Company").' | |
';
// Civility
print '| '.$langs->trans("UserTitle").' | ';
@@ -901,32 +901,32 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// EMail
print ' |
| '.($conf->global->ADHERENT_MAIL_REQUIRED ? '' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '' : '').' | ';
- print ''.img_picto('', 'object_email').' |
';
+ print ''.img_picto('', 'object_email').' | ';
// Address
print '| '.$langs->trans("Address").' | ';
- print '';
+ print '';
print ' |
';
// Zip / Town
print '| '.$langs->trans("Zip").' / '.$langs->trans("Town").' | ';
- print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
+ print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $soc->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
print ' ';
- print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
+ print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $soc->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print ' |
';
// Country
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
print '| '.$langs->trans('Country').' | ';
- print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
+ print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $soc->country_id, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' |
';
// State
if (empty($conf->global->MEMBER_DISABLE_STATE)) {
print '| '.$langs->trans('State').' | ';
- if ($object->country_id) {
- print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
+ if ($soc->country_id) {
+ print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $soc->state_id, $soc->country_code);
} else {
print $countrynotdefined;
}
@@ -935,7 +935,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Pro phone
print ' |
| '.$langs->trans("PhonePro").' | ';
- print ''.img_picto('', 'object_phoning').' |
';
+ print ''.img_picto('', 'object_phoning').' | ';
// Personal phone
print '| '.$langs->trans("PhonePerso").' | ';
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 5a5e1a58928..a4fc828ef4b 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5492,7 +5492,6 @@ abstract class CommonObject
}
$sql .= ")";
-
$resql = $this->db->query($sql);
if (!$resql)
{
@@ -5746,6 +5745,11 @@ abstract class CommonObject
$this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]);
}
break;
+ case 'boolean':
+ if (empty($this->array_options["options_".$key])) {
+ $this->array_options["options_".$key] = null;
+ }
+ break;
/*
case 'link':
$param_list = array_keys($attributeParam['options']);
diff --git a/htdocs/datapolicy/class/actions_datapolicy.class.php b/htdocs/datapolicy/class/actions_datapolicy.class.php
index d6c16a6be4e..dea9ec0ef84 100644
--- a/htdocs/datapolicy/class/actions_datapolicy.class.php
+++ b/htdocs/datapolicy/class/actions_datapolicy.class.php
@@ -133,7 +133,7 @@ class ActionsDatapolicy
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
header('Pragma: no-cache');
$object->fetch(GETPOST('socid'));
- echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
+ echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
echo $object->name.';';
echo ';';
echo ';';
@@ -157,7 +157,7 @@ class ActionsDatapolicy
header('Pragma: no-cache');
$soc = $object->fetch_thirdparty();
- echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
+ echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
echo $object->lastname.';';
echo $object->firstname.';';
echo $object->getCivilityLabel().';';
@@ -181,7 +181,7 @@ class ActionsDatapolicy
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
header('Pragma: no-cache');
$soc = $object->fetch_thirdparty();
- echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
+ echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL;
echo $object->lastname.';';
echo $object->firstname.';';
echo $object->getCivilityLabel().';';
diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php
index baac0eb2cbd..21f00a47d12 100644
--- a/htdocs/install/repair.php
+++ b/htdocs/install/repair.php
@@ -590,7 +590,7 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha'))
$filetotestsmall = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_small'.$ext;
$filetotestmini = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_mini'.$ext;
$exists = dol_is_file($filetotest);
- print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' fistname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."
\n";
+ print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' firstname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."
\n";
if ($exists)
{
$filetarget = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/'.$name.$ext;
diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php
index 189161712d5..2d6c627ec41 100644
--- a/htdocs/product/class/api_products.class.php
+++ b/htdocs/product/class/api_products.class.php
@@ -405,7 +405,7 @@ class Products extends DolibarrApi
$childsArbo = $this->product->getChildsArbo($id, 1);
- $keys = ['rowid', 'qty', 'fk_product_type', 'label', 'incdec'];
+ $keys = ['rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref'];
$childs = [];
foreach ($childsArbo as $values) {
$childs[] = array_combine($keys, $values);
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 20d63cea600..91d50e903a3 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -1657,7 +1657,7 @@ class Ticket extends CommonObject
$actioncomm->userassigned = array($user->id);
$actioncomm->userownerid = $user->id;
$actioncomm->datep = $now;
- $actioncomm->percentage = 100;
+ $actioncomm->percentage = -1; // percentage is not relevant for punctual events
$actioncomm->elementtype = 'ticket';
$actioncomm->fk_element = $this->id;