Skip to content

Commit

Permalink
FIX: when create intervention from propal (or other object), element …
Browse files Browse the repository at this point in the history
…link is mising after creation (#32035)

* fix: when create intervention from propal, element link is mising

* fix: when create intervention from propal, element link is mising

* fix: when create intervention from propal, element link is mising
  • Loading branch information
FHenry authored Nov 21, 2024
1 parent 1a752c1 commit 0577fe4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/fichinter/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@
$res = $soc->fetch($socid);
}

if (GETPOSTINT('origin') && GETPOSTINT('originid')) {
if (GETPOST('origin', 'alphanohtml') && GETPOSTINT('originid')) {
// Parse element/subelement (ex: project_task)
$regs = array();
$element = $subelement = GETPOST('origin', 'alphanohtml');
Expand Down Expand Up @@ -1011,6 +1011,7 @@
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
$newclassname = $classname;
if ($newclassname == 'Propal') {
$langs->load('propal');
$newclassname = 'CommercialProposal';
}
print '<tr><td>'.$langs->trans($newclassname).'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>';
Expand Down Expand Up @@ -1054,7 +1055,7 @@
print $form->buttonsSaveCancel("CreateDraftIntervention");

// Show origin lines
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
if (!empty($origin) && !empty($originid) && is_object($objectsrc) && !getDolGlobalInt('FICHINTER_DISABLE_DETAILS')) {
$title = $langs->trans('Services');
print load_fiche_titre($title);

Expand Down

0 comments on commit 0577fe4

Please sign in to comment.