Class Mage_Sales_Model_Order_Invoice

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@magentocommerce.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Sales/Model/Order/Invoice.php (line 28)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Sales_Model_Abstract
         |
         --Mage_Sales_Model_Order_Invoice
Class Constant Summary
CAPTURE_OFFLINE = 'offline'
CAPTURE_ONLINE = 'online'
NOT_CAPTURE = 'not_capture'
REPORT_DATE_TYPE_INVOICE_CREATED = 'invoice_created'
REPORT_DATE_TYPE_ORDER_CREATED = 'order_created'
XML_PATH_EMAIL_COPY_METHOD = 'sales_email/invoice/copy_method'
XML_PATH_EMAIL_COPY_TO = 'sales_email/invoice/copy_to'
XML_PATH_EMAIL_ENABLED = 'sales_email/invoice/enabled'
XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice/guest_template'
XML_PATH_EMAIL_IDENTITY = 'sales_email/invoice/identity'
XML_PATH_EMAIL_TEMPLATE = 'sales_email/invoice/template'
XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/invoice_comment/copy_method'
XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/invoice_comment/copy_to'
XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/invoice_comment/enabled'
XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice_comment/guest_template'
XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/invoice_comment/identity'
XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/invoice_comment/template'
Variable Summary
static mixed $_states
mixed $_comments
mixed $_items
mixed $_order
Method Summary
static array getStates ()
void __destruct ()
Mage_Sales_Model_Order_Invoice addComment ( $comment, [bool $notify = false], [bool $visibleOnFront = false])
bool canCancel ()
bool canCapture ()
bool canRefund ()
bool canVoid ()
void getAllItems ()
void getCommentsCollection ([ $reload = false])
void getItemById ( $itemId)
string getStateName ([int $stateId = null])
bool isCanceled ()
bool isLast ()
unknown register ()
Mage_Sales_Model_Order_Invoice sendEmail ([boolean $notifyCustomer = true], [string $comment = ''])
Mage_Sales_Model_Order_Invoice sendUpdateEmail ([boolean $notifyCustomer = true], [string $comment = ''])
bool wasPayCalled ()
void _beforeDelete ()
void _construct ()
void _getEmails ( $configPath)
Variables
static mixed $_states (line 58)
  • access: protected
mixed $_comments (line 61)
  • access: protected
mixed $_eventObject = 'invoice' (line 67)
  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventObject
Parameter name in event
mixed $_eventPrefix = 'sales_order_invoice' (line 66)
  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventPrefix
Prefix of model events names
mixed $_items (line 60)
  • access: protected
mixed $_order (line 62)
  • access: protected
mixed $_saveBeforeDestruct = false (line 64)
  • access: protected
bool $_wasPayCalled = false (line 73)

Whether the pay() was called

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
static method getStates (line 441)

Retrieve invoice states array

  • access: public
static array getStates ()
Destructor __destruct (line 75)
  • access: public
void __destruct ()
addComment (line 571)

Adds comment to invoice with additional possibility to send it to customer via email and show it in customer account

  • access: public
Mage_Sales_Model_Order_Invoice addComment ( $comment, [bool $notify = false], [bool $visibleOnFront = false])
  • bool $notify
  • bool $visibleOnFront
  • $comment
addItem (line 424)
  • access: public
void addItem (Mage_Sales_Model_Order_Invoice_Item $item)
canCancel (line 240)

Check invoice cancel action availability

  • access: public
bool canCancel ()
canCapture (line 201)

Check invice capture action availability

  • access: public
bool canCapture ()
cancel (line 331)

Cancel invoice action

  • access: public
canRefund (line 250)

Check invoice refund action availability

  • access: public
bool canRefund ()
canVoid (line 213)

Check invice void action availability

  • access: public
bool canVoid ()
capture (line 266)

Capture invoice

  • access: public
collectTotals (line 380)

Invoice totals collecting

  • access: public
getAllItems (line 403)
  • access: public
void getAllItems ()
getBillingAddress (line 171)

Retrieve billing address

  • access: public
Mage_Sales_Model_Order_Address getBillingAddress ()
getCommentsCollection (line 588)
  • access: public
void getCommentsCollection ([ $reload = false])
  • $reload
getConfig (line 114)

Retrieve invoice configuration model

  • access: public
getItemById (line 414)
  • access: public
void getItemById ( $itemId)
  • $itemId
getItemsCollection (line 388)
  • access: public
void getItemsCollection ()
getOrder (line 148)

Retrieve the order the invoice for created for

  • access: public
getOrderIncrementId (line 161)

Retrieve the increment_id of the order

  • access: public
string getOrderIncrementId ()
getShippingAddress (line 181)

Retrieve shipping address

  • access: public
Mage_Sales_Model_Order_Address getShippingAddress ()
getStateName (line 459)

Retrieve invoice state name by state identifier

  • access: public
string getStateName ([int $stateId = null])
  • int $stateId
getStore (line 124)

Retrieve store model instance

  • access: public
Mage_Core_Model_Store getStore ()

Redefinition of:
Mage_Sales_Model_Abstract::getStore()
Get object store identifier
isCanceled (line 191)

Check invoice cancel state

  • access: public
bool isCanceled ()
isLast (line 552)

Checking if the invoice is last

  • access: public
bool isLast ()
loadByIncrementId (line 96)

Load invoice by increment id

  • access: public
Mage_Sales_Model_Order_Invoice loadByIncrementId (string $incrementId)
  • string $incrementId
pay (line 280)

Pay invoice

  • access: public
register (line 481)

Register invoice

Apply to order, order items etc.

  • access: public
unknown register ()
reset (line 788)

Reset invoice object

  • access: public
sendEmail (line 615)

Send email with invoice data

  • access: public
Mage_Sales_Model_Order_Invoice sendEmail ([boolean $notifyCustomer = true], [string $comment = ''])
  • boolean $notifyCustomer
  • string $comment
sendUpdateEmail (line 705)

Send email with invoice update information

  • access: public
Mage_Sales_Model_Order_Invoice sendUpdateEmail ([boolean $notifyCustomer = true], [string $comment = ''])
  • boolean $notifyCustomer
  • string $comment
setOrder (line 135)

Declare order for invoice

  • access: public
void (line 319)

Void invoice

  • access: public
wasPayCalled (line 309)

Whether pay() method was called (whether order and payment totals were updated)

  • access: public
bool wasPayCalled ()
_afterSave (line 822)

After object save manipulation

  • access: protected

Redefinition of:
Mage_Sales_Model_Abstract::_afterSave()
Processing object after save data Updates relevant grid table records.
_beforeDelete (line 777)
  • access: protected
void _beforeDelete ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeDelete()
Processing object before delete data
_beforeSave (line 805)

Before object save manipulations

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data
_construct (line 85)

Initialize invoice resource model

  • access: protected
void _construct ()
_getEmails (line 768)
  • access: protected
void _getEmails ( $configPath)
  • $configPath

Inherited Methods

Inherited From Mage_Sales_Model_Abstract

Mage_Sales_Model_Abstract::getCreatedAtDate()
Mage_Sales_Model_Abstract::getCreatedAtStoreDate()
Mage_Sales_Model_Abstract::getStore()
Mage_Sales_Model_Abstract::_afterSave()

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()
Class Constants
CAPTURE_OFFLINE = 'offline' (line 38)
CAPTURE_ONLINE = 'online' (line 37)
NOT_CAPTURE = 'not_capture' (line 39)
REPORT_DATE_TYPE_INVOICE_CREATED = 'invoice_created' (line 56)
REPORT_DATE_TYPE_ORDER_CREATED = 'order_created' (line 55)
STATE_CANCELED = 3 (line 35)
STATE_OPEN = 1 (line 33)

Invoice states

STATE_PAID = 2 (line 34)
XML_PATH_EMAIL_COPY_METHOD = 'sales_email/invoice/copy_method' (line 45)
XML_PATH_EMAIL_COPY_TO = 'sales_email/invoice/copy_to' (line 44)
XML_PATH_EMAIL_ENABLED = 'sales_email/invoice/enabled' (line 46)
XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice/guest_template' (line 42)
XML_PATH_EMAIL_IDENTITY = 'sales_email/invoice/identity' (line 43)
XML_PATH_EMAIL_TEMPLATE = 'sales_email/invoice/template' (line 41)
XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/invoice_comment/copy_method' (line 52)
XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/invoice_comment/copy_to' (line 51)
XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/invoice_comment/enabled' (line 53)
XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice_comment/guest_template' (line 49)
XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/invoice_comment/identity' (line 50)
XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/invoice_comment/template' (line 48)

Documentation generated on Fri, 11 Feb 2011 17:06:51 +0200 by phpDocumentor 1.4.3