public function __construct(\Magento\Framework\Registry $registry, \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory, array $data = [], \Magento\Framework\Module\Manager $moduleManager, \Magento\Framework\ObjectManagerInterface $objectManagerInterface)
 {
     $this->_registry = $registry;
     $this->_objectId = 'creditmemo_id';
     $this->_controller = 'sales_order_creditmemo';
     $this->_mode = 'view';
     parent::__construct($context, $paymentHelper, $methodSpecificationFactory, $data);
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if ($this->getCreditmemo()->canCancel()) {
         $this->_addButton('cancel', array('label' => __('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->_isAllowedAction('emails')) {
         $this->addButton('send_notification', array('label' => __('Send Email'), 'onclick' => 'confirmSetLocation(\'' . __('Are you sure you want to send Creditmemo email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
     }
     if ($this->getCreditmemo()->canRefund()) {
         $this->_addButton('refund', array('label' => __('Refund'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getRefundUrl() . '\')'));
     }
     if ($this->getCreditmemo()->canVoid()) {
         $this->_addButton('void', array('label' => __('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getCreditmemo()->getId()) {
         $this->_addButton('print', array('label' => __('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
Example #2
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Payment\Helper\Data $paymentHelper
  * @param \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory
  * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param \Magento\Payment\Model\Method\SpecificationInterface $paymentSpecification
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory, \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Payment\Model\Method\SpecificationInterface $paymentSpecification, array $data = array())
 {
     $this->_multishipping = $multishipping;
     $this->_checkoutSession = $checkoutSession;
     $this->paymentSpecification = $paymentSpecification;
     parent::__construct($context, $paymentHelper, $methodSpecificationFactory, $data);
     $this->_isScopePrivate = true;
 }
Example #3
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Payment\Helper\Data $paymentHelper
  * @param \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory, \Magento\Backend\Model\Session\Quote $sessionQuote, array $data = array())
 {
     $this->_sessionQuote = $sessionQuote;
     parent::__construct($context, $paymentHelper, $methodSpecificationFactory, $data);
 }
Example #4
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Payment\Helper\Data $paymentHelper
  * @param \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory, \Magento\Checkout\Model\Session $checkoutSession, array $data = [])
 {
     $this->_checkoutSession = $checkoutSession;
     parent::__construct($context, $paymentHelper, $methodSpecificationFactory, $data);
     $this->_isScopePrivate = true;
 }