diff --git a/.travis.yml b/.travis.yml index ff8350a6446..8d5a54b0548 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,7 +79,7 @@ matrix: notifications: email: on_success: never # [always|never|change] default: change - on_failure: change # [always|never|change] default: always + on_failure: never # [always|never|change] default: always irc: channels: - "chat.freenode.net#dolibarr" diff --git a/COPYRIGHT b/COPYRIGHT index 9242cb8b9c4..bd3565c3bd1 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -36,7 +36,7 @@ Stripe 4.7.0 MIT licence Yes JS libraries: jQuery 3.1.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI -jQuery select2 4.0.4 GPL and Apache License Yes JS library plugin for sexier multiselect +jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors jQuery Flot 0.8.3 MIT License Yes JS library to build graph diff --git a/ChangeLog b/ChangeLog index 5b6a62c4e03..e745c10ee1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,33 @@ Following changes may create regressions for some external modules, but were nec * Remove js library fileupload that was not used by core code. +***** ChangeLog for 6.0.3 compared to 6.0.2 ***** +FIX: #7211 Update qty dispatched on qty change +FIX: #7458 +FIX: #7593 +FIX: #7616 +FIX: #7619 +FIX: #7626 +FIX: #7648 +FIX: #7675 +FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart +FIX: API to get object does not return data of linked objects +FIX: Bad localtax apply +FIX: Bad ressource list in popup in gantt view +FIX: bankentries search conciliated if val 0 +FIX: hook formObjectOptions() must use $expe and not $object which i… +FIX: hook formObjectOptions() must use $expe and not $object which is an order here +FIX: make of link to other object during creation +FIX: Missing function getLinesArray +FIX: old batch not shown in multi shipping +FIX: paid supplier invoices are shown as abandoned +FIX: selection of thirdparty was lost on stats page of invoices +FIX: sql syntax error because of old field accountancy_journal +FIX: Stats on invoices show nothing +FIX: substitution in ODT of thirdparties documents +FIX: wrong key in selectarray +FIX: wrong personnal project time spent + ***** ChangeLog for 6.0.2 compared to 6.0.1 ***** FIX: #7148 FIX: #7288 diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index f89a3ba2698..f992dcb2dc6 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -78,15 +78,17 @@ $sqls=array( 'DELETE FROM '.MAIN_DB_PREFIX.'propaldet', 'DELETE FROM '.MAIN_DB_PREFIX.'propal', ), - 'supplier_order'=>array( + 'supplier_proposal'=>array( + 'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet', + 'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal', + ), + 'supplier_order'=>array( 'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet', 'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseur', ), - 'supplier_invoice'=>array( + 'supplier_invoice'=>array( 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det', 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn', - 'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet', - 'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal', ), 'delivery'=>array( 'DELETE FROM '.MAIN_DB_PREFIX.'livraisondet', @@ -114,8 +116,10 @@ $sqls=array( 'DELETE FROM '.MAIN_DB_PREFIX.'product_lang', 'DELETE FROM '.MAIN_DB_PREFIX.'product_price', 'DELETE FROM '.MAIN_DB_PREFIX.'product_fournisseur_price', - 'DELETE FROM '.MAIN_DB_PREFIX.'product_stock', - 'DELETE FROM '.MAIN_DB_PREFIX.'product', + 'DELETE FROM '.MAIN_DB_PREFIX.'product_batch', + 'DELETE FROM '.MAIN_DB_PREFIX.'product_stock', + 'DELETE FROM '.MAIN_DB_PREFIX.'product_lot', + 'DELETE FROM '.MAIN_DB_PREFIX.'product', ), 'project'=>array( 'DELETE FROM '.MAIN_DB_PREFIX.'projet_task_time', @@ -128,12 +132,13 @@ $sqls=array( ), 'thirdparty'=>array( '@contact', - 'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons', + 'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons', 'UPDATE '.MAIN_DB_PREFIX.'adherent SET fk_soc = NULL', 'DELETE FROM '.MAIN_DB_PREFIX.'categorie_fournisseur', 'DELETE FROM '.MAIN_DB_PREFIX.'categorie_societe', 'DELETE FROM '.MAIN_DB_PREFIX.'societe_remise_except', - 'DELETE FROM '.MAIN_DB_PREFIX.'societe', + 'DELETE FROM '.MAIN_DB_PREFIX.'societe_rib', + 'DELETE FROM '.MAIN_DB_PREFIX.'societe', ) ); @@ -152,27 +157,37 @@ $mode = $argv[1]; $option = $argv[2]; if (empty($mode) || ! in_array($mode,array('test','confirm'))) { - print "Usage: $script_file (test|confirm) (all|option)\n"; + print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "option can be ".implode(',',array_keys($sqls))."\n"; exit(-1); } if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) { - print "Usage: $script_file (test|confirm) (all|option)\n"; + print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "option can be ".implode(',',array_keys($sqls))."\n"; exit(-1); } +// Replace database handler +if (! empty($argv[3])) +{ + $db->close(); + unset($db); + $db=getDoliDBInstance($argv[3], $argv[4], $argv[5], $argv[6], $argv[7], $argv[8]); + $user=new User($db); +} +//var_dump($user->db->database_name); $ret=$user->fetch('','admin'); if (! $ret > 0) { - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + print 'An admin user with login "admin" must exists to use this script.'."\n"; exit; } -$user->getrights(); +//$user->getrights(); + print "Purge all data for this database:\n"; print "Server = ".$db->database_host."\n"; @@ -190,14 +205,14 @@ if (! $confirmed) /** * Process sql requests of a family - * + * * @param string $family Name of family key of array $sqls * @return int -1 if KO, 1 if OK */ function processfamily($family) { global $db, $sqls; - + $error=0; foreach($sqls[$family] as $sql) { @@ -207,7 +222,7 @@ function processfamily($family) processfamily($newfamily); continue; } - + print "Run sql: ".$sql."\n"; $resql=$db->query($sql); if (! $resql) @@ -217,7 +232,7 @@ function processfamily($family) $error++; } } - + if ($error) { print $db->lasterror(); @@ -225,7 +240,7 @@ function processfamily($family) break; } } - + if ($error) return -1; else return 1; } @@ -242,7 +257,7 @@ foreach($sqls as $family => $familysql) $oldfamily = $family; $result=processfamily($family); - if ($result < 0) + if ($result < 0) { $error++; break; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index cb72c321118..41cce96995f 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -29,7 +29,7 @@ class AccountingJournal extends CommonObject public $element='accounting_journal'; public $table_element='accounting_journal'; public $fk_element = ''; - protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $rowid; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 33be4abb8e6..81167eebc5e 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -43,7 +43,7 @@ class Adherent extends CommonObject { public $element='member'; public $table_element='adherent'; - protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $mesgs; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 71c0e223f92..a41d310abfe 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -130,7 +130,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab { foreach($extrafields->attribute_label as $key => $val) { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); + if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); } } diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index cd07b4db587..57edea39a32 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -38,6 +38,7 @@ $langs->load("agenda"); $action = GETPOST('action','alpha'); $cancel = GETPOST('cancel','alpha'); +$search_event = GETPOST('search_event', 'alpha'); // Get list of triggers available $sql = "SELECT a.rowid, a.code, a.label, a.elementtype"; @@ -70,6 +71,12 @@ else * Actions */ +// Purge search criteria +if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers +{ + $search_event = ''; +} + if ($action == "save" && empty($cancel)) { $i=0; @@ -78,10 +85,13 @@ if ($action == "save" && empty($cancel)) foreach ($triggers as $trigger) { - $param='MAIN_AGENDA_ACTIONAUTO_'.$trigger['code']; + $keyparam='MAIN_AGENDA_ACTIONAUTO_'.$trigger['code']; //print "param=".$param." - ".$_POST[$param]; - $res = dolibarr_set_const($db,$param,(GETPOST($param,'alpha')?GETPOST($param,'alpha'):''),'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; + if ($search_event === '' || preg_match('/'.preg_quote($search_event,'/').'/i', $keyparam)) + { + $res = dolibarr_set_const($db,$keyparam,(GETPOST($keyparam,'alpha')?GETPOST($keyparam,'alpha'):''),'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + } } if (! $error) @@ -140,6 +150,8 @@ print '