Public Member Functions | |
__construct () | |
getCreditmemo () | |
getHeaderText () | |
getBackUrl () |
Definition at line 35 of file Create.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 37 of file Create.php.
00038 { 00039 $this->_objectId = 'order_id'; 00040 $this->_controller = 'sales_order_creditmemo'; 00041 $this->_mode = 'create'; 00042 00043 parent::__construct(); 00044 00045 $this->_removeButton('delete'); 00046 $this->_removeButton('save'); 00047 00048 /*$this->_addButton('submit_creditmemo', array( 00049 'label' => Mage::helper('sales')->__('Submit Credit Memo'), 00050 'class' => 'save submit-button', 00051 'onclick' => '$(\'edit_form\').submit()', 00052 ) 00053 );*/ 00054 00055 }
getBackUrl | ( | ) |
Get URL for back (reset) button
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 87 of file Create.php.
00088 { 00089 return $this->getUrl('*/sales_order/view', array('order_id'=>$this->getCreditmemo()->getOrderId())); 00090 }
getCreditmemo | ( | ) |
Retrieve creditmemo model instance
Definition at line 62 of file Create.php.
00063 { 00064 return Mage::registry('current_creditmemo'); 00065 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 67 of file Create.php.
00068 { 00069 if ($this->getCreditmemo()->getInvoice()) { 00070 $header = Mage::helper('sales')->__('New Credit Memo for Invoice #%s', 00071 $this->getCreditmemo()->getInvoice()->getIncrementId() 00072 ); 00073 } 00074 else { 00075 $header = Mage::helper('sales')->__('New Credit Memo for Order #%s', 00076 $this->getCreditmemo()->getOrder()->getRealOrderId() 00077 ); 00078 } 00079 /*$header = Mage::helper('sales')->__('New Credit Memo for Order #%s | Order Date: %s | Customer Name: %s', 00080 $this->getCreditmemo()->getOrder()->getRealOrderId(), 00081 $this->formatDate($this->getCreditmemo()->getOrder()->getCreatedAt(), 'medium', true), 00082 $this->getCreditmemo()->getOrder()->getCustomerName() 00083 );*/ 00084 return $header; 00085 }