Hi guys,
please give me information how to get right currencie cource from db?
here is new template additional working code (brutal form + javascript
calculation - without formatting):
<!-- ********** EUR ************** -->
<form name="eu">
<b>Total EUR</b><br>
<input type="text" name="goggu" value=<%total%>>
<b> : </b>
<input type="text" name="gurss" value="15.6466">
</form>
<script type="text/javascript">
var yks=eu.goggu.value
var yks=yks.replace(",",".")
var kaks=eval(eu.gurss.value)
document.write( roundNumber(yks/kaks,2).replace(",",".") + " EUR");
function roundNumber(num, dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}
</script>
<!-- ****** END EUR ************** -->
regards, Janno
Armaghan Saqib wrote:
On Wed, Jun 30, 2010 at 1:32 AM, Janno Lamus <[email protected]> wrote:
but gentelmans (and ladyes), we already have different currencies on SL, we
just need put more than 1 currencies to the invoice.
Like this:
Total EEK 1000.-
and
Total EUR 64.-
I think there are some calculations with ratings in template?
Hi Janno,
If I understand correctly, you need to put this information on
html/latex templates used to print invoices etc.
You need to add new template variables. Template variables are just
elements in $form hash which gets populated in 'invoice_detail'
procedure of SL/IS.pm
So let us say you want a new variable 'my_currency', you put something like:
$form->{my_currency} = 'USD'; # in SL/IS.pm 'sub invoice_detail'
Now use this variable anywhere in your html/latex template with
something like this:
<%my_currency%>
Hope this helps. Let me know if I am not getting what you want.
Regards
Armaghan
--
http://www.ledger123.com/
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger