Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Ordernumbers for Magento

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Same counter for invoices / credit notes 30 Apr 2016 12:10 #1

  • peter ross
  • peter ross's Avatar Topic Author
Hello,

our accountant asked us to use the same counters for invoices and credit notes. So basically if the last invoice number was 2016-227 and we create a credit note, the credit note should have the number 2016-228. Up to now it seems that the numbers for invoices and credit notes (refunds) are separated and independant of each other. Is there a possibility to "share" a counter for invoices and credit notes that gets incremented if either an invoice or credit note gets created? Looking forward to your answer.

Kind regards
Peter Ross

Same counter for invoices / credit notes 03 May 2016 11:14 #2

  • peter ross
  • peter ross's Avatar Topic Author
Any news on that? Thank you.

Same counter for invoices / credit notes 03 May 2016 16:03 #3

Dear Peter,
Unfortunately, I don't know of any easy way to have invoice and credit note numbers share a counter without modifying the extension's code.

Best regards,
Reinhold

PS: If you want to modify the plugin code to have the two number types share a counter, I would start at app/code/community/OpenTools/Ordernumbers/Model/Ordernumber.php, functions getCounterValueIncremented and loadNumberCounter. The easiest, hackish way would be to simply do something like:
if ($nrtype=="creditmemo") $nrtype="invoice";
at the beginning of these functions. This should make all credit note numbers use the invoice counter, too. Please note that I have not tested this at all. Your PHP developer would need to make sure that this really works properly in your shop...

Same counter for invoices / credit notes 05 Jul 2016 12:48 #4

  • Sander
  • Sander's Avatar
It would have been very useful if you mentioned this on the modules page instead of 'Endless possibilities to have order/invoice numbers the way YOU like them'.. it's really surprising not more people are requesting this, because it's impossible to potentially have the exact same number for an invoice as for a credit memo. So either no one uses credit memo's or they use a prefix or something.
Anyways it would've saved me a couple of hours trying to use the same number sequence across different types. :(

Same counter for invoices / credit notes 05 Jul 2016 15:00 #5

  • Sander
  • Sander's Avatar
For anyone wondering how to get this working, I've implemented this simple solution:
stackoverflow.com/questions/7307862/how-...edit-memo-in-magento
Please backup your database before and test it thoroughly, but it seems to work fine. The internal invoice increment ID is upped when you create a credit memo.

BTW it's also worth noting on your module page that people really need to backup their database when they start testing with this module, especially when they are using the same number format as default Magento (ie: #100000123) because your module does not update the increment id's of default Magento underwater (which makes sense). But when you uninstall this module you will get SQL integrity constraint violations (duplicate entry) because the order/invoice/credit memo numbers of testing the module are then out of date with the default Magento increment IDs and you have to manually change them back. (see this page: www.warpconduit.net/2012/04/18/how-to-ch...d-prefix-in-magento/)

Same counter for invoices / credit notes 10 Jul 2016 14:28 #6

Dear Sander,
sorry that you lost so much time about this functionality. I updated the product description and added a link to this discussion, so other users won't run into these issues any more without warning.

Best regards,
Reinhold
  • Page:
  • 1