From 4bed1b9a3d63391b1c12eae9f251ecc695566192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Thu, 15 Aug 2019 22:21:31 +0200 Subject: [PATCH 1/2] Fix #11683 Correct links to create a new product or service from search results --- htdocs/product/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 460e9d5ee45..e7e8f1e4999 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -458,6 +458,10 @@ if ($resql) if($type == Product::TYPE_SERVICE) $rightskey='service'; if($user->rights->{$rightskey}->creer) { + if ($type === "") { + $newcardbutton.= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0'); + $type = Product::TYPE_SERVICE; + } $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; $newcardbutton.= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type); From 6a2d37c5c83d1d286c8e57024c16e0015ef59439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Thu, 15 Aug 2019 22:49:21 +0200 Subject: [PATCH 2/2] Fix code style / CI. --- htdocs/admin/pdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index e2a99441ea8..56c6f977827 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -283,7 +283,7 @@ if ($action == 'edit') // Edit //Invert sender and recipient print ''.$langs->trans("SwapSenderAndRecipientOnPDF").''; - print $form->selectyesno('MAIN_INVERT_SENDER_RECIPIENT',(! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT))?$conf->global->MAIN_INVERT_SENDER_RECIPIENT:0,1); + print $form->selectyesno('MAIN_INVERT_SENDER_RECIPIENT', (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT))?$conf->global->MAIN_INVERT_SENDER_RECIPIENT:0, 1); print ''; // Place customer adress to the ISO location