VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: Same counter for invoices / credit notes

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

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
The administrator has disabled public write access.

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

Any news on that? Thank you.
The administrator has disabled public write access.

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...
The administrator has disabled public write access.

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

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. :(
The administrator has disabled public write access.

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

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/)
The administrator has disabled public write access.

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
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular