Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create:

Mage_Adminhtml_Block_Widget_Form_Container Mage_Adminhtml_Block_Widget_Container Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getCreditmemo ()
 getHeaderText ()
 getBackUrl ()


Detailed Description

Definition at line 35 of file Create.php.


Constructor & Destructor Documentation

__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     }


Member Function Documentation

getBackUrl (  ) 

Get URL for back (reset) button

Returns:
string

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

Returns:
Mage_Sales_Model_Order_Creditmemo

Definition at line 62 of file Create.php.

00063     {
00064         return Mage::registry('current_creditmemo');
00065     }

getHeaderText (  ) 

Get header text

Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:00 2009 for Magento by  doxygen 1.5.8