Announcement

Collapse
No announcement yet.

How to get amount in XX.XX instead of XX.XXXXX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get amount in XX.XX instead of XX.XXXXX

    Hey guys, using embedded currency field,
    on email templates I see this: $-550.1400
    vs expected: $-550.14

    what is the best way to trim it down on email templates? Or reduce the number of zeros? I guess it depends on 'decimal' checkbox, but once record is used and created is doesn't allow to 'deselect', thanks

  • #2
    Identical topic: https://forum.espocrm.com/forum/deve...877#post101877

    When using Email PDF, in the Parent field of the created email, you must specify the correct Opportunity, from which we will take values ​​for our placeholders.

    Comment


    • #3
      so I should add,
      {{amountCurrencySymbol}}{{numberFormat amount_RAW decimals=2 decimalPoint='.' thousandsSeparator=','}}​, I will test

      Comment


      • #4
        Didn't work, victor, please advise

        This amount: CPayment.amountRefunded

        <p>We wanted to inform you that a refund has been initiated for your payment of <b>{{amountCurrencySymbol}}{{numberFormat CPayment.amountRefunded decimals=2 decimalPoint='.' thousandsSeparator=','}}</b> associated with Invoice Number: <strong>{CPayment.opportunityName}</strong>. Please note that this refund is currently being processed and may take a few business days to reflect in your account, depending on your bank's policies.</p><p><br></p><p>We appreciate your patience during this process. If you have any questions or need further assistance, please don't hesitate to reach out to us.</p>


        Instead of amount, got 0, maybe the problem is 'parent, but how would I do that here in a workflow?
        Click image for larger version

Name:	Screenshot 2024-08-21 at 11.01.44 AM.png
Views:	2180
Size:	264.0 KB
ID:	109574

        Comment


        • #5
          Russ,

          When sending the code, please use selection of its fragments so that the code does not merge with the text (screenshot 1). It's pretty hard to sort something out without highlights.

          - I created a primitive BPMn based on the Opportunity entity (screenshot 2). I used the following code in the Email Template for clarity (screenshot 3).
          HTML Code:
          {{amountCurrencySymbol}}{{numberFormat amount_RAW decimals=0 decimalPoint='.' thousandsSeparator=','}}
          
          {{amountCurrencySymbol}}{{numberFormat amount_RAW decimals=4 decimalPoint='!!!' thousandsSeparator=','}}​
          - This is what the amount field looks like in test Opportunity record (screenshot 4).
          - This is what the email that was sent from the test Opportunity record looks like (screenshot 5).
          Attached Files

          Comment


          • #6
            Actually worked, victor, ty

            Comment

            Working...
            X