Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-11-05 09:58:19 +01:00
commit 0c7f33e1ba
6 changed files with 24 additions and 8 deletions

View File

@ -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
) )
) )

View File

@ -1357,6 +1357,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);

View File

@ -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;

View File

@ -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;

View File

@ -1510,6 +1510,19 @@ class Societe extends CommonObject
} }
} }
// 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)
{ {

View File

@ -184,15 +184,14 @@ if ($result) {
$dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned'])); $dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned']));
$dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress'])); $dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress']));
$dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting'])); $dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting']));
$dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['Closed'])); $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed']));
$dataseries[] = array('label' => $langs->trans("Deleted"), 'data' => round($tick['Deleted'])); $dataseries[] = array('label' => $langs->trans("Deleted"), 'data' => round($tick['deleted']));
} }
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
$stringtoshow = ''; $stringtoshow = '<script type="text/javascript" language="javascript">
$stringtoshow .= '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery("#idsubimgDOLUSERCOOKIE_ticket_by_status").click(function() { jQuery("#idsubimgDOLUSERCOOKIE_ticket_by_status").click(function() {
jQuery("#idfilterDOLUSERCOOKIE_ticket_by_status").toggle(); jQuery("#idfilterDOLUSERCOOKIE_ticket_by_status").toggle();
@ -246,10 +245,9 @@ if (! empty($dataseries) && count($dataseries) > 1) {
$px1->draw($filenamenb, $fileurlnb); $px1->draw($filenamenb, $fileurlnb);
print $px1->show(); print $px1->show();
}
}
print $stringtoshow; print $stringtoshow;
}
}
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';