From 607a0e5da44136df4074485b626f3c248df32625 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 4 Aug 2019 10:50:46 +0200 Subject: [PATCH 1/5] Add contextpage hidden input to preserve contexpage in search form --- htdocs/societe/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 2ee5f5bedf58f..2ab86d454f0f9 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -596,6 +596,7 @@ print ''; print ''; print ''; +print ''; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); 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 2/5] 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 460e9d5ee45fe..e7e8f1e499993 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -458,6 +458,10 @@ 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 3/5] 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 e2a99441ea8b6..56c6f9778278c 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -283,7 +283,7 @@ //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 From e0310b5d9ba5aee2c9f25730f350ca6bfef67598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Fri, 16 Aug 2019 11:38:42 +0200 Subject: [PATCH 4/5] Fix #11682 Missing origin object ref and thirdparty ref in future bank entries --- htdocs/compta/bank/treso.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index f17e622210eac..f9231f4f24750 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -267,9 +267,9 @@ $parameters = array('obj' => $obj); $reshook = $hookmanager->executeHooks('moreFamily', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if(empty($reshook)){ - $ref = isset($hookmanager->resArray['ref']) ? $hookmanager->resArray['ref'] : ''; - $refcomp = isset($hookmanager->resArray['refcomp']) ? $hookmanager->resArray['refcomp'] : ''; - $paiement = isset($hookmanager->resArray['paiement']) ? $hookmanager->resArray['paiement'] : 0; + $ref = isset($hookmanager->resArray['ref']) ? $hookmanager->resArray['ref'] : $ref; + $refcomp = isset($hookmanager->resArray['refcomp']) ? $hookmanager->resArray['refcomp'] : $refcomp; + $paiement = isset($hookmanager->resArray['paiement']) ? $hookmanager->resArray['paiement'] : $paiement; } $total_ttc = $obj->total_ttc; From 13604b3571bd6febe92b8541bb88d51f59b29fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Fri, 16 Aug 2019 11:55:40 +0200 Subject: [PATCH 5/5] 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 e2a99441ea8b6..56c6f9778278c 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -283,7 +283,7 @@ //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