Merge pull request #12637 from atm-florianm/NEW_10.0_card_of_bill_created_from_template__add_link_to_template
NEW Link to template of origin in bill cards for bills created from template
This commit is contained in:
commit
f8b1d2825a
@ -3908,9 +3908,14 @@ elseif ($id > 0 || !empty($ref))
|
||||
|
||||
if ($object->fk_fac_rec_source > 0)
|
||||
{
|
||||
$tmptemplate = new FactureRec($db);
|
||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||
if ($result > 0) print '<span class="opacitymedium">. '.$langs->trans("GeneratedFromTemplate", $tmptemplate->ref).'</span>';
|
||||
$tmptemplate = new FactureRec($db);
|
||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||
if ($result > 0) {
|
||||
print '. <span class="opacitymedium">'.$langs->trans(
|
||||
"GeneratedFromTemplate",
|
||||
'<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$tmptemplate->id.'">'.$tmptemplate->ref.'</a>'
|
||||
).'</span>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -257,7 +258,13 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
if (!$arephoto)
|
||||
{
|
||||
$dir = $conf->product->dir_output.'/'.$midir;
|
||||
if ($conf->product->entity != $objphoto->entity) {
|
||||
|
||||
$dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities
|
||||
}else{
|
||||
|
||||
$dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product
|
||||
}
|
||||
|
||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user