From dfe7c6f06f1ef5d399c776297b3df939b666e0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Feb 2016 12:21:11 +0100 Subject: [PATCH 1/3] Fix #4649 Wrong parameters order --- htdocs/product/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 73064859297..c06158ae2ff 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1256,7 +1256,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Count total nb of records $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $nbtotalofrecords = $prodcustprice->fetch_all($sortfield, $sortorder, 0, 0, $filter); + $nbtotalofrecords = $prodcustprice->fetch_all($sortorder, $sortfield, 0, 0, $filter); } $result = $prodcustprice->fetch_all($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); From 93b1b4c66e5e2cd25f1a6fe29fd8889252902286 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Feb 2016 21:02:25 +0100 Subject: [PATCH 2/3] FIX #4580 --- htdocs/comm/prospect/list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 7259cff218e..e58694fa0f8 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -438,10 +438,10 @@ if ($resql) // Prospect status print ''; $arraystcomm=array(); - foreach($prospectstatic->cacheprospectstatus as $key => $val) - { - $arraystcomm[$val['id']]=$val['label']; - } + foreach($prospectstatic->cacheprospectstatus as $key => $val) + { + $arraystcomm[$val['id']]=($langs->trans("StatusProspect".$val['id']) != "StatusProspect".$val['id'] ? $langs->trans("StatusProspect".$val['id']) : $val['label']); + } print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); print ''; From ac6001cec89ae7857be0426accc9a2cda17ff039 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Feb 2016 09:27:18 +0100 Subject: [PATCH 3/3] Fix do not show warning if account defined --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index a02ad089c5b..9716b6bd968 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -881,8 +881,8 @@ class pdf_crabe extends ModelePDFFactures $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); } // Avoid having any valid PDF with setup that is not complete - elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER)) - || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER))) + elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) + || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) { $outputlangs->load("errors");