Jump to content

Dual currency on PDF invoices


dxer

Recommended Posts

Hi to all
My country is switching currency to Euro so we are obligated to have dual currency displayed on invoices until the end of year 2023.

First we need to show our local currency as default and then on 1.1.2023 we need to switch Euro to be default and local currency secondary.
I understand that WHMCS does have ability to show multicurrency but on sent invoices this is currently not possible.

I need to have dual currency there printed on PDF invoices. There is no need to have all prices in there, only TOTAL at the end must be shown additionaly in EUR.

And to repeat,  after 1.1.2023 we need to switch default currency.

Can someone please help me with this so possibly I could insert code of a sort in invoicepdf.tpl, and wherever is needed to make this happen.

Thanks in advanced !

Link to comment
Share on other sites

On 8/23/2022 at 3:16 PM, dxer said:

ncy there printed on PDF invoices. There is no need to have all prices in there, only TOTAL at the end

Mala ideja kako bi to mogao izvesti. PS nismo imali puno vremena pa smo složili na brzinu.

U invoicepdf.tpl iznad linije "# Invoice Items" oko 136 linija dodaj:

$totali = preg_replace('/[^0-9.]+/', '', $total);
$totaleu = $totali/7.53540/100;
$zaokruzi = round($totaleu, 2); 

I u tablicu u istom tom dokumentu zamjeni iza 171 linije sve pod $tblhtml .= ' s ovim što sam ti priložio.

$tblhtml .= '
    <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
        <td align="right">' . Lang::trans('invoicescredit') . '</td>
        <td align="center">' . $credit . '</td>
    </tr>
    <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
        <td align="right">Ukupno (HRK)</td>
        <td align="center">' . $total . '</td>
    </tr>
	<tr height="30" bgcolor="#efefef" style="font-weight:bold;">
        <td align="right">Ukupno (€)</td>
        <td align="center">' . $zaokruzi . ' €</td>
    </tr>
</table>';

Nadam se da će ti pomoći

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated