Paid Amount not updated in Sales Invoice

If I make a part payment to a sales invoice, the journal entries are created appropriately, But the ‘Paid Amount’ field is not updated. The outstanding amount is calculated correctly, but the ‘Paid Amount’ always shows zero. Any ideas?

This is the bottom portion of Sales Invoice standard print - I have made a payment entry for Rs. 30000, and it reflects in the Outstanding amount calculation. But the field ‘Paid Amount’ shows zero.

Hi kirthi

-If you Select option "Is POS"then only “Paid Amount” field get displayed.
-If you make simple sales invoice without selecting option as “Is POS” then "Paid Amount"field not showing.
-If you want to hide “Paid Amount” from Print Format then follow steps-

Go to ‘Customize form’
Enter Form type “Sales Invoice”.
open Row-of ‘Paid Amount’
select option as “Print Hide”
and Update
Then it will not displayed on “Print format”

1 Like

I dont understand the reasoning behind this…why would it be enabled only for POS transactions?
@nabinhait @rmehta any ideas?

It is by design, paid amount field is only related to POS. If you are accepting advance payment against invoice, it is updated in Total Advance field. Otherwise, for all the late payments, system only updates outstanding, not paid amount.


Has anything been changed done and if a fix has been applied. advance payment is not showing or subtracted from total amount due.

1 Like

Same issue here. Any resolution?

I too would like to have the paid amount get updated when payments are posted to the invoice, other than at the time of invoice creation. I posted a reply on github: [Bug] Advance Amount is not updated in Sales Invoice. · Issue #9190 · frappe/erpnext · GitHub

1 Like

Hi, got across this discussion. May I know if how did you solve this? How will the payment amount field be updated once a payment entry is linked to the invoice and not selecting the checkbox “Is POS”?

I am experiencing this problem now. When I did a report builder and saw that the payment amount is not updated eventhough the status of invoice is already paid.

I encountered this issue today and here is what I did. Edit your print format and add the custom HTML field and insert the code below

{% set total_paid_amount = [] %}
{% if doc.outstanding_amount>0 %}
   {% set total_paid_amount = doc.base_rounded_total - doc.outstanding_amount %}
   <strong>Total Paid Amount:</strong> {{total_paid_amount}}
{% endif %}


i tried using the exact script you pasted earlier.

This Works for me

{% set total_paid_amount = [] %}
{% if doc.outstanding_amount>0 %}
{% set total_paid_amount = doc.base_rounded_total - doc.outstanding_amount %}
Total Paid Amount: ₦{{ frappe.utils.fmt_money(total_paid_amount) }}
{% endif %}

1 Like

Good day

May I please ask assistance to implement this solution?
I am very new to “modifying” docs on ERPNext so please be patient.

I went to…

  1. Print format
  2. Selected Sales Invoice Return
  3. Edit format
  4. Scrolled down to just below Loyalty Points Redemption

What I see is a bit different than the screen shot further up…

Am I doing something wrong?

Thank you

I am getting the error
standard print format cannot be updated
Which, after googling, seems to be generated in V12

And I have
ERPNext: v12.10.1 (version-12)

Frappe Framework: v12.8.4 (version-12


At the top left is custom HTML,

Drag it to your desire position

Copy the script above




Thank you @Chibuzor_Derrick for your time in sending a response.

I could complete everything as you described it. However when I tried saving …
I get the error…

"standard print format cannot be updated "

From reading other threads and google-hits, it would seem that this is what happens in
V12 and I have…
ERPNext: v12.10.1 (version-12)

Frappe Framework: v12.8.4 (version-12)

I also found another thread where it is suggested that one can
"disable standard print format " only in the database.
This will allow me to save the changes that I am trying to make with your HTML code.

I have put out a post about how to do this in the database but I have not had a response yet.

Once again, thank you for your time.

1 Like

Is this still valid for Version 14. I don’t get any output with the code from Chibuzor_Derrick nor the code above from @kdevoper.

For anyone landing here wanting to put the paid amount on their invoices, this is how I did it
in version 14.

Create a custom field in Sales Invoce DocType. I put mine at #74 and made it an HTML field.
In the options I put the following code.

<span style="float:right">{% set total_paid_amount = [] %}

   {% set total_paid_amount = doc.base_rounded_total - doc.outstanding_amount %}
    {{ "$%.2f"|format(total_paid_amount) }}

Notice I had to include the Field name I wanted to display. It seems HTML field does not display the the Label so I included it in the HTML. The code above helps line up the label and dollar amount like other fields in the standard invoice. Also notice I force the dollar with two decimal places on the last line.

For those wondering. My earlier post mentioned not being able to see anything while using code posted earlier in this thread. I had to remove the if statement. I removed:

{% if doc.outstanding_amount>0 %}
{% endif %}

I assume this doesn’t work because the amount is not an integer but maybe text/string.

1 Like