Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
This commit is contained in:
commit
2900947019
@ -618,7 +618,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
||||||
if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position'
|
if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position'
|
||||||
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
|
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy','tracking')) // Fields that are not mandatory
|
||||||
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1364,6 +1364,8 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
// Don't add lines with qty 0 when coming from a shipment including all order lines
|
// Don't add lines with qty 0 when coming from a shipment including all order lines
|
||||||
if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
|
if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
|
||||||
|
// Don't add closed lines when coming from a contract
|
||||||
|
if($srcobject->element == 'contrat' && $lines[$i]->statut == 5) continue;
|
||||||
|
|
||||||
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
|
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
|
||||||
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
||||||
|
|||||||
@ -725,3 +725,6 @@ DROP TABLE llx_c_accountancy_category;
|
|||||||
|
|
||||||
UPDATE llx_cronjob set entity = 1 where entity = 0 and label in ('RecurringInvoices', 'SendEmailsReminders');
|
UPDATE llx_cronjob set entity = 1 where entity = 0 and label in ('RecurringInvoices', 'SendEmailsReminders');
|
||||||
UPDATE llx_cronjob set entity = 0 where entity = 1 and label in ('PurgeDeleteTemporaryFilesShort', 'MakeLocalDatabaseDumpShort');
|
UPDATE llx_cronjob set entity = 0 where entity = 1 and label in ('PurgeDeleteTemporaryFilesShort', 'MakeLocalDatabaseDumpShort');
|
||||||
|
|
||||||
|
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL;
|
||||||
|
|||||||
@ -23,7 +23,7 @@ create table llx_c_shipment_mode
|
|||||||
code varchar(30) NOT NULL,
|
code varchar(30) NOT NULL,
|
||||||
libelle varchar(50) NOT NULL,
|
libelle varchar(50) NOT NULL,
|
||||||
description text,
|
description text,
|
||||||
tracking varchar(255) NOT NULL,
|
tracking varchar(255) NULL,
|
||||||
active tinyint DEFAULT 0,
|
active tinyint DEFAULT 0,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -1534,6 +1534,19 @@ class Societe extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove links to subsidiaries companies
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
||||||
|
$sql.= " SET parent = NULL";
|
||||||
|
$sql.= " WHERE parent = " . $id;
|
||||||
|
if (! $this->db->query($sql))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove third party
|
// Remove third party
|
||||||
if (! $error)
|
if (! $error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user