Merge pull request #30426 from frappe/mergify/bp/develop/pr-30395

fix: Write off amount wrongly calculated in POS Invoice (backport #30395)