Skip to content

Commit

Permalink
Merge pull request #9082 from ATM-Marc/FIX_5.0_propal_projectFromOrigin
Browse files Browse the repository at this point in the history
FIX: propal: correctly preset project when creating with origin/originid
  • Loading branch information
eldy committed Jul 10, 2018
2 parents 8785d69 + 2ba7c07 commit 97b1589
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions htdocs/comm/propal/card.php
Expand Up @@ -74,6 +74,7 @@
$confirm = GETPOST('confirm', 'alpha');
$lineid = GETPOST('lineid', 'int');
$contactid = GETPOST('contactid','int');
$projectid = GETPOST('projectid','int');

// PDF
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
Expand Down Expand Up @@ -1310,7 +1311,7 @@
}
$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_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');

Expand Down Expand Up @@ -1478,9 +1479,6 @@
// Project
if (! empty($conf->projet->enabled) && $socid > 0)
{
$projectid = GETPOST('projectid')?GETPOST('projectid'):0;
if ($origin == 'project') $projectid = ($originid ? $originid : 0);

$langs->load("projects");
print '<tr>';
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
Expand Down

0 comments on commit 97b1589

Please sign in to comment.