Home Forums Support Getting Just Numbers out of invoice variables?

This topic contains 10 replies, has 3 voices, and was last updated by  Hillel Coren 2 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #16856

    MaxMaddox
    Participant

    Hello there, I’m hoping there is something I can do with code so I can just get the number out of a variable.
    Example like this:
    $amount = $175.00
    But I’m hoping to get just the “175” number instead, deleting the “$” and “.00” so I can add the number after a URL link.

    Thanks!

    #16860

    Hillel Coren
    Keymaster

    Sorry, I don’t understand…

    #19544

    Eddy
    Participant

    @maxmaddox Did you found the right variable?

    @hillel Coren:
    What we are looking for is a different variable that only outputs the amount number WITHOUT Currency Symbol.

    it needed to generate a link such as:
    at the moment using $amount it generates:
    http://pay.me/accountname?amount=$100 (Where $100 is printed by variable $amount)

    But we need:
    http://pay.me/accountname?amount=100,00 (Where 100 is printed by a variable without a Currency symbol)

    So I think the question might be how is $amount build
    (Exmp. $invoicetotal+$currency, where we need the used name for $invoicetotal)

    #19545

    Eddy
    Participant

    What we are looking for is a different variable that only outputs the amount number WITHOUT Currency Symbol.

    it needed to generate a link such as:
    at the moment using $amount it generates:
    http://pay.me/accountname?amount=$100 (Where $100 is printed by variable $amount)

    But we need:
    http://pay.me/accountname?amount=100,00 (Where 100 is printed by a variable without a Currency symbol)

    So I think the question might be how is $amount build
    (Exmp. $invoicetotal+$currency, where we need the used name for $invoicetotal)

    #19546

    Hillel Coren
    Keymaster

    Try $invoice.balanceAmount

    #19549

    Eddy
    Participant

    This variable $invoice.balanceAmount:
    Outputs : http://pay.me/accountname?amount=0001.balanceAmount (0001 is the invoice number)

    Had an idea so i changed the variable to $balanceAmount
    Result : http://pay.me/accountname?amount=$100,00Amount

    The currency sign comes back again, is there a list of ALL variables somewhere?
    I downloaded the selfhosting package but it are to much files to go thru.
    If I see the list I might find the correct variable I need.

    #19551

    Hillel Coren
    Keymaster
    #19552

    Eddy
    Participant

    @Hilel Coren Thanks for your quick responses, appreciated!

    The Variable is not listen under the Help option, it needs to be somewhere where the system decides
    what currency to use BEFORE making it a variable, I am not (yet) using different currencies,
    but I read that it is possible to make different templates with different currencies,
    so somewhere there is a variable with only the amount/balance before the currency is attached to it.

    I basically only wanted to ad it to the email template, never thought to put it in the PDF (good idea),
    I’ll check the link and see if it makes any sense to me….

    Thanks for the help until now..

    #19554

    Hillel Coren
    Keymaster

    This issue seems similar:

    EPC-QR-Code

    #19556

    Eddy
    Participant

    Yes it seems it is almost the same, working with just the amount, but somehow it is not working for me,
    The variable doesn’t show me an amount but an invoice number, this is in the email template editor.

    I went to a custom invoice and try to paste it in different locations and it din’t out put anything,
    for now I ended up to just make the invoice in word and send the link by whatsapp.

    Or might something wrong with my install something corrupt?

    #19557

    Hillel Coren
    Keymaster

    Sorry, the variable I suggested would only work in the PDF not in email templates.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Posted in: