News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Payment description Breaks Invoice showing no values

Started by lindapowers, January 19, 2014, 10:06:10 AM

Previous topic - Next topic

lindapowers

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:



VM 2.026D and Joomla 2.516


reinhold

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>

lindapowers

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

lindapowers

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