diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index c87289da390..55c42cd4c28 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Juanjo Menent +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011-2012 Juanjo Menent + * Copyright (C) 2022 Alexandre Spangaro * * 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 @@ -225,10 +226,12 @@ if ($action == "setaskforshippingmet") { } } -//Activate "Disable prospect/customer type" +// Activate "Disable prospect/customer type" if ($action == "setdisableprospectcustomer") { $setdisableprospectcustomer = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer, 'yesno', 0, '', $conf->entity); + // Remove customer type by default if type prospect/customer is disabled + $res = dolibarr_del_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $conf->entity); if (!($res > 0)) { $error++; }