Class Mage_Sales_Model_Order_Creditmemo

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/Creditmemo.php (line 28)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Sales_Model_Abstract
         |
         --Mage_Sales_Model_Order_Creditmemo
Class Constant Summary
REPORT_DATE_TYPE_ORDER_CREATED = 'order_created'
REPORT_DATE_TYPE_REFUND_CREATED = 'refund_created'
XML_PATH_EMAIL_COPY_METHOD = 'sales_email/creditmemo/copy_method'
XML_PATH_EMAIL_COPY_TO = 'sales_email/creditmemo/copy_to'
XML_PATH_EMAIL_ENABLED = 'sales_email/creditmemo/enabled'
XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/creditmemo/guest_template'
XML_PATH_EMAIL_IDENTITY = 'sales_email/creditmemo/identity'
XML_PATH_EMAIL_TEMPLATE = 'sales_email/creditmemo/template'
XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/creditmemo_comment/copy_method'
XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/creditmemo_comment/copy_to'
XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/creditmemo_comment/enabled'
XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/creditmemo_comment/guest_template'
XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/creditmemo_comment/identity'
XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/creditmemo_comment/template'
Variable Summary
static mixed $_states
mixed $_comments
mixed $_items
mixed $_order
Method Summary
Variables
static mixed $_states (line 51)
  • access: protected
mixed $_comments (line 55)
  • access: protected
mixed $_eventObject = 'creditmemo' (line 58)
  • access: protected

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

Redefinition of:
Mage_Core_Model_Abstract::$_eventPrefix
Prefix of model events names
mixed $_items (line 53)
  • access: protected
mixed $_order (line 54)
  • 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 410)

Retrieve Creditmemo states array

  • access: public
static array getStates ()
addComment (line 502)

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

  • access: public
Mage_Sales_Model_Order_Creditmemo addComment ( $comment, [bool $notify = false], [bool $visibleOnFront = false])
  • bool $notify
  • bool $visibleOnFront
  • $comment
addItem (line 171)
  • access: public
canCancel (line 211)

Check creditmemo cancel action availability

  • access: public
bool canCancel ()
cancel (line 309)

Cancel Creditmemo action

  • access: public
canRefund (line 195)
  • access: public
void canRefund ()
canVoid (line 221)

Check invice void action availability

  • access: public
bool canVoid ()
collectTotals (line 187)

Creditmemo totals collecting

  • access: public
getAllItems (line 150)
  • access: public
void getAllItems ()
getBillingAddress (line 120)

Retrieve billing address

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

Retrieve Creditmemo configuration model

  • access: public
getItemById (line 161)
  • access: public
void getItemById ( $itemId)
  • $itemId
getItemsCollection (line 135)
  • access: public
void getItemsCollection ()
getOrder (line 107)

Retrieve the order the creditmemo for created for

  • access: public
getShippingAddress (line 130)

Retrieve shipping address

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

Retrieve Creditmemo state name by state identifier

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

Retrieve creditmemo store instance

  • access: public
Mage_Core_Model_Store getStore ()

Redefinition of:
Mage_Sales_Model_Abstract::getStore()
Get object store identifier
refund (line 245)
  • access: public
void refund ()
register (line 354)

Register creditmemo

Apply to order, order items etc.

  • access: public
sendEmail (line 547)

Send email with creditmemo data

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

Send email with creditmemo update information

  • access: public
Mage_Sales_Model_Order_Creditmemo sendUpdateEmail ([boolean $notifyCustomer = true], [string $comment = ''])
  • boolean $notifyCustomer
  • string $comment
setAdjustmentNegative (line 475)
  • access: public
void setAdjustmentNegative ( $amount)
  • $amount
setAdjustmentPositive (line 457)
  • access: public
void setAdjustmentPositive ( $amount)
  • $amount
setOrder (line 94)

Declare order for creditmemo

  • access: public
setShippingAmount (line 443)
  • access: public
void setShippingAmount ( $amount)
  • $amount
_afterSave (line 720)

After save object manipulations

  • access: protected

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

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

Before object save manipulations

  • access: protected

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

Initialize creditmemo resource model

  • access: protected
void _construct ()
_getEmails (line 700)
  • 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
REPORT_DATE_TYPE_ORDER_CREATED = 'order_created' (line 48)
REPORT_DATE_TYPE_REFUND_CREATED = 'refund_created' (line 49)
STATE_CANCELED = 3 (line 32)
STATE_OPEN = 1 (line 30)
STATE_REFUNDED = 2 (line 31)
XML_PATH_EMAIL_COPY_METHOD = 'sales_email/creditmemo/copy_method' (line 38)
XML_PATH_EMAIL_COPY_TO = 'sales_email/creditmemo/copy_to' (line 37)
XML_PATH_EMAIL_ENABLED = 'sales_email/creditmemo/enabled' (line 39)
XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/creditmemo/guest_template' (line 35)
XML_PATH_EMAIL_IDENTITY = 'sales_email/creditmemo/identity' (line 36)
XML_PATH_EMAIL_TEMPLATE = 'sales_email/creditmemo/template' (line 34)
XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/creditmemo_comment/copy_method' (line 45)
XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/creditmemo_comment/copy_to' (line 44)
XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/creditmemo_comment/enabled' (line 46)
XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/creditmemo_comment/guest_template' (line 42)
XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/creditmemo_comment/identity' (line 43)
XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/creditmemo_comment/template' (line 41)

Documentation generated on Fri, 11 Feb 2011 16:59:58 +0200 by phpDocumentor 1.4.3