Author Topic: Invoice numbers only in orders with status "Completed" or "Sent"  (Read 524 times)

jlabuelo_sm

  • Beginner
  • *
  • Posts: 17
  • A beginner
Invoice numbers only in orders with status "Completed" or "Sent"
« on: December 04, 2016, 21:17:25 pm »
Good afternoon all

I have a question here regarding the generation of invoice numbers. I have configured Virtuemart 3.0.18 over Joomla 3.5 so that only Invoice PDF documents are created when the order is moved to status "Sent" or "Completed".

With this configuration I can see that it works fine, and only Invoice PDF documents are created for orders with this state, however the issue here is that reviewing the invoice table "virtuemart_invoices", I can see that Virtuemart is creating Invoice Numbers for orders that are "Pending" for example, when the PDF Invoice document is not created.

The problem for us is that in Spain, the invoice numbers must be consecutive, so I need to stop virtuemart to give invoice numbers to orders that have not status = 'Completed' or 'Sent'.

For example, I have a customer A, that makes an order and pays for it. Then we send him the product and order moves to status "Completed". Virtuemart Creates a PDF Invoice document, and assigns also an Invoice Number. Just as we need it

If a customer B, makes an order, but somehow they call us to cancell it, this order never gets to status "Completed" so no PDF Invoice document is generated, but in the virtuemart_invoices table a new entry is created, and an invoice number has been assigned to it.

At the end of the month when we make a summary of our invoice documents we can find this secuence of invoice numbers: 1,2,4,6,8,9.......... and this is not legal for our tax  national system.

Is there any way to prevent  virtuemart to assign an invoice number, if the invoice PDF document has not been created??

Thanks a lot in advance!!

jlabuelo_sm

  • Beginner
  • *
  • Posts: 17
  • A beginner
Re: Invoice numbers only in orders with status "Completed" or "Sent"
« Reply #1 on: December 21, 2016, 13:03:22 pm »
Sorry to ask again.. but is there any way to avoid virtuemart to produce invoice numbers when no invoice document is produced??

Thanks a lot!!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7485
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Invoice numbers only in orders with status "Completed" or "Sent"
« Reply #2 on: December 21, 2016, 13:07:51 pm »
Have you tried one of the order/invoice numbering plugins -- there are 2 I think

I don't know but maybe you can consecutively number just the invoices themselves

VM will always create an order in sequence when the cart confirm is clicked
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jabba

  • Beginner
  • *
  • Posts: 14
    • Pixed - Web Store Assistance
Re: Invoice numbers only in orders with status "Completed" or "Sent"
« Reply #3 on: July 17, 2017, 15:52:17 pm »
Hello jlabuelo_sm, have you find an answer to your question? I have the same problem.. i need the invoice to be generated only with completed orders. I also need the invoices to be sequentials number (i use Advanced Ordernumbers for VirtueMart) but the system keeps creating them also when it should not.
Thank you!
Gianluca
Gianluca Gabella - CEO & Web Developer @ Pixed s.n.c.b - www.pixed.it

Jose M.

  • Beginner
  • *
  • Posts: 41
Re: Invoice numbers only in orders with status "Completed" or "Sent"
« Reply #4 on: July 18, 2017, 19:17:13 pm »
Hello,
In the documentation of this plugin it seems that you can have a different invoice counter for each country:

http://open-tools.net/documentation/ordernumber-plugin-for-virtuemart.html

Greetings!
Jose