When we processing the sales order, we have the opportunity to setup discount at both header level and line level. And we will see the total invoice amount is include the discount from header and line.
However, if we proceed with a rebate, in current system it will only calculate the invoice amount with line level discount but ignore the header level discount.
This will make a result like for example:
Line 1 with total invoice amount 100USD
Line 2 with total invoice amount 100USD
Sales header has discount setup as 10%
So the sales total invoice amount would be 180USD
However, proceed rebate will see line 1 proceed with 100USD as invoice amount and line 2 proceed with 100USD as invoice amount.
This is not expected as we have total 180USD charged to customer. And the rebate should proceed based on 180USD.