Bug 7468: fix the export labels popup header
authorMaryse Simard <maryse.simard@inlibro.com>
Thu, 16 Jan 2020 14:19:39 +0000 (09:19 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 21 Jan 2020 11:29:15 +0000 (11:29 +0000)
When exporting a barcode range, the export popup should display "1 batch
to export" instead of "0 batches to export". In this context, it can be
considered a label batch and should be counted as such.

To test:
When clicking the "Print range" button, the popup should show "1 batch
to export".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

labels/label-print.pl

index 310546f..2ef72ed 100755 (executable)
@@ -60,7 +60,7 @@ my $layouts = undef;
 my $templates = undef;
 my $output_formats = undef;
 my @batches = ();
-my $multi_batch_count = scalar(@batch_ids);
+my $multi_batch_count = scalar(@batch_ids) || ($from && $to) ? 1 : 0;
 my $label_count = scalar(@label_ids);
 my $item_count = scalar(@item_numbers);