From e3af0b90ec2f93ee4d208186f0f5843d712302ee Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Wed, 2 Sep 2015 18:09:29 +0200
Subject: [PATCH] Fix hidden feature to send remind by email

---
 htdocs/compta/facture/mergepdftool.php | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php
index fbb44185caa..5acca49d1b1 100644
--- a/htdocs/compta/facture/mergepdftool.php
+++ b/htdocs/compta/facture/mergepdftool.php
@@ -248,12 +248,11 @@ if ($action == 'presend' && GETPOST('sendmail'))
 					}
 				}
 				else
-				{
+				{  
 					$nbignored++;
 					$langs->load("other");
 					$resultmasssend.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>';
 					dol_syslog('Failed to read file: '.$file, LOG_WARNING);
-					break ;
 				}
 			}
 		}
@@ -558,9 +557,7 @@ if ($resql)
 		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
 		$formmail = new FormMail($db);
 
-		print '<br>';
-		print_fiche_titre($langs->trans("SendRemind"),'','');
-		print '<br>';
+		dol_fiche_head(null, '', $langs->trans("SendRemind"));
 
 		$topicmail="MailTopicSendRemindUnpaidInvoices";
 		$modelmail="facture_relance";
@@ -600,7 +597,8 @@ if ($resql)
 		$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
 
 		print $formmail->get_form();
-		print '<br>'."\n";
+        
+        dol_fiche_end();
 	}
 
 	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
-- 
GitLab