示例#1
0
 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__('Update Qty\'s'), 'onclick' => $onclick)));
     $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Invoice'), 'class' => 'save submit-button', 'onclick' => '$(\'edit_form\').submit()')));
     return parent::_prepareLayout();
 }
示例#2
0
文件: Items.php 项目: quyip8818/Mag
 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         Mage::throwException(Mage::helper('adminhtml')->__('Invalid parent block for this block'));
     }
     parent::_beforeToHtml();
 }
示例#3
0
文件: Items.php 项目: relue/magento2
 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Invalid parent block for this block'));
     }
     $this->setOrder($this->getParentBlock()->getOrder());
     parent::_beforeToHtml();
 }
 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         AO::throwException(AO::helper('adminhtml')->__('Invalid parrent block for this block'));
     }
     $this->setOrder($this->getParentBlock()->getOrder());
     parent::_beforeToHtml();
 }
示例#5
0
 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     $_item = $this->getItem();
     if ($_item && $_item->getGwId()) {
         return parent::_toHtml();
     } else {
         return false;
     }
 }
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->setId('prominclinkorderAdminhtmlAdminPreview');
     if (Mage::registry('order')) {
         $_order = $this->getOrder(Mage::registry('order'));
     }
     $this->addItemRender("default", "adminhtml/sales_order_view_items_renderer_default", "sales/order/view/items/renderer/default.phtml");
     $this->setTemplate('prominclinkorder/admin/preview.phtml')->setData('store', Mage::registry('store'))->setData('email', Mage::registry('email'))->setData('order_id', Mage::registry('order_id'))->setData('saved', Mage::registry('saved'));
 }
示例#7
0
 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         Mage::throwException(Mage::helper('adminhtml')->__('Invalid parent block for this block.'));
     }
     $this->setSubscription($this->getParentBlock()->getSubscription());
     $orderInfos = $this->getSubscription()->getOrderInfo();
     $order = Mage::getModel('sales/order')->setData($orderInfos)->setId(null);
     $this->setOrder($order);
     parent::_beforeToHtml();
 }
示例#8
0
 protected function _prepareLayout()
 {
     if ($this->getInvoice()->getId()) {
         $this->setChild('invoice_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_invoice'));
     }
     if ($this->getOrder()->getId()) {
         $this->setChild('order_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_order'));
     }
     if ($this->getCreditmemo()->getId()) {
         $this->setChild('creditmemo_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_creditmemo'));
     }
     parent::_prepareLayout();
 }
示例#9
0
 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items
  */
 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('creditmemo_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Update Qty\'s'), 'class' => 'update-button', 'onclick' => $onclick)));
     if ($this->getCreditmemo()->canRefund()) {
         if ($this->getCreditmemo()->getInvoice() && $this->getCreditmemo()->getInvoice()->getTransactionId()) {
             $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemo()')));
         }
         $this->setChild('submit_offline', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund Offline'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemoOffline()')));
     } else {
         $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund Offline'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemoOffline()')));
     }
     return parent::_prepareLayout();
 }
示例#10
0
 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__('Update Qty\'s'), 'onclick' => $onclick)));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         if ($item->getQty() || $this->getSource()->getData('base_grand_total')) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     $_submitLabel = $this->getOrder()->getForcedDoShipmentWithInvoice() ? 'Submit Invoice and Shipment' : 'Submit Invoice';
     $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('%s', $_submitLabel), 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => '$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton)));
     return parent::_prepareLayout();
 }
示例#11
0
 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__("Update Qty's"), 'onclick' => $onclick)));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         /**
          * @see bug #14839
          */
         if ($item->getQty()) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     $_saveLabel = Mage::helper('sales')->__('Save');
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $_saveLabel, 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton)));
     return parent::_prepareLayout();
 }
示例#12
0
 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->addChild('update_button', 'Mage_Adminhtml_Block_Widget_Button', array('class' => 'update-button', 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('Update Qty\'s'), 'onclick' => $onclick));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         /**
          * @see bug #14839
          */
         if ($item->getQty()) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     if ($this->getOrder()->getForcedShipmentWithInvoice()) {
         $_submitLabel = Mage::helper('Mage_Sales_Helper_Data')->__('Submit Invoice and Shipment');
     } else {
         $_submitLabel = Mage::helper('Mage_Sales_Helper_Data')->__('Submit Invoice');
     }
     $this->addChild('submit_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => $_submitLabel, 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton));
     return parent::_prepareLayout();
 }
示例#13
0
 protected function _beforeToHtml()
 {
     $this->setOrder($this->getQuote());
     parent::_beforeToHtml();
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
 }
示例#15
0
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('mw_followupemail/itemscart.phtml');
 }
示例#16
0
 /**
  * Prepare child blocks
  */
 protected function _beforeToHtml()
 {
     $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Shipment'), 'class' => 'save submit-button', 'onclick' => 'submitShipment(this);')));
     return parent::_beforeToHtml();
 }
示例#17
0
 /**
  * Prepare child blocks
  */
 protected function _beforeToHtml()
 {
     $this->addChild('submit_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Submit Shipment'), 'class' => 'save submit-button', 'onclick' => 'submitShipment(this);'));
     return parent::_beforeToHtml();
 }