5
5
*/
6
6
namespace Magento \Sales \Block \Adminhtml \Order \Totals ;
7
7
8
+ use Magento \Framework \App \ObjectManager ;
9
+ use Magento \Framework \Math \Random ;
10
+
8
11
/**
9
12
* Adminhtml order tax totals block
10
13
*
@@ -50,6 +53,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax
50
53
* @param \Magento\Tax\Model\Sales\Order\TaxFactory $taxOrderFactory
51
54
* @param \Magento\Sales\Helper\Admin $salesAdminHelper
52
55
* @param array $data
56
+ * @param Random $randomHelper
53
57
*/
54
58
public function __construct (
55
59
\Magento \Backend \Block \Template \Context $ context ,
@@ -58,13 +62,15 @@ public function __construct(
58
62
\Magento \Tax \Model \Calculation $ taxCalculation ,
59
63
\Magento \Tax \Model \Sales \Order \TaxFactory $ taxOrderFactory ,
60
64
\Magento \Sales \Helper \Admin $ salesAdminHelper ,
61
- array $ data = []
65
+ array $ data = [],
66
+ ?Random $ randomHelper = null
62
67
) {
63
68
$ this ->_taxHelper = $ taxHelper ;
64
69
$ this ->_taxCalculation = $ taxCalculation ;
65
70
$ this ->_taxOrderFactory = $ taxOrderFactory ;
66
71
$ this ->_salesAdminHelper = $ salesAdminHelper ;
67
72
$ data ['taxHelper ' ] = $ this ->_taxHelper ;
73
+ $ data ['randomHelper ' ] = $ randomHelper ?? ObjectManager::getInstance ()->get (Random::class);
68
74
parent ::__construct ($ context , $ taxConfig , $ data );
69
75
}
70
76
0 commit comments