From 04e3b475474a739059a13f4715eef49c599b6d69 Mon Sep 17 00:00:00 2001 From: Julien Nicolas Date: Fri, 3 Feb 2023 15:56:50 +0100 Subject: [PATCH 1/5] Division by zero --- htdocs/core/lib/project.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index f8e998101bc..f144b97e922 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2621,13 +2621,13 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide // good $out .= '
'; if (!empty($task->progress)) { - $out .= '
'; + $out .= '
'; } $out .= '
'; } else { // bad $out .= '
'; - $out .= '
'; + $out .= '
'; $out .= '
'; } $out .= ' '; From 75b5c2cf54de148c900328dbb0b46126a7c1be11 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 4 Feb 2023 10:25:35 +0100 Subject: [PATCH 2/5] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/delivery/class/delivery.class.php on line 822 --- htdocs/delivery/class/delivery.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 73fc15e6911..ee6b2f488b0 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006-2007 Laurent Destailleur * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2023 Philippe Grand * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos GarcĂ­a * @@ -819,7 +819,7 @@ class Delivery extends CommonObject $line->product_type = $obj->fk_product_type; $line->fk_origin_line = $obj->fk_origin_line; - $line->price = $obj->price; + $line->price = $obj->subprice; $line->total_ht = $obj->total_ht; // units From 263ef91984f1544dfad3d3ee1d9018a90462a864 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 4 Feb 2023 11:10:30 +0100 Subject: [PATCH 3/5] fix : Warning: Undefined array key xStartPos in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/class/commondocgenerator.class.php on line 1109 --- htdocs/core/class/commondocgenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 5799a1607e9..16eeab10ac4 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1106,7 +1106,7 @@ abstract class CommonDocGenerator public function getColumnContentXStart($colKey) { $colDef = $this->cols[$colKey]; - return $colDef['xStartPos'] + $colDef['content']['padding'][3]; + return isset($colDef['xStartPos']) ? $colDef['xStartPos'] + $colDef['content']['padding'][3] : null; } /** From 9016f5e74a0a83d054039b5d6a77909f4cef3cb1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 4 Feb 2023 11:42:01 +0100 Subject: [PATCH 4/5] fix : Warning: Undefined variable in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/delivery/card.php on line 286 --- htdocs/delivery/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index cfcb1f3ea2a..fed042aa173 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -283,7 +283,7 @@ if ($action == 'create') { print '
'; print ''; print ''; - print ''; + print ''; print ''; print ''; From 5271a2b4a7e23a1fc41ead05502be2f107ea0883 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 4 Feb 2023 12:17:42 +0100 Subject: [PATCH 5/5] fix : Warning: Undefined property: DeliveryLine:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/delivery/card.php on line 571 and same for --- htdocs/delivery/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index fed042aa173..603777d231f 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -568,7 +568,7 @@ if ($action == 'create') { $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($object->lines[$i]->description)); //print $description; print $form->textwithtooltip($text, $description, 3, '', '', $i); - print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); + //print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label) ? '
'.dol_htmlentitiesbr($object->lines[$i]->description) : ''; } @@ -587,7 +587,7 @@ if ($action == 'create') { print $text.' '.nl2br($object->lines[$i]->description); } - print_date_range($objp->date_start, $objp->date_end); + //print_date_range($objp->date_start, $objp->date_end); print "\n"; }