Mage_Adminhtml_Block_Sales_Order_Invoice_Create Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Invoice_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 ()
 getInvoice ()
 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_invoice';
00041         $this->_mode = 'create';
00042 
00043         parent::__construct();
00044 
00045         $this->_removeButton('save');
00046         $this->_removeButton('delete');
00047 
00048         /*$this->_addButton('submit_invoice', array(
00049             'label'     => Mage::helper('sales')->__('Submit Invoice'),
00050             'class'     => 'save submit-button',
00051             'onclick'   => '$(\'edit_form\').submit()',
00052             )
00053         );*/
00054     }


Member Function Documentation

getBackUrl (  ) 

Get URL for back (reset) button

Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.

Definition at line 85 of file Create.php.

00086     {
00087         return $this->getUrl('*/sales_order/view', array('order_id'=>$this->getInvoice()->getOrderId()));
00088     }

getHeaderText (  ) 

Get header text

Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Container.

Definition at line 66 of file Create.php.

00067     {
00068         if ($this->getInvoice()->getOrder()->getForcedDoShipmentWithInvoice()) {
00069             $_label = ' and Shipment';
00070         } else {
00071             $_label = '';
00072         }
00073         $header = Mage::helper('sales')->__('New Invoice%s for Order #%s',
00074             $_label,
00075             $this->getInvoice()->getOrder()->getRealOrderId()
00076         );
00077         /*$header = Mage::helper('sales')->__('New Invoice for Order #%s | Order Date: %s | Customer Name: %s',
00078             $this->getInvoice()->getOrder()->getRealOrderId(),
00079             $this->formatDate($this->getInvoice()->getOrder()->getCreatedAt(), 'medium', true),
00080             $this->getInvoice()->getOrder()->getCustomerName()
00081         );*/
00082         return $header;
00083     }

getInvoice (  ) 

Retrieve invoice model instance

Returns:
Mage_Sales_Model_Invoice

Definition at line 61 of file Create.php.

00062     {
00063         return Mage::registry('current_invoice');
00064     }


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