Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Items Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Items:

Mage_Adminhtml_Block_Sales_Items_Abstract Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getOrder ()
 getSource ()
 getShipment ()
 formatPrice ($price)
 getUpdateButtonHtml ()
 getUpdateUrl ()
 canShipPartially ()
 canShipPartiallyItem ()
 isShipmentRegular ()
 canSendShipmentEmail ()

Protected Member Functions

 _beforeToHtml ()


Detailed Description

Definition at line 35 of file Items.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Prepare child blocks

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 70 of file Items.php.

00071     {
00072         $this->setChild(
00073             'submit_button',
00074             $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
00075                 'label'     => Mage::helper('sales')->__('Submit Shipment'),
00076                 'class'     => 'save submit-button',
00077                 'onclick'   => '$(\'edit_form\').submit()',
00078             ))
00079         );
00080 
00081         return parent::_beforeToHtml();
00082     }

canSendShipmentEmail (  ) 

Definition at line 125 of file Items.php.

00126     {
00127         return Mage::helper('sales')->canSendNewShipmentEmail($this->getOrder()->getStore()->getId());
00128     }

canShipPartially (  ) 

Definition at line 99 of file Items.php.

00100     {
00101         $value = Mage::registry('current_shipment')->getOrder()->getCanShipPartially();
00102         if (!is_null($value) && !$value) {
00103             return false;
00104         }
00105         return true;
00106     }

canShipPartiallyItem (  ) 

Definition at line 108 of file Items.php.

00109     {
00110         $value = Mage::registry('current_shipment')->getOrder()->getCanShipPartiallyItem();
00111         if (!is_null($value) && !$value) {
00112             return false;
00113         }
00114         return true;
00115     }

formatPrice ( price  ) 

Reimplemented from Mage_Adminhtml_Block_Sales_Items_Abstract.

Definition at line 84 of file Items.php.

00085     {
00086         return $this->getShipment()->getOrder()->formatPrice($price);
00087     }

getOrder (  ) 

Retrieve invoice order

Returns:
Mage_Sales_Model_Order

Reimplemented from Mage_Adminhtml_Block_Sales_Items_Abstract.

Definition at line 42 of file Items.php.

00043     {
00044         return $this->getShipment()->getOrder();
00045     }

getShipment (  ) 

Retrieve shipment model instance

Returns:
Mage_Sales_Model_Order_Shipment

Definition at line 62 of file Items.php.

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

getSource (  ) 

Retrieve source

Returns:
Mage_Sales_Model_Order_Invoice

Reimplemented from Mage_Adminhtml_Block_Sales_Items_Abstract.

Definition at line 52 of file Items.php.

00053     {
00054         return $this->getShipment();
00055     }

getUpdateButtonHtml (  ) 

Definition at line 89 of file Items.php.

00090     {
00091         return $this->getChildHtml('update_button');
00092     }

getUpdateUrl (  ) 

Definition at line 94 of file Items.php.

00095     {
00096         return $this->getUrl('*/*/updateQty', array('order_id'=>$this->getShipment()->getOrderId()));
00097     }

isShipmentRegular (  ) 

Reimplemented from Mage_Adminhtml_Block_Sales_Items_Abstract.

Definition at line 117 of file Items.php.

00118     {
00119         if (!$this->canShipPartiallyItem() || !$this->canShipPartially()) {
00120             return false;
00121         }
00122         return true;
00123     }


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

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