Jump to content

Amount Paid too much in payment confirmation email


LukeDouglas

Recommended Posts

I posted a payment of $30 on a $90 invoice:

01/13/2016 11:32 Mail In Payment Ck #3371 $30.00 USD

 

The invoice on the WHMCS shows the correct information:

Client Name CLIENT NAME (View Invoices)

Invoice Date 12/03/2015

Due Date 12/13/2015

Total Due $90.00 USD

Balance $60.00 USD

 

 

However, the email shows the full amount has been paid:

This is a payment receipt for Invoice 203140 sent on 12/03/2015

 

Due Date: 12/13/2015

Amount Paid: $90.00 USD

 

You may review your invoice history at any time by logging in to your client area.

 

I have a similar issue with credits being applied.

 

Credit was applied towards an invoice:

12/17/2015 Credit Applied - $30.00 USD

 

Invoice reflects correct balance:

Client Name CLIENT NAME (View Invoices)

Invoice Date 10/22/2015

Due Date 11/01/2015

Total Due $30.00 USD

Balance $0.00 USD

 

Paid

12/17/2015 02:10

Payment Method: Fully Paid by Credit

 

Invoice shows nothing was paid:

This is a payment receipt for Invoice 203050 sent on 10/22/2015

 

Due Date: 11/01/2015

Amount Paid: $0.00 USD

 

You may review your invoice history at any time by logging in to your client area.

 

So how do I get the payment confirmation email to reflect what was actually done?

Link to comment
Share on other sites

Staff,

 

Added the variable to the template (created $75 credit):

 

Payment of $150 to a $75 invoice:

Due Date: 12/01/2015

Invoice Total: $75.00 USD

Amount Paid: $invoice_last_payment_amount

 

Applied $75 credit to next invoice:

 

Due Date: 01/01/2016

Invoice Total: $0.00 USD

Amount Paid: $invoice_last_payment_amount

 

I would like to display the credit balance when one is created as well as show 'Credit Applied' instead of 'Amount Paid'.

 

Now why didn't the variable '$invoice_last_payment_amount' show $150 on the first one and $75 on the 2nd one?

 

I could not find a single page in your documentation that defines this particular variable. To be honest, whoever did the documentation on template syntax has no clue how to create an orderly way of displaying values. I looked at the http://docs.whmcs.com/Hooks:Invoicing page and could only find these links concerning payments. InvoicePaid, InvoicePaidPreEmail, InvoiceUnpaid, AddInvoicePayment and InvoicePaymentReminder. The only variables listed for all of them is 'invoiceid'. I would have expected a list of all of the available variables. This is an area of your documentation that needs some work.

 

Can you give me a link to 'any' page that has a list of 'all' variables that can be used in email templates?

 

Thanks.

 

Luke

Edited by LukeDouglas
Link to comment
Share on other sites

Luke,

 

Can you give me a link to 'any' page that has a list of 'all' variables that can be used in email templates?

i'll answer that - though i'm not on the staff! :lol:

 

as far as i'm aware, I don't think there is a comprehensive list of mergefields... also, remember that some mergefields are only available to certain email template types, e.g, products, invoices etc - and while you can use one in one template type, it doesn't necessarily mean that you can use it in another type.

 

however, in general, the mergefields available to an email template are shown in the box at the bottom of the page when you edit it - so in your Invoice Paymetn Confirmation template, you should have access to the mergefields below.

 

cbLaESx.png

whether there is an issue with the mergefields you're using in your template (perhaps using the wrong ones), or if they're giving incorrect results caused by a bug, I don't know.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

To view all available template variables you will just need to enter {debug} into any email template (Setup > Email Templates > Edit), send the message to a client and then load it in your browser via the client's Email tab. Once loaded you will get a popup showing what template variables are available on that particular page.

 

Not all variables are available on every page, and if the variable you wish to use isn't there, then you would need to obtain this yourself.

http://docs.whmcs.com/Hooks:EmailPreSend can be used to create your own smarty variables to use on email templates.

Link to comment
Share on other sites

To view all available template variables you will just need to enter {debug} into any email template (Setup > Email Templates > Edit), send the message to a client and then load it in your browser via the client's Email tab. Once loaded you will get a popup showing what template variables are available on that particular page.

very interesting - I didn't know that you could do that.. it works too! :idea:

Link to comment
Share on other sites

Didn't work for me.

 

Dear {$client_name},

This is a payment receipt for Invoice {$invoice_num} sent on {$invoice_date_paid}

Date created: {$invoice_date_created}
Due Date: {$invoice_date_due}
Invoice Total: {$invoice_total}
Amount Paid: {$invoice_last_payment_amount}
Invoice Credit, if any: {$invoice_credit}

You may review your invoice history at any time by logging in to your client area.

Note: This email will serve as an official receipt for this payment.

{$signature}

{debug}

 

Here is the email copy I received:

 

Dear CLIENTS NAME (Website name),

This is a payment receipt for Invoice 203066 sent on 10/28/2015 12:17

Date created: 10/23/2015
Due Date: 10/23/2015
Invoice Total: $90.00 USD
Amount Paid: $60.00 USD
Invoice Credit, if any: $0.00 USD

You may review your invoice history at any time by logging in to your client area.

Note: This email will serve as an official receipt for this payment.

 

No codes were listed in the email as view in my Firefox browser.

 

Just for commentary but I find it incredulous that variable documentation is not supplied in your email template documentation. I know the old saying that 'developers are awful at manuals' but I've developed applications as well as written manuals. It can be done. Your online documentation for email templates should have a section dealing with 'all' variables available for use and which ones are restricted to certain templates. Just my two cents.

 

Luke

Link to comment
Share on other sites

Didn't work for me.

No codes were listed in the email as view in my Firefox browser.

do you have a pop-up blocker ?

 

if you go to the client's email tab in the admin area and view the email, then you should get a pop-up with a list of variables (mergefields) and their values.

 

Just for commentary but I find it incredulous that variable documentation is not supplied in your email template documentation. I know the old saying that 'developers are awful at manuals' but I've developed applications as well as written manuals. It can be done. Your online documentation for email templates should have a section dealing with 'all' variables available for use and which ones are restricted to certain templates. Just my two cents.

I would guess their reply would be that a list of available mergefields is shown in each template, but the point you make about the documentation in general is valid.

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