Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Totals.php
Go to the documentation of this file.
1 <?php
7 
15 class Totals extends \Magento\Sales\Block\Adminhtml\Totals//\Magento\Sales\Block\Adminhtml\Order\AbstractOrder
16 {
22  protected function _initTotals()
23  {
24  parent::_initTotals();
25  $this->_totals['paid'] = new \Magento\Framework\DataObject(
26  [
27  'code' => 'paid',
28  'strong' => true,
29  'value' => $this->getSource()->getTotalPaid(),
30  'base_value' => $this->getSource()->getBaseTotalPaid(),
31  'label' => __('Total Paid'),
32  'area' => 'footer',
33  ]
34  );
35  $this->_totals['refunded'] = new \Magento\Framework\DataObject(
36  [
37  'code' => 'refunded',
38  'strong' => true,
39  'value' => $this->getSource()->getTotalRefunded(),
40  'base_value' => $this->getSource()->getBaseTotalRefunded(),
41  'label' => __('Total Refunded'),
42  'area' => 'footer',
43  ]
44  );
45  $this->_totals['due'] = new \Magento\Framework\DataObject(
46  [
47  'code' => 'due',
48  'strong' => true,
49  'value' => $this->getSource()->getTotalDue(),
50  'base_value' => $this->getSource()->getBaseTotalDue(),
51  'label' => __('Total Due'),
52  'area' => 'footer',
53  ]
54  );
55  return $this;
56  }
57 }
__()
Definition: __.php:13