There is 1 Invoice with 2 products 'Citrus Bergamot' with total value = $3030 , product 'Synology DS920+' with the total value = $33000. Based on the above setting, we will calculate:
Total Tax = 3,234.00 + 1,617.00 = $4851.00
Total Invocie = $40,160.00
Total Payment = $606.00
Payment Percent = Total Payment/ Total Invoice = 606.00 / 40,160.40 = 0.01508949114 (Percentage of the amount paid)
Payment amount = [ Total Payment - ( Total Tax * Payment Percent) ] = [ 606.00 - (4851.00 * 0.01508949114) ] = 532.80087848 (Amount to calculate commission is based on total payment)
Citrus Bergamot:
Payment Percent [Citrus Bergamot] = 3030 / 40,160.40 =0.0754474557 (Percent of Citrus Bergamot's profit to total profit) Amount [Citrus Bergamot] = Payment amount * Payment Percent [Citrus Bergamot] = 532.80087848 * 0.0754474557 =40.198470676 (amount to calculate commission for Citrus Bergamot)
Commission [ Citrus Bergamot] = $1
Total Commission = Commission [ Citrus Bergamot] + Commission [Synology DS920+] =1+ 2= $3.
Total Tax = 3,234.00 + 1,617.00 = $4851.00
Total Invocie = $40,160.00
Total Profit = $3030.00
Total Payment = $606.00
Payment Percent = Total Payment / Total Invoice = 606.00 / 40,160.40 = 0.01508949114 (Percentage of the amount paid)
Profit Percent = Total Profit / Total Invoice = 3030.00 / 40,160.40 = 0.0754474557 (Percentage of profit to total invoice)
Payment amount = [ Total Payment - ( Total Tax * Payment Percent) ] * Profit Percent = [ 606.00 - (4851.00 * 0.01508949114) ]* 0.0754474557 = 40.19847067603 (Amount to calculate commission is based on total payment)
Citrus Bergamot:
Profit Percent [Citrus Bergamot] = 30.00 / 3030.00 = .00990099009 (Percent of Citrus Bergamot's profit to total profit)
Amount [Citrus Bergamot] = Payment amount * Profit Percent [Citrus Bergamot] = 40.19847067603 * 0.0099009909 = 0.39800465979 (amount to calculate commission for Citrus Bergamot)
Commission [ Citrus Bergamot] = $1
Synology DS920+:
Profit Percent [Synology DS920+] = 3000/3030 = 0.9900990099 (Percent of Synology DS920+'s profit to total profit)
Amount [Synology DS920+] = Payment amount * Profit Percent [Synology DS920+] = 40.198470676 * 0.9900990099= 39.8004660158 ( amount to calculate commission for Synology DS920+)
Commission [Synology DS920+] = $2
Total Commission = Commission [ Citrus Bergamot] + Commission [Synology DS920+] = 1 + 2 = $3