Skip to content

Commit 1df59a6

Browse files
committed
ACP2E-1220: Misaligned Column Values in PDF
1 parent 10252bb commit 1df59a6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function draw()
140140
$line[] = ['text' => $text, 'feed' => $x, 'align' => 'right'];
141141
}
142142

143-
$x += 100;
143+
$x += 30;
144144

145145
// draw prices
146146
if ($this->canShowPriceInfo($childItem)) {
@@ -152,18 +152,18 @@ public function draw()
152152
// draw Discount
153153
$text = $order->formatPriceTxt(-$childItem->getDiscountAmount());
154154
$line[] = ['text' => $text, 'feed' => $x, 'font' => 'bold', 'align' => 'right', 'width' => 50];
155-
$x += 50;
155+
$x += 85;
156156

157157
// draw QTY
158158
$text = $childItem->getQty() * 1;
159159
$line[] = [
160160
'text' => $text,
161161
'feed' => $x,
162162
'font' => 'bold',
163-
'align' => 'center',
163+
'align' => 'right',
164164
'width' => 30,
165165
];
166-
$x += 30;
166+
$x += 35;
167167

168168
// draw Tax
169169
$text = $order->formatPriceTxt($childItem->getTaxAmount());

app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function draw()
106106
$line[0] = [
107107
'font' => 'italic',
108108
'text' => $this->string->split($attributes['option_label'], 60, true, true),
109-
'feed' => 60,
109+
'feed' => 100,
110110
];
111111

112112
$drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
@@ -134,10 +134,10 @@ public function draw()
134134

135135
// draw Name
136136
if ($childItem->getParentItem()) {
137-
$feed = 65;
137+
$feed = 110;
138138
$name = $this->getValueHtml($childItem);
139139
} else {
140-
$feed = 60;
140+
$feed = 100;
141141
$name = $childItem->getName();
142142
}
143143
$text = [];
@@ -151,7 +151,7 @@ public function draw()
151151
foreach ($this->string->split($childItem->getSku(), 25) as $part) {
152152
$text[] = $part;
153153
}
154-
$line[] = ['text' => $text, 'feed' => 440];
154+
$line[] = ['text' => $text, 'feed' => 565, 'align' => 'right'];
155155

156156
$drawItems[$optionId]['lines'][] = $line;
157157
}

0 commit comments

Comments
 (0)