From 5f8f9c6a4aa3985324e59d210d4438037b1766fe Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 23 Sep 2020 22:38:06 +0200 Subject: [PATCH 1/6] NEW restrict thirdparty to customer in takepos only display customer (better when long list and avoid supplier) --- htdocs/takepos/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index c29f74a53fd..0a8c41e3fa2 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=c&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=c&contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("Customer"); ?>"}); } function History() From ca07b19796a8a51f6e6fd9c78b531bdc71c3f4b8 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 23 Sep 2020 22:39:24 +0200 Subject: [PATCH 2/6] Update list.php --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index ea0b3a55d8e..caa6d1cbbef 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -617,7 +617,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=c&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?type=c&contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place); $label = 'MenuNewCustomer'; $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url); } From 6a85fdbd7f2fe43d27a0a81ad4085770767aad79 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 24 Sep 2020 10:06:35 +0200 Subject: [PATCH 3/6] Update list.php --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index caa6d1cbbef..80d27edfdb7 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -288,7 +288,7 @@ if (empty($reshook)) $search_alias = ''; $search_categ_cus = 0; $search_categ_sup = 0; - $search_sale = ''; + $search_sale = ''; $search_barcode = ""; $search_customer_code = ''; $search_supplier_code = ''; From 3c48d2933cbb56176c712cf1456d55f3a7d5a8bc Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 24 Sep 2020 08:08:15 +0000 Subject: [PATCH 4/6] Fixing style errors. --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 80d27edfdb7..caa6d1cbbef 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -288,7 +288,7 @@ if (empty($reshook)) $search_alias = ''; $search_categ_cus = 0; $search_categ_sup = 0; - $search_sale = ''; + $search_sale = ''; $search_barcode = ""; $search_customer_code = ''; $search_supplier_code = ''; From 8bef390d604dd14a4f99a2800394c088831b8309 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 29 Sep 2020 17:09:45 +0200 Subject: [PATCH 5/6] Update list.php --- htdocs/societe/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index caa6d1cbbef..73c178be557 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"].'?type=c&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); } From 09f7220470ec0ea69d6a0df749ea9825c1f1ae22 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 29 Sep 2020 17:10:08 +0200 Subject: [PATCH 6/6] Update index.php --- htdocs/takepos/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 0a8c41e3fa2..4b32549e1df 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&type=c&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?type=c&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()