Author Topic: PDF invoice body text disapeared VM 2.0.20b  (Read 3519 times)

Rixters

  • Beginner
  • *
  • Posts: 31
PDF invoice body text disapeared VM 2.0.20b
« 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]

reinhold

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 204
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #1 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?

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #2 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]

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #3 on: March 18, 2013, 19:33:46 pm »
I added the html invoice..

Hope you have a solution...

[attachment cleanup by admin]

reinhold

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 204
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #4 on: March 18, 2013, 20:10:27 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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 204
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #5 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

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #6 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

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #7 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]

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #8 on: March 19, 2013, 10:48:39 am »
Forgot to mention I changed the rules a little bit...

[attachment cleanup by admin]

Rixters

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #9 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!

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #10 on: March 20, 2013, 00:43:16 am »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

reinhold

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 204
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #11 on: March 20, 2013, 01:33:31 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

  • Beginner
  • *
  • Posts: 31
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #12 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.





Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #13 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

  • Full Member
  • ***
  • Posts: 720
Re: PDF invoice body text disapeared VM 2.0.20b
« Reply #14 on: April 08, 2013, 20:39:25 pm »
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