Preselect thirparty on new from list (part 1)

This commit is contained in:
Sekan, Tobias 2020-09-18 07:56:13 +02:00
parent 382a4552eb
commit d1f70a37df
7 changed files with 25 additions and 9 deletions

View File

@ -483,7 +483,9 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->propal->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
$url = DOL_URL_ROOT.'/comm/propal/card.php?action=create';
if (!empty($socid)) $url .= '&socid='.$socid;
$newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url);
}
// Fields title search

View File

@ -486,8 +486,10 @@ if ($resql)
$newcardbutton = '';
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/commande/card.php?action=create');
}
$url = DOL_URL_ROOT.'/commande/card.php?action=create';
if (!empty($socid)) $url .= '&socid='.$socid;
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url);
}
// Lines of title fields
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -677,7 +677,9 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->facture->creer && $contextpage != 'poslist')
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create');
$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);
}
$i = 0;

View File

@ -362,6 +362,10 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->expedition->creer)
{
// Currently: a sending can't create from sending list
// $url = DOL_URL_ROOT.'/expedition/card.php?action=create';
// if (!empty($socid)) $url .= '&socid='.$socid;
// $newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url);
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2');
}

View File

@ -652,8 +652,10 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->fournisseur->commande->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/commande/card.php?action=create');
}
$url = DOL_URL_ROOT.'/fourn/commande/card.php?action=create';
if (!empty($socid)) $url .= '&socid='.$socid;
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url);
}
// Fields title search
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -511,7 +511,9 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->fournisseur->facture->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/facture/card.php?action=create');
$url = DOL_URL_ROOT.'/fourn/facture/card.php?action=create';
if (!empty($socid)) $url .= '&socid='.$socid;
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url);
}
$i = 0;

View File

@ -417,8 +417,10 @@ if ($resql)
$newcardbutton = '';
if ($user->rights->supplier_proposal->creer)
{
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/supplier_proposal/card.php?action=create');
}
$url = DOL_URL_ROOT.'/supplier_proposal/card.php?action=create';
if (!empty($socid)) $url .= '&socid='.$socid;
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $url);
}
// Fields title search
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';