Skip to content

Commit 28d4c4a

Browse files
committed
ACP2E-1220: Misaligned Column Values in PDF
1 parent 24a2c46 commit 28d4c4a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function draw()
137137
foreach ($this->string->split($item->getSku(), 17) as $part) {
138138
$text[] = $part;
139139
}
140-
$line[] = ['text' => $text, 'feed' => $x];
140+
$line[] = ['text' => $text, 'feed' => $x, 'align' => 'right'];
141141
}
142142

143143
$x += 100;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ private function drawSkus(DataObject $childItem, array $lines): array
153153
foreach ($this->string->split($this->getItem()->getSku(), 17) as $part) {
154154
$text[] = $part;
155155
}
156-
$lines[$index][] = ['text' => $text, 'feed' => 255];
156+
$lines[$index][] = [
157+
'text' => $text,
158+
'feed' => 290,
159+
'align' => 'right'
160+
];
157161
}
158162

159163
return $lines;
@@ -177,8 +181,8 @@ private function drawPrices(DataObject $childItem, array $lines): array
177181

178182
$item = $this->getItem();
179183
$this->_item = $childItem;
180-
$feedPrice = 380;
181-
$feedSubtotal = $feedPrice + 185;
184+
$feedPrice = 395;
185+
$feedSubtotal = $feedPrice + 170;
182186
foreach ($this->getItemPricesForDisplay() as $priceData) {
183187
if (isset($priceData['label'])) {
184188
// draw Price label

0 commit comments

Comments
 (0)