The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
Even invoice amount
  • varkstadvarkstad January 2009

    How do I get at row where I can correct the invoice amount so it will be even Swedish crowns, and no "

  • justinjustin January 2009

    Hey Gunilla

    i assume you want to edit the invoice layout to removal decimal places on certain money fields

    open ./templates/invoices/default/template.tpl

    find the field in questions and change the number_format:2 section to number_format:0

    let us know how you go

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • nillanilla January 2009

    Hi Justin,

    Thank you, it works - but not as I want it to work.

    If the total sum is for example 45.30 I want it to be 45.00 and
    if the total sum is 45.70 I want it to be 46.00

    I thus want an equalization row in these cases of -0.30 or +0.30

    I hope you understand what I mean.

    Gunilla

  • justinjustin January 2009

    hey gnuilla

    you can uses php's round in smarty todo this

    {$invoice.total|round:0} and it should round it up or down with no decimal places

    let us know how you go

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • nillanilla January 2009

    Hey Justin,

    Thank you, it works fine!

    Gunilla

  • justinjustin January 2009

    great to hear it worked!

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • nillanilla March 2012

    I asked three years ago, but now I have I new installation and I don´t remember where I can round the total sum and take the decimals away. I can´t see that this is something I can do in Preferences in this new version of Simple Invoice.

    Can someone help me to figure out how to solve this issue?

    /Gunilla

  • nillanilla January 2013

    How can I change this row (410) in template.tpl

    {$preference.pref_currency_sign|htmlsafe}{$invoice.total|siLocal_number}

    to get the total sum without decimals?

Categories