Send email alert when sales invoice status is paid

hi guys,

I would like to setup an email alert for sales invoice when the status is paid.

Currently what i have tried so far :

Test 1:
Send Alert on : Value Change

Value Changed : outstanding_amount (Outstanding_amount)

Condition : doc.docstatus ==1 and doc.outstanding_amount == 0

result : not working, no email send after status change to paid.

Test 2:
Send Alert on : Submit

Condition : doc.docstatus ==1 and doc.outstanding_amount == 0

result : not working, no email send after status change to paid.

Any input is highly appreciated, Thanks

This does not work because system does not used set_value method to set outstanding amount or status, it directly update those via query. There are some other problems to use set_value method to update those values.

@naim5441,

Instead of checking the outstanding amount you can check the status field value directly, the status change should trigger the email alert as it uses the db_set method.

Use following settings for Sales Invoice Email Alert

Send Alert on : Value Change
Value Changed : status
Condition : doc.status =="Paid"
1 Like

Hi, thanks for reply.

But there is no “status” to be choosed in value changed, i guess because it is not a field?

I used doc.workflow_state==“Approved by Supervisor” as a workflow state in email alert condition and it works for i guess can help.

regards

@naim5441,

Status field is available in the Value change field for Sales Invoice, Please check the screenshot

I think because im using erpnext version v7.0.63, could not find the status field to select in value changed.

Is there anyway that i could add the status field into the email alert without upgrading to latest version?.

Thanks