News:

Looking for documentation? Take a look on our wiki

Main Menu

PDF invoice body text disapeared VM 2.0.20b

Started by Rixters, March 18, 2013, 12:08:59 PM

Previous topic - Next topic

Rixters

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]

reinhold

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?

Rixters

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]

Rixters

I added the html invoice..

Hope you have a solution...

[attachment cleanup by admin]

reinhold

#4
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

reinhold

#5
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

Rixters

Hi Reinhold,

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

Regards!

Rick

Rixters

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]

Rixters

Forgot to mention I changed the rules a little bit...

[attachment cleanup by admin]

Rixters

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!

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

reinhold

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.

Rixters

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.





Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

What is the  difference  between "tax per product" to "Vat tax per product" ?
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25