Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Form:

Mage_Adminhtml_Block_Sales_Order_Abstract Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getOrder ()
 getSource ()
 getInvoice ()
 getSaveUrl ()
 canCreateShipment ()
 hasInvoiceShipmentTypeMismatch ()
 canShipPartiallyItem ()
 getForcedShipmentCreate ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Form.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 66 of file Form.php.

00067     {
00068       /*  $infoBlock = $this->getLayout()->createBlock('adminhtml/sales_order_view_info')
00069            ->setOrder($this->getInvoice()->getOrder());
00070        $this->setChild('order_info', $infoBlock);
00071 */
00072      /*  $this->setChild(
00073           'items',
00074             $this->getLayout()->createBlock('adminhtml/sales_order_invoice_create_items')
00075         );
00076         */
00077         $trackingBlock = $this->getLayout()->createBlock('adminhtml/sales_order_invoice_create_tracking');
00078        //$this->setChild('order_tracking', $trackingBlock);
00079           $this->setChild('tracking', $trackingBlock);
00080 
00081 
00082               /*
00083         $paymentInfoBlock = $this->getLayout()->createBlock('adminhtml/sales_order_payment')
00084            ->setPayment($this->getInvoice()->getOrder()->getPayment());
00085         $this->setChild('payment_info', $paymentInfoBlock);
00086         */
00087         return parent::_prepareLayout();
00088     }

canCreateShipment (  ) 

Definition at line 95 of file Form.php.

00096     {
00097         foreach ($this->getInvoice()->getAllItems() as $item) {
00098             if ($item->getOrderItem()->getQtyToShip()) {
00099                 return true;
00100             }
00101         }
00102         return false;
00103     }

canShipPartiallyItem (  ) 

Definition at line 114 of file Form.php.

00115     {
00116         $value = $this->getOrder()->getCanShipPartiallyItem();
00117         if (!is_null($value) && !$value) {
00118             return false;
00119         }
00120         return true;
00121     }

getForcedShipmentCreate (  ) 

Return forced creating of shipment flag

Returns:
integer

Definition at line 128 of file Form.php.

00129     {
00130         return (int) $this->getOrder()->getForcedDoShipmentWithInvoice();
00131     }

getInvoice (  ) 

Retrieve invoice model instance

Returns:
Mage_Sales_Model_Order_Invoice

Definition at line 61 of file Form.php.

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

getOrder (  ) 

Retrieve invoice order

Returns:
Mage_Sales_Model_Order

Reimplemented from Mage_Adminhtml_Block_Sales_Order_Abstract.

Definition at line 41 of file Form.php.

00042     {
00043         return $this->getInvoice()->getOrder();
00044     }

getSaveUrl (  ) 

Definition at line 90 of file Form.php.

00091     {
00092         return $this->getUrl('*/*/save', array('order_id' => $this->getInvoice()->getOrderId()));
00093     }

getSource (  ) 

Retrieve source

Returns:
Mage_Sales_Model_Order_Invoice

Definition at line 51 of file Form.php.

00052     {
00053         return $this->getInvoice();
00054     }

hasInvoiceShipmentTypeMismatch (  ) 

Definition at line 105 of file Form.php.

00105                                                      {
00106         foreach ($this->getInvoice()->getAllItems() as $item) {
00107             if ($item->getOrderItem()->isChildrenCalculated() && !$item->getOrderItem()->isShipSeparately()) {
00108                 return true;
00109             }
00110         }
00111         return false;
00112     }


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