How to Add "Credit Amount" on individual invoice

1
I'm trying to create a Credit Amount at the bottom of each invoice in cases where the amount paid was more then the invoice.

I'm using the default.php file under componments/views/invoices/tmpl/ file to make changes.

I have this formula: $amount_credit = $total_payments - $total;

I have his entered in the $search: "{amount_credit}"

I have this entered in the replace: $amount_credit->amount_credit

Any help is much appreciated. Thanks. This is the final thing I am needing to customize your component. It working great.

There could be an easier way to do this as well...perhaps pointing me in the direction of the invoice file, and I could write a simple subtraction code inside nested ifs.
Responses (1)
  • Accepted Answer

    Saturday, February 08 2014, 06:48 PM - #Permalink
    1
    I've got it now. I can have my created token of {amount_credit} appear when I create the formula of assign the value of :

    $amount_credit=$subtotal_payments - $total

    Now, I'm just going to make the format pretty.

    And we are off and running.
    The reply is currently minimized Show
Your Reply