Fix: PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS is correctly supported
This commit is contained in:
parent
6a61587085
commit
98eb39bf9c
@ -2755,7 +2755,7 @@ class Form
|
|||||||
* Show a form to select a project
|
* Show a form to select a project
|
||||||
*
|
*
|
||||||
* @param int $page Page
|
* @param int $page Page
|
||||||
* @param int $socid Id third party
|
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||||
* @param int $selected Id pre-selected project
|
* @param int $selected Id pre-selected project
|
||||||
* @param string $htmlname Name of select field
|
* @param string $htmlname Name of select field
|
||||||
* @return void
|
* @return void
|
||||||
|
|||||||
@ -1287,18 +1287,8 @@ if ($action == 'create')
|
|||||||
$form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
|
$form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Project
|
// Public note
|
||||||
if (! empty($conf->projet->enabled))
|
print '<tr><td>'.$langs->trans('NotePublic').'</td>';
|
||||||
{
|
|
||||||
$formproject=new FormProjets($db);
|
|
||||||
|
|
||||||
$langs->load('projects');
|
|
||||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
|
||||||
$formproject->select_projects(-1, $projectid, 'projectid');
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('NotePublic').'</td>';
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
$doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
@ -1822,11 +1812,11 @@ else
|
|||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'classify')
|
if ($action == 'classify')
|
||||||
{
|
{
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,'projectid');
|
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,'none');
|
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user