Question

Let's say we have invoice number #1 then invoice #2 but then I need to have a credit memo with number #3. After that of course I will need an invoice with number #4.

Is this possible?

Was it helpful?

Solution

No is the simple answer. Invoices, Credit Notes, Orders, & Customer Increment ID's have their own numbering system. The last increment ID for each object type is stored in the table eav_entity_store (take a look). You could override the class Mage_Eav_Model_Entity_Type and function fetchNewIncrementId() to possibly achieve what you are trying to do, but generally it's good practice to have sequential numbers for each object type and not share the numbering system between different objects. Auditors for example will want to see sequential order numbers and sequential invoice numbers otherwise it's easy to fiddle the books as it's difficult to work out if an invoice was deleted etc. I would check with accounts and auditors first to see if your allowed to do what you want too first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top