Merge pull request #13251 from bb2a/patch-20

NEW Add subtitution variables for url of document in backoffice
This commit is contained in:
Laurent Destailleur 2020-03-03 23:13:53 +01:00 committed by GitHub
commit 537d129627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6317,6 +6317,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = $object->getLastMainDocLink($object->element);
}
else $substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = '';
if (is_object($object) && $object->element == 'propal') $substitutionarray['__URL_PROPOSAL__'] = DOL_MAIN_URL_ROOT . "/comm/propal/card.php?id=" . $object->id;
if (is_object($object) && $object->element == 'commande') $substitutionarray['__URL_ORDER__'] = DOL_MAIN_URL_ROOT . "/commande/card.php?id=" . $object->id;
if (is_object($object) && $object->element == 'facture') $substitutionarray['__URL_INVOICE__'] = DOL_MAIN_URL_ROOT . "/compta/facture/card.php?id=" . $object->id;
}
}
}