Hello
A customer bought an item worth 1000
I am supposed to give him 100 back as discount for which i created a refund invoice of 100
Then he pays 900 instead of 1000.
When I register payment, i create a write-off of 100.
I want to automatically reconcile the 100 write-off with the refund invoice of 100
Could you help with a sample code, to programmatically reconcile the 2 moves? Thanks