add change customer function in customer orders
This commit is contained in:
parent
613209eadb
commit
1bde35f98e
@ -1149,7 +1149,16 @@ if (empty($reshook))
|
||||
$action = 'edit_extras';
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
if ($action == 'set_thirdparty' && $user->rights->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->setValueFrom('fk_soc', $socid);
|
||||
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
|
||||
exit();
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
|
||||
/*
|
||||
@ -1812,8 +1821,19 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>' . $langs->trans('Company') . '</td>';
|
||||
print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr><td>' . $langs->trans('Company') . '</td>';
|
||||
print '</td><td colspan="5">';
|
||||
if (! empty($conf->global->COMMANDE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->commande->creer)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editthirdparty&id=' . $object->id . '">' . img_edit($langs->trans('SetLinkToThirdParty'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="5">';
|
||||
if ($action == 'editthirdparty') {
|
||||
$form->form_thirdparty($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, 'socid','client>0');
|
||||
} else {
|
||||
print ' ' . $soc->getNomUrl(1, 'compta');
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user