From dc930dd6c54e43dcc290a0341d15c1ebc35df8f4 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 20 Dec 2017 16:46:49 +0100 Subject: [PATCH 1/6] FIX: Bad name alias showing in name of third column --- htdocs/societe/list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index ca94bcee799..63f237416d7 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -7,6 +7,7 @@ * Copyright (C) 2015 Florian Henry * Copyright (C) 2016 Josep Lluis Amador * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2017 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -975,6 +976,8 @@ while ($i < min($num, $limit)) $companystatic->fk_prospectlevel=$obj->fk_prospectlevel; + $companystatic->name_alias=$obj->name_alias =''; + print ''; if (! empty($arrayfields['s.nom']['checked'])) { From 762ab74940603d5491bea80320704dac62bee271 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 4 Jan 2018 18:09:25 +0100 Subject: [PATCH 2/6] FIX: Cashdesk should not sell to inactive third parties --- htdocs/cashdesk/admin/cashdesk.php | 4 ++-- htdocs/cashdesk/index.php | 4 ++-- htdocs/cashdesk/tpl/menu.tpl.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 0d1dbf2de53..79e8c8f83e8 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2012 Juanjo Menent + * Copyright (C) 2011-2017 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -103,7 +103,7 @@ print "\n"; print ''.$langs->trans("CashDeskThirdPartyForSell").''; print ''; -print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,0,1,array(),0); +print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3) AND s.status = 1',1,0,1,array(),0); print ''; if (! empty($conf->banque->enabled)) { diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 8f6af8b6d4d..91720885095 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2017 Juanjo Menent * Copyright (C) 2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -105,7 +105,7 @@ print ''; $disabled=0; $langs->load("companies"); if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice -print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1); +print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3) AND s.status = 1',!$disabled,$disabled,1); //print ''; print ''; print "\n"; diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index 4197db6b1b0..250aaa18cc2 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2008 Jeremie Ollivier * Copyright (C) 2008-2010 Laurent Destailleur * Copyright (C) 2009 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2017 Juanjo Menent * Copyright (C) 2012 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify @@ -79,7 +79,7 @@ print '