diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index e25809559d2..920ddefb964 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -660,7 +660,7 @@ class ExtraFields
$sql.= " '".$param."',";
$sql.= " ".$list.", ";
$sql.= " ".$ishidden.", ";
- $sql.= " ".($default?"'".$this->db->escape($default)."'":"null").",";
+ $sql.= " ".(($default!='')?"'".$this->db->escape($default)."'":"null").",";
$sql.= " ".($computed?"'".$this->db->escape($computed)."'":"null").",";
$sql .= " " . $user->id . ",";
$sql .= " " . $user->id . ",";
diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php
index 14256b37d29..1e5306a93f4 100644
--- a/htdocs/core/db/mysqli.class.php
+++ b/htdocs/core/db/mysqli.class.php
@@ -776,7 +776,7 @@ class DoliDBMysqli extends DoliDB
{
$sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
- if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
+ if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL')
@@ -796,9 +796,9 @@ class DoliDBMysqli extends DoliDB
$sql.=" NOT NULL";
}
- if ($field_desc['default'])
+ if ($field_desc['default'] != '')
{
- if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') $sql.=" DEFAULT ".$this->escape($field_desc['default']);
+ if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') $sql.=" DEFAULT ".$this->escape($field_desc['default']);
elseif ($field_desc['type'] == 'text') $sql.=" DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields
}
diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index 0448789fc50..bc967ffb0b7 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -1084,7 +1084,7 @@ class DoliDBPgsql extends DoliDB
{
$sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
- if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
+ if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
@@ -1103,9 +1103,9 @@ class DoliDBPgsql extends DoliDB
}
}
- if ($field_desc['default'])
+ if ($field_desc['default'] != '')
{
- if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') $sql.=" DEFAULT ".$this->escape($field_desc['default']);
+ if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') $sql.=" DEFAULT ".$this->escape($field_desc['default']);
elseif ($field_desc['type'] == 'text') $sql.=" DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields
}
diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang
index f742ca4cecd..63d3c403e50 100644
--- a/htdocs/langs/en_US/contracts.lang
+++ b/htdocs/langs/en_US/contracts.lang
@@ -31,9 +31,11 @@ NewContract=New contract
NewContractSubscription=New contract/subscription
AddContract=Create contract
DeleteAContract=Delete a contract
+ActivateAllOnContract=Activate all services
CloseAContract=Close a contract
ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services?
ConfirmValidateContract=Are you sure you want to validate this contract under name %s?
+ConfirmActivateAllOnContract=This will open all services (not yet active). Are you sure you want to open all services?
ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract?
ConfirmCloseService=Are you sure you want to close this service with date %s?
ValidateAContract=Validate a contract
@@ -67,6 +69,7 @@ BoardRunningServices=Expired running services
ServiceStatus=Status of service
DraftContracts=Drafts contracts
CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it
+ActivateAllContracts=Activate all contract lines
CloseAllContracts=Close all contract lines
DeleteContractLine=Delete a contract line
ConfirmDeleteContractLine=Are you sure you want to delete this contract line?