From 10ff359889d3c7d354bfa61bc9c41f9548392b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 25 Oct 2020 22:39:12 +0100 Subject: [PATCH 1/2] set unknow variables --- htdocs/ticket/class/ticket.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 391bd4dce2d..5ef0bb4148a 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1515,6 +1515,8 @@ class Ticket extends CommonObject $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; } include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $sendtocc = ''; + $deliveryreceipt = 0; $mailfile = new CMailFile($subject, $info_sendto['email'], $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0); if ($mailfile->error || $mailfile->errors) { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); From f2c0e3765d4bef91136e66dc678faeff0c6a1afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 25 Oct 2020 23:29:51 +0100 Subject: [PATCH 2/2] Update card.php --- htdocs/fourn/facture/card.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c304a4edce7..3c60501342b 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2304,20 +2304,17 @@ if ($action == 'create') if ($action == 'valid') { // We check if number is temporary number - if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) // empty should not happened, but when it occurs, the test save life - { + if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) { + // empty should not happened, but when it occurs, the test save life $numref = $object->getNextNumRef($societe); } else { $numref = $object->ref; } - if ($numref < 0) - { + if ($numref < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; - } - else - { + } else { $text = $langs->trans('ConfirmValidateBill', $numref); /*if (! empty($conf->notification->enabled)) {