
Public Member Functions | |
| getOrder () | |
| getSource () | |
| getInvoice () | |
| getSaveUrl () | |
| canCreateShipment () | |
| hasInvoiceShipmentTypeMismatch () | |
| canShipPartiallyItem () | |
| getForcedShipmentCreate () | |
Protected Member Functions | |
| _prepareLayout () | |
Definition at line 34 of file Form.php.
| _prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
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 | ( | ) |
| getForcedShipmentCreate | ( | ) |
| getInvoice | ( | ) |
Retrieve invoice model instance
Definition at line 61 of file Form.php.
00062 { 00063 return Mage::registry('current_invoice'); 00064 }
| getOrder | ( | ) |
Retrieve invoice 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
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 }
1.5.8