diff --git a/ChangeLog b/ChangeLog
index e40a703baa3ae5d37b6806bd3a696c085eb448f4..470d4647b9e624140c9843065028ad50dc3fab55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ English Dolibarr ChangeLog
 ***** ChangeLog for 3.0 compared to 2.9 *****
 
 For users:
+- New: Can exclude deposit, replacement or credit notes in script rebuild_merge_pdf.
 - New: task #10473 : Option MAIN_PROFIDx_IN_ADDRESS must no more be hidden.
 - New: Can generate business card for on particular member.
 - New: Task #10553 : Can attach files on members card.
@@ -25,6 +26,7 @@ For users:
 - New: Add option to send all emails sent to a bulk carbon copy.
 - New: Preview of emails sent by member module is shown.
 - New: task #10100 : Add button to create invoice from a subscription
+- New: Reorganize tabs on third parties.
 - Perf: Avoid reading database to determine country code after each
         page call.
 - Fix: Better Postgresql compatibility.
diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php
index 179a0c8e3d8c74f8614a10263b59e111cd811d1d..3e1892eb1c6bbe059b13fcdcb81b75c5d2cb206b 100644
--- a/scripts/invoices/rebuild_merge_pdf.php
+++ b/scripts/invoices/rebuild_merge_pdf.php
@@ -84,7 +84,7 @@ foreach ($argv as $key => $value)
 	if ($value == 'filter=all')
 	{
 		$found=true;
-		$option.='all';
+		$option.=(empty($option)?'':'_').'all';
 		$filter[]='all';
 
 		print 'Rebuild PDF for all invoices'."\n";
@@ -121,6 +121,31 @@ foreach ($argv as $key => $value)
 		print 'Rebuild PDF for invoices with no payment done yet.'."\n";
 	}
 
+    if ($value == 'filter=nodeposit')
+    {
+        $found=true;
+        $option.=(empty($option)?'':'_').'nodeposit';
+        $filter[]='nodeposit';
+
+        print 'Exclude deposit invoices'."\n";
+    }
+    if ($value == 'filter=noreplacement')
+    {
+        $found=true;
+        $option.=(empty($option)?'':'_').'noreplacement';
+        $filter[]='noreplacement';
+
+        print 'Exclude replacement invoices'."\n";
+    }
+    if ($value == 'filter=nocreditnote')
+    {
+        $found=true;
+        $option.=(empty($option)?'':'_').'nocreditnote';
+        $filter[]='nocreditnote';
+
+        print 'Exclude credit note invoices'."\n";
+    }
+
 	if (! $found && preg_match('/filter=/i',$value))
 	{
 		usage();
@@ -181,6 +206,24 @@ if (in_array('payments',$filter))
 	$sqlwhere.= " AND p.datep <= ".$db->idate($paymentdatebefore);
 	$sqlorder = " ORDER BY p.datep ASC";
 }
+if (in_array('nodeposit',$filter))
+{
+    if (empty($sqlwhere)) $sqlwhere=' WHERE ';
+    else $sqlwhere.=" AND";
+    $sqlwhere.=' type <> 3';
+}
+if (in_array('noreplacement',$filter))
+{
+    if (empty($sqlwhere)) $sqlwhere=' WHERE ';
+    else $sqlwhere.=" AND";
+    $sqlwhere.=' type <> 1';
+}
+if (in_array('nocreditnote',$filter))
+{
+    if (empty($sqlwhere)) $sqlwhere=' WHERE ';
+    else $sqlwhere.=" AND";
+    $sqlwhere.=' type <> 2';
+}
 if ($sqlwhere) $sql.=$sqlwhere;
 if ($sqlorder) $sql.=$sqlorder;
 
@@ -346,7 +389,10 @@ function usage()
 	print "Usage:   ".$script_file." filter=all\n";
 	print "To build/merge PDF for invoices with no payments, use filter=nopayment\n";
 	print "Usage:   ".$script_file." filter=nopayment\n";
-	print "\n";
+    print "To exclude credit notes, use filter=nocreditnote\n";
+    print "To exclude replacement invoices, use filter=noreplacement\n";
+    print "To exclude deposit invoices, use filter=nodeposit\n";
+    print "\n";
 	print "Example: ".$script_file." filter=payments 20080101 20081231 lang=fr_FR\n";
 	print "Example: ".$script_file." filter=all lang=it_IT\n";
 	print "\n";