diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 0534d5d0346..54ee7d5310c 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -120,6 +120,7 @@ $pagenext = $page + 1; if ($type == 'c') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'customerlist'; if ($search_type == '') $search_type = '1,3'; } if ($type == 'p') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'prospectlist'; if ($search_type == '') $search_type = '2,3'; } +if ($type == 't') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'customerlist'; if ($search_type == '') $search_type = '1,2,3'; } if ($type == 'f') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'supplierlist'; if ($search_type == '') $search_type = '4'; } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -617,7 +618,7 @@ if ($contextpage != 'poslist') if (!empty($socid)) $url .= '&socid='.$socid; $newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer); } elseif ($user->rights->societe->creer) { - $url = DOL_URL_ROOT.'/societe/card.php?action=create&type=c&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place); + $url = DOL_URL_ROOT.'/societe/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place); $label = 'MenuNewCustomer'; $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url); } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 66212ab3203..bad5f112d21 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -424,7 +424,7 @@ function ClickProduct(position) { function ChangeThirdparty(idcustomer) { console.log("ChangeThirdparty"); // Call page list.php to change customer - $("#poslines").load("../societe/list.php?action=change&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { + $("#poslines").load("../societe/list.php?action=change&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { }); ClearSearch(); @@ -440,7 +440,7 @@ function deleteline() { function Customer() { console.log("Open box to select the thirdparty place="+place); - $.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("Customer"); ?>"}); + $.colorbox({href:"../societe/list.php?type=t&contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("Customer"); ?>"}); } function History()