I have an invoice with total invoice = $1212. Based on the above setting, we will calculate
At step 1: commission received = $2. Remaining bill = 1212-(500-0) = $712
At step 2: Commission received = $3. Remaining bill = 712-(1000-500) = $212
At step 3: Commission received = $4
=> Commission received = 2+ 3+4=9