Bug 5865 - Labels wrap incorrectly when paper width is greater than height
This is due to the incorrect use of string comparators to compare numeric values.
This patch corrects that.
Note: This should be backported to 3.2.x
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 5a924cc530)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
bea1621ffa
commit
3ca14dd326
|
|
@ -33,13 +33,13 @@ my $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id);
|
|||
|
||||
sub _calc_next_label_pos {
|
||||
my ($row_count, $col_count, $llx, $lly) = @_;
|
||||
if ($col_count lt $template->get_attr('cols')) {
|
||||
if ($col_count < $template->get_attr('cols')) {
|
||||
$llx = ($llx + $template->get_attr('label_width') + $template->get_attr('col_gap'));
|
||||
$col_count++;
|
||||
}
|
||||
else {
|
||||
$llx = $template->get_attr('left_margin');
|
||||
if ($row_count eq $template->get_attr('rows')) {
|
||||
if ($row_count == $template->get_attr('rows')) {
|
||||
$pdf->Page();
|
||||
$lly = ($template->get_attr('page_height') - $template->get_attr('top_margin') - $template->get_attr('label_height'));
|
||||
$row_count = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue