VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: MyDesigner on August 27, 2023, 12:20:43 PM

Title: Error Invoice PDF.
Post by: MyDesigner on August 27, 2023, 12:20:43 PM
Hi, I have Joomla 3 and I have upgraded Virtuemart to 4.2.0 10905 version.
I have an error when create a invoice in the order, error is vmError: getInvoicePDF Cant create pdf, no entry .
How resolve this problem?
Thanks for your help.
Title: Re: Error Invoice PDF.
Post by: GJC Web Design on August 27, 2023, 12:39:07 PM
Have u removed/ have no - over-rides to test?
Title: Re: Error Invoice PDF.
Post by: MyDesigner on August 28, 2023, 17:29:09 PM
I don't have overrides. Anyone that know another solution? Thanks.
Title: Re: Error Invoice PDF.
Post by: MyDesigner on September 02, 2023, 16:56:25 PM
No reply...  :(
Title: Re: Error Invoice PDF.
Post by: jenkinhill on September 02, 2023, 17:34:21 PM
I have VM4.2.2 (available in membership downloads) and have no issues creating invoices.
Title: Re: Error Invoice PDF.
Post by: StefanSTS on September 04, 2023, 10:23:16 AM
Does your system generate invoice numbers for orders after they get confirmed?
Title: Re: Error Invoice PDF.
Post by: MyDesigner on September 04, 2023, 10:49:55 AM
Quote from: StefanSTS on September 04, 2023, 10:23:16 AM
Does your system generate invoice numbers for orders after they get confirmed?

No... only if I clic button on order.
Title: Re: Error Invoice PDF.
Post by: MyDesigner on September 04, 2023, 15:18:31 PM
Quote from: jenkinhill on September 02, 2023, 17:34:21 PM
I have VM4.2.2 (available in membership downloads) and have no issues creating invoices.

I buy a membership and upgrade Virtuemart but problem not solved.
Title: Re: Error Invoice PDF.
Post by: rednaxela on September 04, 2023, 16:26:31 PM
I have the same issue. The invoice number is not generated, and therefore invoice generation fails. I removed all plugins, themes, and overrides but no luck.
Title: Re: Error Invoice PDF.
Post by: rednaxela on September 06, 2023, 20:18:50 PM
From Max Milbers via support ticket.

I think I found the problem. A fast solution, open the invoice model at /administrator/components/com_virtuemart/models/inovice.php around line 162, search for

function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = 0){

and just change the last 0 to null
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = null){