Jump to content

Invoice Template


clever-host

Recommended Posts

48 minutes ago, Kian said:

The real issue is that you must:

  • Keep track of historical currency exchange rates
  • Include the currency rate in use at the time the invoice was issued

If you don't do that amounts on invoice fluctuate. Moreover your accountant needs to manually retreive the currency rate from invoice date or transaction date. It takes time. IMO you should look for something like follows (top-right corner).

whmcs-billing-extension-historic-currency-exchange-rate.png.488fd6ab51bd421b6f8b923625bb63d1.png

Once you have currency rates, you can display all currencies you want safe from fluctuating exchange rates.

whmcs-show-multiple-currencies-on-invoice.png.fdd01dfddb49cdb06c1aef3326d618ab.png

 

 

This is a good idea. I am now .. partially solved my issue alone. 

What I did was to leave just 1 Default currency - Eur and I applyed on invoices tpl a simple formula : 

<td class="total-row text-center">{($total|replace:'€':''|replace:'EUR':'' * 4.9)|string_format:"%.2f"} RON</td>

 

The best solution as u say, would be the use the national bank rate: 

https://www.bnr.ro/nbrfxrates.xml 

Not sure if there would be any solution, like to grab this line or data "<Rate currency="EUR">4.9257</Rate>"  and have this as refference / history . I am not a programmer to do this

Link to comment
Share on other sites

I have found a way it seems to basicly grab daily rate from our National Bank and solve the history of currency, this is a small php script that does this: https://www.curs-valutar-bnr.ro/preluare-curs-valutar-bnr-script-php

My question is how would I call this rate into my formula: 

<td class="total-row text-center">{($total|replace:'€':''|replace:'EUR':'' * 4.9)|string_format:"%.2f"} RON</td> 

Link to comment
Share on other sites

I have found this script : http://www.heliosdesign.ro/resurse/php/preluare-curs-valutar.htm 

It seems it creating 2 tables in mysql - Curs ( rate ) & Valuta ( currency ) 

His sourse it seems not functional:  https://www.bnr.ro/ro/info/curs_ext.asp i will try : https://www.bnr.ro/nbrfxrates.xml  

Not sure how will call these entries in my formula but will see :)) 

Link to comment
Share on other sites

  • 6 months later...
On 26.04.2021 at 8:46, koko20212021 said:

Am găsit acest script:  http://www.heliosdesign.ro/resurse/php/preluare-curs-valutar.htm 

Se pare că creează 2 tabele în mysql - Curs (rata) și Valuta (valută) 

Sursa lui pare să nu funcționeze:   https://www.bnr.ro/ro/info/curs_ext.asp  Voi încerca :  https://www.bnr.ro/nbrfxrates.xml  

Nu sunt sigur cum voi apela aceste intrări în formula mea, dar voi vedea :)) 

hello, did you manage to implement https://www.bnr.ro/nbrfxrates.xml in the invoice? if so you can tell me that you have been torturing me for some time and when I put the script it makes my page white

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