Paid Amount not updated in Sales Invoice

@kdevloper

i tried using the exact script you pasted earlier.