VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rixters on March 18, 2013, 12:08:59 PM

Title: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 18, 2013, 12:08:59 PM
I installed version VM 2.0.20b. Now I have a problem with the PDF invoices. Only the vendor address and Legal information footer is printed in the PDF. The order information is disappeared. The e-mail invoice is correctly sent.

How can I fix this problem?

Thanks and any advice is appreciated.



[attachment cleanup by admin]
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: reinhold on March 18, 2013, 18:39:58 PM
That looks like a typical case where the HTML of the invoice contents is not entirely correct. In particular, it looks as if the shipment name did not return HTML that the TCPDF library could process. This is typically the case when a closing tag is missing or so.

Which shipping method is affected?

Can you check in the confirmation mail how the HTML of the order information section looks?
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 18, 2013, 19:20:12 PM
Hi Reinhold,

Thanks for the reply. The HTML invoice looks okay. I added one as attachment.

I us your extension to direct the shipment like this:

Name=NL < 0,4 KG small; Weight<=0.4; shipping=3
Name=NL < 2 KG medium; Weight<=2; shipping=10
Name=NL < 31,5 KG; Weight<=31.5; MinLength+(2*MinWidth)+(2*MaxHeight)<=300; shipping=16.5
Name=NL < 63,0 KG; Weight<=63; (2*MinLength)+(2*MinWidth)+(2*MaxHeight)<=600; shipping=33
Name=NL < 94,5 KG; Weight<=94.5; (3*MinLength)+(2*MinWidth)+(2*MaxHeight)<=900; shipping=49
Name=NL < 126,0 KG; Weight<=126; (4*MinLength)+(2*MinWidth)+(2*MaxHeight)<=1200; shipping=66
Name=NL < 157,5 KG; Weight<=157.5; (5*MinLength)+(2*MinWidth)+(2*MaxHeight)<=1500; shipping=82

[attachment cleanup by admin]
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 18, 2013, 19:33:46 PM
I added the html invoice..

Hope you have a solution...

[attachment cleanup by admin]
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: reinhold on March 18, 2013, 20:10:27 PM
Quote from: Rixters on March 18, 2013, 19:20:12 PM
I us your extension to direct the shipment like this:

Name=NL < 0,4 KG small; Weight<=0.4; shipping=3
Name=NL < 2 KG medium; Weight<=2; shipping=10

Ah, this is the "problem". The < in the name is taken verbatim  into the invoice and then to the TCPDF library. The browser will understand it is not meant as a HTML tag, but TCPDF is confused. That's a bug in my plugin... (lots of flexibility also brings lots of chance to mess up...)

For now, you can simply use names without < and > and & as a workaround.

Reinhold
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: reinhold on March 19, 2013, 00:23:53 AM
The latest plugin version 2.1.2 available on my homepage now fixed that bug (all <, > and & in the method name are escaped by the correct HTML entity before displaying, so tcpdf will now also work correctly).

http://www.open-tools.net/virtuemart-2-extensions/vm2-shipping-by-rules-plugin.html
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 19, 2013, 10:19:37 AM
Hi Reinhold,

Thanks for the great support! I'll download the version and do some testing!

Regards!

Rick
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 19, 2013, 10:43:07 AM
Hi Reinhold,

I installed the new version of the 2.1.2 plugin. I now receive an error in the cart:

        Info: Unrecognised mathop in calculation rule found, seems you created this rule with plugin not longer accesible (deactivated, uninstalled?)
        Info: Unrecognised mathop in calculation rule found, seems you created this rule with plugin not longer accesible (deactivated, uninstalled?)

Hope you have a fix.

Thanks!


[attachment cleanup by admin]
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 19, 2013, 10:48:39 AM
Forgot to mention I changed the rules a little bit...

[attachment cleanup by admin]
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 19, 2013, 11:40:11 AM
Did some further testing and the error message occurs when I choose a Tax rule to show the tax in the cart. In my example it's called BTW.
When I disable this rule again the error disappears.

Regards!
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Milbo on March 20, 2013, 00:43:16 AM
Quote from: reinhold on March 18, 2013, 20:10:27 PM
Ah, this is the "problem". The < in the name is taken verbatim  into the invoice and then to the TCPDF library. The browser will understand it is not meant as a HTML tag, but TCPDF is confused. That's a bug in my plugin... (lots of flexibility also brings lots of chance to mess up...)
hehe this sounds so familiar.
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: reinhold on March 20, 2013, 01:33:31 AM
Quote from: Rixters on March 19, 2013, 10:43:07 AM
I installed the new version of the 2.1.2 plugin. I now receive an error in the cart:

        Info: Unrecognised mathop in calculation rule found, seems you created this rule with plugin not longer accesible (deactivated, uninstalled?)
        Info: Unrecognised mathop in calculation rule found, seems you created this rule with plugin not longer accesible (deactivated, uninstalled?)

Hope you have a fix.

As you found out yourself, it is somehow caused by the tax rule. Other seem to have a similar problem:

   http://forum.virtuemart.net/index.php?topic=113052.msg382344#msg382344

I have no idea how it happened and what exactly causes it, but my first attempt would be to open the tax rule, check all its settings (is the correct operation selected?) and SAVE the tax rule again. That way, the tax rule should only use supported math operators.
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Rixters on March 20, 2013, 08:51:39 AM
I changed the tax rule from "tax per product" to "Vat tax per product" and everything seems to be working. No errors anymore... Don't know the difference  between the two...  ::) Does ik make a difference?

Thanks.




Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: Milbo on March 20, 2013, 10:14:38 AM
The VatTax is recalculated by the final amount. The normal tax is meant for taxes done in kg, meters, liter and so on. The Vattax can change due a coupon or discount.
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: lipes on April 08, 2013, 20:39:25 PM
What is the  difference  between "tax per product" to "Vat tax per product" ?
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: pixelatumente on April 28, 2013, 23:57:12 PM
I have the same problem. The products items don't appear in pdf invoice. The print invoice is correct. VM2 2.0.18
Title: Re: PDF invoice body text disapeared VM 2.0.20b
Post by: billco on February 20, 2014, 12:47:53 PM
Going back to the original topic, my PDF invoices were missing all the content after "Payment Method" (i.e. the majority of the invoice was blank).

When I switched OFF Payment Logo in Payment Method configuration, the invoice converted to PDF correctly.