Skip to content

Commit 34b1992

Browse files
author
Stanislav Idolov
authored
ENGCOM-913: [FIX] several fixes for sales and tax module: not used imports, variables and legacy code #14106
2 parents 131cf4b + ff78773 commit 34b1992

File tree

17 files changed

+7
-41
lines changed

17 files changed

+7
-41
lines changed

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Sales\Block\Adminhtml\Order\Create\Form;
77

8-
use Magento\Framework\Convert\ConvertArray;
98
use Magento\Framework\Pricing\PriceCurrencyInterface;
109

1110
/**

app/code/Magento/Sales/Block/Adminhtml/Order/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ protected function _construct()
182182
'class' => __('unhold'),
183183
'id' => 'order-view-unhold-button',
184184
'data_attribute' => [
185-
'url' => $this->getUnHoldUrl()
185+
'url' => $this->getUnholdUrl()
186186
]
187187
]
188188
);

app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form
2424
protected function _prepareForm()
2525
{
2626
parent::_prepareForm();
27-
$form = $this->getForm();
28-
$htmlIdPrefix = $form->getHtmlIdPrefix();
2927
/** @var \Magento\Framework\Data\Form\Element\Fieldset $fieldset */
3028
$fieldset = $this->getForm()->getElement('base_fieldset');
3129

app/code/Magento/Sales/Helper/Admin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public function displayPriceAttribute($dataObject, $code, $strong = false, $sepa
8484
*/
8585
public function displayPrices($dataObject, $basePrice, $price, $strong = false, $separator = '<br/>')
8686
{
87-
$order = false;
8887
if ($dataObject instanceof \Magento\Sales\Model\Order) {
8988
$order = $dataObject;
9089
} else {

app/code/Magento/Sales/Model/Order/Creditmemo.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -425,23 +425,6 @@ public function canCancel()
425425
public function canVoid()
426426
{
427427
return false;
428-
$canVoid = false;
429-
if ($this->getState() == self::STATE_REFUNDED) {
430-
$canVoid = $this->getCanVoidFlag();
431-
/**
432-
* If we not retrieve negative answer from payment yet
433-
*/
434-
if ($canVoid === null) {
435-
$canVoid = $this->getOrder()->getPayment()->canVoid();
436-
if ($canVoid === false) {
437-
$this->setCanVoidFlag(false);
438-
$this->_saveBeforeDestruct = true;
439-
}
440-
} else {
441-
$canVoid = (bool)$canVoid;
442-
}
443-
}
444-
return $canVoid;
445428
}
446429

447430
/**

app/code/Magento/Sales/Model/Order/CreditmemoRepository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Sales\Model\Order;
88

99
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
10-
use Magento\Sales\Model\ResourceModel\Order\Creditmemo as Resource;
1110
use Magento\Sales\Model\ResourceModel\Metadata;
1211
use Magento\Sales\Api\Data\CreditmemoSearchResultInterfaceFactory as SearchResultFactory;
1312
use Magento\Framework\Exception\NoSuchEntityException;

app/code/Magento/Sales/Model/Order/Invoice/Total/Grand.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@
88
class Grand extends AbstractTotal
99
{
1010
/**
11+
* Collect invoice grand total
12+
*
1113
* @param \Magento\Sales\Model\Order\Invoice $invoice
1214
* @return $this
15+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
1316
*/
1417
public function collect(\Magento\Sales\Model\Order\Invoice $invoice)
1518
{
16-
/**
17-
* Check order grand total and invoice amounts
18-
*/
19-
if ($invoice->isLast()) {
20-
//
21-
}
2219
return $this;
2320
}
2421
}

app/code/Magento/Sales/Model/Order/ItemRepository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Magento\Framework\Exception\InputException;
1616
use Magento\Framework\Exception\NoSuchEntityException;
1717
use Magento\Sales\Api\Data\OrderItemInterface;
18-
use Magento\Sales\Api\Data\OrderItemSearchResultInterface;
1918
use Magento\Sales\Api\Data\OrderItemSearchResultInterfaceFactory;
2019
use Magento\Sales\Api\OrderItemRepositoryInterface;
2120
use Magento\Sales\Model\ResourceModel\Metadata;

app/code/Magento/Sales/Model/Order/OrderValidator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Sales\Model\Order;
77

88
use Magento\Sales\Api\Data\OrderInterface;
9-
use Magento\Sales\Exception\DocumentValidationException;
109

1110
/**
1211
* Class OrderValidator

app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ protected function _construct()
4848
/**
4949
* Returns connection
5050
*
51-
* @todo: make method protected
5251
* @return AdapterInterface
5352
*/
5453
public function getConnection()

0 commit comments

Comments
 (0)