diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f7cb7dc8cca..f4b45b5d628 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -674,9 +674,13 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $url = DOL_URL_ROOT.'/compta/facture/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer && $contextpage != 'poslist'); + // Show the new button only when this page is not opend from the Extended POS + if($contextpage != 'poslist') + { + $url = DOL_URL_ROOT.'/compta/facture/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer); + } $i = 0; print '
'."\n"; @@ -754,6 +758,7 @@ if ($resql) $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + // Show the massaction checkboxes only when this page is not opend from the Extended POS if ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); print '
'; @@ -1564,7 +1569,7 @@ if ($resql) if (!$i) $totalarray['nbfield']++; } - // Action column + // Action column (Show the massaction button only when this page is not opend from the Extended POS) print ''; if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { @@ -1595,6 +1600,7 @@ if ($resql) print "\n"; + // Show the file area only when this page is not opend from the Extended POS if ($contextpage != 'poslist') { $hidegeneratedfilelistifempty = 1; if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 5730c46674f..d9e3b3a19eb 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -609,9 +609,13 @@ if (!empty($type)) if ($type == 'f') $label = 'NewSupplier'; } -$url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter; -if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer && $contextpage != 'poslist'); +// Show the new button only when this page is not opend from the Extended POS (pop-up window) +if($contextpage != 'poslist') +{ + $url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer); +} print '
'; if ($optioncss != '') print ''; @@ -694,6 +698,7 @@ if ($moreforfilter) $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +// Show the massaction checkboxes only when this page is not opend from the Extended POS if ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); if (empty($arrayfields['customerorsupplier']['checked'])) print ''; @@ -1301,7 +1306,7 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; } - // Action column + // Action column (Show the massaction button only when this page is not opend from the Extended POS) print ''; if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined {