Skip to content

Commit 02cbe85

Browse files
authored
ENGCOM-3781: Make it possible to generate sales PDF's using the API #20043
2 parents 96a8630 + d5ef21d commit 02cbe85

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
// @codingStandardsIgnoreFile
8+
/**
9+
* @var $block \Magento\OfflinePayments\Block\Info\Checkmo
10+
*/
11+
?>
12+
<?= $block->escapeHtml($block->getMethod()->getTitle()) ?>
13+
{{pdf_row_separator}}
14+
<?php if ($block->getInfo()->getAdditionalInformation()): ?>
15+
{{pdf_row_separator}}
16+
<?php if ($block->getPayableTo()): ?>
17+
<?= $block->escapeHtml(__('Make Check payable to: %1', $block->getPayableTo())) ?>
18+
{{pdf_row_separator}}
19+
<?php endif; ?>
20+
<?php if ($block->getMailingAddress()): ?>
21+
<?= $block->escapeHtml(__('Send Check to:')) ?>
22+
{{pdf_row_separator}}
23+
<?= /* @noEscape */ nl2br($block->escapeHtml($block->getMailingAddress())) ?>
24+
{{pdf_row_separator}}
25+
<?php endif; ?>
26+
<?php endif; ?>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
/**
7+
* @var $block \Magento\OfflinePayments\Block\Info\Purchaseorder
8+
*/
9+
?>
10+
<?= $block->escapeHtml(__('Purchase Order Number: %1', $block->getInfo()->getPoNumber())) ?>
11+
{{pdf_row_separator}}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
// @codingStandardsIgnoreFile
8+
/**
9+
* @see \Magento\Payment\Block\Info
10+
* @var \Magento\Payment\Block\Info $block
11+
*/
12+
?>
13+
<?= $block->escapeHtml($block->getMethod()->getTitle()) ?>{{pdf_row_separator}}
14+
15+
<?php if ($specificInfo = $block->getSpecificInformation()):?>
16+
<?php foreach ($specificInfo as $label => $value):?>
17+
<?= $block->escapeHtml($label) ?>:
18+
<?= $block->escapeHtml(implode(' ', $block->getValueAsArray($value))) ?>
19+
{{pdf_row_separator}}
20+
<?php endforeach; ?>
21+
<?php endif;?>
22+
23+
<?= $block->escapeHtml(implode('{{pdf_row_separator}}', $block->getChildPdfAsArray())) ?>

0 commit comments

Comments
 (0)