VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: lindapowers on January 19, 2014, 10:06:10 AM

Title: Payment description Breaks Invoice showing no values
Post by: lindapowers on January 19, 2014, 10:06:10 AM
Hello

All our invoices work fine except the ones with "standard payment" Bank Transfer.

The difference between this payment method and the other 3 in our shop is that is the only one that contains payment description to show the bank account info

Written like this:

Titular / Account holder:<p/>
<b>Simpatía Agraria, S.L.</b><br/>
Nº cuenta / Account number:<p/>
<b> IBAN: ES0XXXXXXXXXXXXXXXX </b><br/>
<b>BIC: BSAB ESBB<b>
Banco/Bank: <b>Banco SabadellCAM</b><p/>


Seems the Invoice PDF doesnt like this code, this appears correctly at website and order emails, also in backend orders too but not at the invoice as you can see in the following image:

(http://s16.postimg.org/k90cho5ad/VMInvoice.jpg)

VM 2.026D and Joomla 2.516

Title: Re: Payment description Breaks Invoice showing no values
Post by: reinhold on January 19, 2014, 14:31:31 PM
The TCPDF library, which creates the PDF files from the HTML, is very picky about correct HTML. Browsers, on the other hand, accept lots of broken HTML and still display it well.
Your HTML code is broken:
-) the BIC's closing </b> is written as another opening <b>
-) <p/> does NOT exist in HTML. Rather, the whole paragraph needs to be wrapped in <p>.....</p>.

Also, VirtueMart's (or Joomla's?) input validator seems to remove <br/> from the input in the payment method description, unless there is a space before the slash, i.e. <br />

If one fixes all those issues in the HTML description, the invoice is correctly created:

<p><br />Titular / Account holder:<br />
<b>Simpatía Agraria, S.L.</b></p>
<p>Nº cuenta / Account number:<br />
<b>IBAN: ES0XXXXXXXXXXXXXXXX </b><br />
<b>BIC: BSAB ESBB</b><br />
Banco/Bank: <b>Banco SabadellCAM</b></p>
Title: Re: Payment description Breaks Invoice showing no values
Post by: lindapowers on January 19, 2014, 19:47:37 PM
Thanks a lot Reinhold, I have applied your changes already.

Yeah that shows my lack of skills, it appeared correctly in browsers backend and emails so I assumed it was correct, thanks for the explanation, I'm sure it will help other noobies like me.

Regards
Title: Re: Payment description Breaks Invoice showing no values
Post by: lindapowers on February 11, 2014, 19:35:34 PM
BTW Reinhold why is delivery date appearing in the invoice? +there is no translation key for it.

Also the payment description appears both at the top in "payment method" and below with the quantities, not an e-drama but maybe not needed twice.

Regards