FIX: propal: correctly preset project when creating with origin/originid
This commit is contained in:
parent
8785d69548
commit
2ba7c07574
@ -74,6 +74,7 @@ $originid = GETPOST('originid', 'int');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
$contactid = GETPOST('contactid','int');
|
$contactid = GETPOST('contactid','int');
|
||||||
|
$projectid = GETPOST('projectid','int');
|
||||||
|
|
||||||
// PDF
|
// PDF
|
||||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||||
@ -1310,7 +1311,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
$objectsrc->fetch_thirdparty();
|
$objectsrc->fetch_thirdparty();
|
||||||
|
|
||||||
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : '');
|
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : 0);
|
||||||
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
||||||
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
||||||
|
|
||||||
@ -1478,9 +1479,6 @@ if ($action == 'create')
|
|||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled) && $socid > 0)
|
if (! empty($conf->projet->enabled) && $socid > 0)
|
||||||
{
|
{
|
||||||
$projectid = GETPOST('projectid')?GETPOST('projectid'):0;
|
|
||||||
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
|
||||||
|
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
|
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user