News:

Looking for documentation? Take a look on our wiki

Main Menu

Q about filename creation for orders/invoices

Started by lvth, November 25, 2015, 15:29:56 PM

Previous topic - Next topic

lvth

Hi, I'm a seasoned system engineer, but really a newbie for VM. I'm working on an e-commerce site (J3.4.4 + VM3.0.10 + Open-Tools Advanced Ordernumbers for VirtueMart) and everything seems to work very well, but... I have a very specific question, which I did'nt find any topic in this forum: how or where is the filename for order or invoice pdf generated?
In my system I have a single "Global" counter, with format = "[year]-#" and counter padding = "4", so that invoice number generated today is "2015-0027" (there were 26 invoices before), but the pdf file created in the invoices folder and sent as attachment, has a file name "vminvoice_2015-0027-x.pdf" where "x" is a random number. I've searched both VM and OT Adv. Ord. for places where I would configure this, but to no avail. Is there someone able to point me in the right direction?
Thanks in advance
Luigi

AH

You should direct your question to the plugin creator  "Open-Tools Advanced Ordernumbers for VirtueMart"

As the plugin is clearly being used to override the default VM behaviour
Regards
A

Joomla 3.10.11
php 8.0

lvth

Thanks AH for your quick response, but... I'm directing this question to VM forum because, AFAIK, VM is managing the entire process, that is: after the customer confirms his order a row is inserted on some table, then Open-Tools plugin is called to manage the order/invoice number, written back on db, then VM calls the TCPDF library to produce the invoice/order, and I think that VM is handling the file name given to TCPDF to write the file into the correct folder. For this reason I think that my problem is due to some VM config. I don't understand how Open-Tools plugin can change the file name, which should be created by VM when calling TCPDF.
Cheers
Luigi

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lvth

Hi,
I followed your suggestion to ask also in Open-Tools support, and in that response they said:
"If you really want the invoice numbers to be exactly the same as the order numbers, you can achieve this by setting the invoice number format to
[ordernumber]

See als the third bullet in the "Examples" section of the documentation: open-tools.net/documentation/ordernumber...-for-virtuemart.html

[blockquote]If you want the invoice numbers to match the order numbers, you can use a format "[orderNumber]" (notice the lack of the running counter!). However, this might not fulfil the legal requirement of successive invoice numbers, as some orders might be cancelled (but still counted) before an invoice is issued![/blockquote]

In particular, European tax laws typically require invoice numbers to be concurrent numbers (without gap), while VirtueMart's order numbers do not fulfill this requirement (due to cancelled orders also being counted in the order numbers).
"
this explain how it works, and what I can do to avoid problems. I think I'll go with creating "dummy" invoices to maintain pairing between orders and invoices, the italian law admits making an invoice then "cancel" it...
Thanks a lot anyway.
Luigi