From d808add49905eec4fcbc07bea250e606b5a60559 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Oct 2017 15:48:48 +0200 Subject: [PATCH 1/7] FIX #7567 --- htdocs/langs/en_US/interventions.lang | 1 + htdocs/projet/element.php | 49 +++++++++++++++++---------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index b151565f3a3..3f7c84cd23f 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -53,6 +53,7 @@ UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for int InterventionStatistics=Statistics of interventions NbOfinterventions=Nb of intervention cards NumberOfInterventionsByMonth=Nb of intervention cards by month (date of validation) +AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit. Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them. ##### Exports ##### InterId=Intervention id InterRef=Intervention ref. diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index bda8d793840..ae9872b70a0 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -610,23 +610,31 @@ foreach ($listofreferent as $key => $value) if ($qualifiedfortotal) $total_ttc = $total_ttc + $total_ttc_by_line; } - // Calculate margin - if ($margin=="add") - { - $balance_ht+= $total_ht; - $balance_ttc+= $total_ttc; - } - else - { - $balance_ht-= $total_ht; - $balance_ttc-= $total_ttc; - } + // Each element with at least one line is output + $qualifiedforfinalprofit=true; + if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit=false; + //var_dump($key); - // Show $total_ht & $total_ttc -- add a minus when necessary - if ($margin!="add") + // Calculate margin + if ($qualifiedforfinalprofit) { - $total_ht = -$total_ht; - $total_ttc = -$total_ttc; + if ($margin=="add") + { + $balance_ht+= $total_ht; + $balance_ttc+= $total_ttc; + } + else + { + $balance_ht-= $total_ht; + $balance_ttc-= $total_ttc; + } + + // Show $total_ht & $total_ttc -- add a minus when necessary + if ($margin!="add") + { + $total_ht = -$total_ht; + $total_ttc = -$total_ttc; + } } /*switch ($classname) { @@ -655,16 +663,21 @@ foreach ($listofreferent as $key => $value) $newclassname = $classname; }*/ - $var = ! $var; print ''; // Module print ''.$name.''; // Nb print ''.$i.''; // Amount HT - print ''.price($total_ht).''; + print ''; + if (! $qualifiedforfinalprofit) print ''.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).''; + else print price($total_ht); + print ''; // Amount TTC - print ''.price($total_ttc).''; + print ''; + if (! $qualifiedforfinalprofit) print ''.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).''; + else print price($total_ttc); + print ''; print ''; } } From 7b853d8981b22b600c1d2d1b005f4cbd9eedbfd0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Oct 2017 15:50:37 +0200 Subject: [PATCH 2/7] FIX #7567 --- htdocs/langs/en_US/interventions.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index 3f7c84cd23f..15415a7fcd5 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -53,7 +53,7 @@ UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for int InterventionStatistics=Statistics of interventions NbOfinterventions=Nb of intervention cards NumberOfInterventionsByMonth=Nb of intervention cards by month (date of validation) -AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit. Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them. +AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit (in most cases, timesheets are used to count time spent). Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them. ##### Exports ##### InterId=Intervention id InterRef=Intervention ref. From 8104c97f77144c259db137778f92878f13f10be5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Oct 2017 11:53:26 +0200 Subject: [PATCH 3/7] Prepare 6.0.2 --- ChangeLog | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 994e1702407..ce7d35884fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,41 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 6.0.2 compared to 6.0.1 ***** + +FIX: #7148 +FIX: #7288 +FIX: #7366 renaming table with pgsql +FIX: #7435 Can't add payment term +FIX: #7461 +FIX: #7464 +FIX: #7471 +FIX: #7473 Mass update of vat rates and other bugs on localtax +FIX: #7475 +FIX: #7486 Empty value for multicurrency rate must be forbidden +FIX: #7490 +FIX: #7505 +FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention +FIX: #7514 +FIX: #7531 #7537 +FIX: #7541 +FIX: #7546 +FIX: #7550 +FIX: #7554 +FIX: #7567 +FIX: Accountancy export model for Agiris Isacompta +FIX: Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled +FIX: Bad preview on scroping when special file names +FIX: Generation of invoice from bulk action "Bill Orders" +FIX: Implementation of a Luracast recommandation for the REST api server (#7370) +FIX: Missing space in request +FIX: Only modified values must be modified +FIX: replenish if line test GETPOST on line 0 +FIX: Stripe not working on live mode +FIX: wrong basePath in the swagger view +FIX: Implementation of a Luracast recommandation for the REST api server + ***** ChangeLog for 6.0.1 compared to 6.0.* ***** FIX: #7000 Dashboard link for late pending payment supplier invoices do not work From 8513ddb9b4081279e720e1b8e872952973c93ebb Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 8 Oct 2017 10:08:49 +0200 Subject: [PATCH 4/7] Fix : missing new target type in advance target selection --- htdocs/core/modules/mailings/advthirdparties.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 497d3c54f54..9252ae5ec3a 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -116,7 +116,7 @@ class mailing_advthirdparties extends MailingTargets } } - if (($type_of_target==1) || ($type_of_target==2)) { + if (($type_of_target==1) || ($type_of_target==2) || ($type_of_target==4)) { // Select the third parties from category if (count($socid)>0 || count($contactid)>0) { From 257fe68f1388ac31d30d96364c3ddbaded21e769 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Oct 2017 19:46:24 +0200 Subject: [PATCH 5/7] Prepare 6.0.3 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 394686cc5e4..624808dd0d9 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From 19de053054ce0912023ec44349fb160fc2c1519c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Oct 2017 17:43:57 +0200 Subject: [PATCH 6/7] Fix itf8 mix collation --- htdocs/install/mysql/migration/5.0.0-6.0.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index a2534728683..634045d3e4e 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -26,6 +26,12 @@ +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) CHARACTER SET utf8; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) COLLATE utf8_unicode_ci; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) CHARACTER SET utf8; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) COLLATE utf8_unicode_ci; + + ALTER TABLE llx_holiday_config MODIFY COLUMN name varchar(128); ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_supplier_proposal integer NOT NULL; From dce71d6e7db2fe3b06783d27e2668e332e0274f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Oct 2017 18:51:33 +0200 Subject: [PATCH 7/7] Fix loose filter --- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 64ced5f3a5a..b767c35e329 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -493,7 +493,7 @@ if (count($tasksarray) > 0) } else { - print ''.$langs->trans("NoTasks").''; + print ''.$langs->trans("NoTasks").''; } print ""; print ''; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index f7a1397f475..438d71cbdba 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -283,8 +283,17 @@ if ($action == 'addtime' && $user->rights->projet->lire) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $param=''; + $param.=($mode?'&mode='.$mode:''); + $param.=($projectid?'id='.$projectid:'').($search_usertoprocessid?'&search_usertoprocessid='.$search_usertoprocessid:'').($day?'&day='.$day:'').($month?'&month='.$month:'').($year?'&year='.$year:''); + $param.=($search_project_ref?'&search_project_ref='.$search_project_ref:''); + $param.=($search_usertoprocessid > 0?'&search_usertoprocessid='.$search_usertoprocessid:''); + $param.=($search_thirdparty?'&search_thirdparty='.$search_thirdparty:''); + $param.=($search_task_ref?'&search_task_ref='.$search_task_ref:''); + $param.=($search_task_label?'&search_task_label='.$search_task_label:''); + // Redirect to avoid submit twice on back - header('Location: '.$_SERVER["PHP_SELF"].'?'.($projectid?'id='.$projectid:'').($search_usertoprocessid?'&search_usertoprocessid='.$search_usertoprocessid:'').($mode?'&mode='.$mode:'').($day?'&day='.$day:'').($month?'&month='.$month:'').($year?'&year='.$year:'')); + header('Location: '.$_SERVER["PHP_SELF"].'?'.$param); exit; } } @@ -511,7 +520,7 @@ if (count($tasksarray) > 0) } else { - print ''.$langs->trans("NoTasks").''; + print ''.$langs->trans("NoTasks").''; } print ""; print '';