Fix visiblity when came from Extended POS + doc
This commit is contained in:
parent
eac9e54e0b
commit
ce6758657a
@ -674,9 +674,13 @@ if ($resql)
|
|||||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
|
// Show the new button only when this page is not opend from the Extended POS
|
||||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
if($contextpage != 'poslist')
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer && $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;
|
$i = 0;
|
||||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
@ -754,6 +758,7 @@ if ($resql)
|
|||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$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 ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
@ -1564,7 +1569,7 @@ if ($resql)
|
|||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column (Show the massaction button only when this page is not opend from the Extended POS)
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap" align="center">';
|
||||||
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
|
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 "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
|
// Show the file area only when this page is not opend from the Extended POS
|
||||||
if ($contextpage != 'poslist') {
|
if ($contextpage != 'poslist') {
|
||||||
$hidegeneratedfilelistifempty = 1;
|
$hidegeneratedfilelistifempty = 1;
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
|
||||||
|
|||||||
@ -609,9 +609,13 @@ if (!empty($type))
|
|||||||
if ($type == 'f') $label = 'NewSupplier';
|
if ($type == 'f') $label = 'NewSupplier';
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter;
|
// Show the new button only when this page is not opend from the Extended POS (pop-up window)
|
||||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
if($contextpage != 'poslist')
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer && $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 '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formfilter" autocomplete="off">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formfilter" autocomplete="off">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
@ -694,6 +698,7 @@ if ($moreforfilter)
|
|||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$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 ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
|
|
||||||
if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hidden" name="type" value="'.$type.'">';
|
if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
@ -1301,7 +1306,7 @@ while ($i < min($num, $limit))
|
|||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column (Show the massaction button only when this page is not opend from the Extended POS)
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
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
|
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
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user