Fix block to generate donation document missing

This commit is contained in:
Laurent Destailleur 2018-03-02 11:57:39 +01:00
parent a815326a28
commit c478ab952f
4 changed files with 5 additions and 4 deletions

View File

@ -692,7 +692,8 @@ class FormFile
$out.= '<!-- html.formfile::showdocuments -->'."\n";
// Show title of array if not already shown
if ((! empty($file_list) || ! empty($link_list) || preg_match('/^massfilesarea/', $modulepart)) && ! $headershown)
if ((! empty($file_list) || ! empty($link_list) || preg_match('/^massfilesarea/', $modulepart))
&& ! $headershown)
{
$headershown=1;
$out.= '<div class="titre">'.$titletoshow.'</div>'."\n";

View File

@ -209,7 +209,7 @@ print load_fiche_titre($langs->trans("DonationsSetup"),$linkback,'title_setup');
$head = donation_admin_prepare_head();
dol_fiche_head($head, 'general', $langs->trans("Donations"), 0, 'payment');
dol_fiche_head($head, 'general', $langs->trans("Donations"), -1, 'payment');
// Document templates

View File

@ -67,7 +67,7 @@ print load_fiche_titre($langs->trans("DonationsSetup"),$linkback,'title_setup');
$head = donation_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Donations"), 0, 'payment');
dol_fiche_head($head, 'attributes', $langs->trans("Donations"), -1, 'payment');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -764,7 +764,7 @@ if (! empty($id) && $action != 'edit')
$filename = dol_sanitizeFileName($object->id);
$filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id);
$urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id;
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->lire);
$genallowed = (($object->paid == 0 || $user->admin) && $user->rights->don->lire);
$delallowed = $user->rights->don->creer;
print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);