VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: daneshpayeh on October 10, 2015, 06:58:19 AM

Title: Invoice PDF not updated
Post by: daneshpayeh on October 10, 2015, 06:58:19 AM
Hi everyone,

I use Jommla 3.4.4.  and VirtueMart 3.0.9.
When I try to update the status of an order (like changing from confirmed to shipped), customer receive an email with correct subject and information in the email. but, it doesn't update the previously generated pdf invoice. when I delete the previous pf file from safe path, then it works correct. I dont know the problem, maybe Virtuemart doesn't have permission to delete or rename the old pdf file and replace it by new one.
anyone know how to solve this problem?
thanks,

Mahdi
Title: Re: Invoice PDF not updated
Post by: GJC Web Design on October 10, 2015, 10:17:58 AM
IMHO this is by design -- the pdf is only recreated if the orig. is deleted...

why do u generate an invoice before the sales process is complete?
Title: Re: Invoice PDF not updated
Post by: daneshpayeh on October 10, 2015, 11:24:06 AM
thank you,
I don't make pdf files. when a customer makes payment system makes a invoice pdf file with confirmed status and send it to user. Then when I change status to shipped system sends another email to customer but, attaches same previous pdf file. If I delete the pdf invoice first then change the status to shipped, system makes a new different pdf invoice with shipping information in it. So, it seams that it is designed to make different invoice file depend the status condition of order.
Title: Re: Invoice PDF not updated
Post by: GJC Web Design on October 10, 2015, 23:17:24 PM
well thats what I said.. it only creates a "new" one if there isn't an existing one...   

I guess ideally it needs some code to delete the current one if it exists every time you click the create...
Title: Re: Invoice PDF not updated
Post by: jenkinhill on October 10, 2015, 23:34:02 PM
But do you really need to send out an invoice once an item is shipped, because IMHO an invoice should only be required immediately after payment is made. You can configure "Default Order Status to create an invoice" in the VM BE. When a physical product item is shipped you can print a delivery note through the BE to saend with that product.
Title: Re: Invoice PDF not updated
Post by: daneshpayeh on October 11, 2015, 04:26:18 AM
thank you jenkinhill and GJC,

To be honest, you right and there is no need to make new invoice file. But when system makes new invoice after changing status to shipped, adds a list of new status changes at the end of the invoice including shipment status and shipping comments. it also is a little bit descriptive for costumer, however as you said it is not necessary.
I was wondered maybe something is wrong with my system and it is not able to update the pdf file. I don't have any problem if this is by design.

thanks
Title: Re: Invoice PDF not updated
Post by: GJC Web Design on October 11, 2015, 16:38:52 PM
Perhaps the "design" could be better but i suspect it is for legal concerns in various countries

an invoice is a legal document and shouldn't be altered once issued...

the solution is to just issue the invoice when the transaction is fully complete...