From 93365addd1f684400a925058a23206cec7c38ec6 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 15 Apr 2019 11:38:49 +0200 Subject: [PATCH 1/4] FIX : Total per day shows 00:00 if the total time spent is equal to 12:00 --- htdocs/core/js/timesheet.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/core/js/timesheet.js b/htdocs/core/js/timesheet.js index aaec6971e2f..4eae63154d4 100644 --- a/htdocs/core/js/timesheet.js +++ b/htdocs/core/js/timesheet.js @@ -91,17 +91,11 @@ function parseTime(timeStr, dt) dt = new Date(); } - var time = timeStr.match(/(\d+)(?::(\d\d))?\s*(p?)/i); + var time = timeStr.match(/(\d+)(?::(\d\d))?/i); if (!time) { return -1; } var hours = parseInt(time[1], 10); - if (hours == 12 && !time[3]) { - hours = 0; - } - else { - hours += (hours < 12 && time[3]) ? 12 : 0; - } dt.setHours(hours); dt.setMinutes(parseInt(time[2], 10) || 0); From 3231e54abdd379d554edd6bc0c77eeb66f070531 Mon Sep 17 00:00:00 2001 From: atm-greg Date: Tue, 23 Apr 2019 16:19:58 +0200 Subject: [PATCH 2/4] fix actioncomm module for long trigger names --- htdocs/install/mysql/migration/7.0.0-8.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_actioncomm.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index cee3a17e061..380c64c28fc 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -560,3 +560,5 @@ UPDATE llx_advtargetemailing SET fk_element = fk_mailing, type_element='mailing' ALTER TABLE llx_advtargetemailing DROP COLUMN fk_mailing; DROP TABLE llx_ticket_logs; + +ALTER TABLE llx_actioncomm MODIFY COLUMN code varchar(50); diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index 72321e19db5..231dd3bad1a 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -29,7 +29,7 @@ create table llx_actioncomm datep2 datetime, -- date end fk_action integer, -- type of action (optional link with id in llx_c_actioncomm or null) - code varchar(32) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...) + code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...) datec datetime, -- date creation tms timestamp, -- date modification From 6e425d189561a8739231fbb7b91aa828fec8b35f Mon Sep 17 00:00:00 2001 From: atm-greg Date: Wed, 24 Apr 2019 08:56:06 +0200 Subject: [PATCH 3/4] add origin of line in fourn orderstoinvoice.php --- htdocs/fourn/commande/orderstoinvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 4c229518eba..82058d087b5 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -216,7 +216,7 @@ if (($action == 'create' || $action == 'add') && ! $error) { $fk_parent_line = 0; } // FIXME Missing $lines[$i]->ref_supplier and $lines[$i]->label into addline and updateline methods. They are filled when coming from order for example. - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->qty, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, 'HT', $product_type, -1, false, 0, $lines[$i]->fk_unit); + $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->qty, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, 'HT', $product_type, -1, false, 0, $lines[$i]->fk_unit, $line[$i]->id); if ($result > 0) { $lineid = $result; From e0b71fd2585bde8b4c1bb3b7fdd191f1af190c6c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 24 Apr 2019 10:07:34 +0200 Subject: [PATCH 4/4] Fix size of column --- htdocs/install/mysql/migration/8.0.0-9.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index 2d45d94aafd..8bc8d691bbd 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -52,6 +52,9 @@ ALTER TABLE llx_actioncomm ADD COLUMN email_subject varchar(255) after email_msg ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(255) after email_to; ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(255) after email_tocc; +ALTER TABLE llx_actioncomm MODIFY COLUMN code varchar(50); + + -- For 9.0 ALTER TABLE llx_extrafields ADD COLUMN help text NULL; ALTER TABLE llx_extrafields ADD COLUMN totalizable boolean DEFAULT FALSE after list;