0

テーブルにこれらの列があります

Person      Agent     Unit        BSP            Discount

578           0      000023      32689525       0.1
578           1      000025      17589656       1
579           0      000021      32689525       0.1
579           0      000020      17589656       1
581           0      000022      32689525       0.1
583           0      000024      17589656       1
578           11     000023q     32689525       0
578           12     000025a     17589656       0

実際には のインセンティブを計算する必要がありPersonます。578以上の場合を例にとると、合計4ユニットを予約しているため、そのうち3ユニットはブローカー付き、1ユニットは個人です。したがって、ブローカーの部分から、彼のインセンティブはユニットあたり 2500 INR、つまり 3*2500 = 7500 になります。ここで割引の部分が来ます。以下の点を参照してください。

条件:

  1. 割引が提供されていない場合、BSP の 1% 未満が販売担当者へのインセンティブに割り当てられます。

  2. 予約に与えられた割引が 0.1% から 1% の間である場合、BSP の 0.75% が営業担当者へのインセンティブに割り当てられます。

  3. 予約に与えられた割引が 1.1% から 2% の間である場合、BSP の 0.50% が営業担当者へのインセンティブに割り当てられます。

  4. 予約に適用される割引が 2% 以上の場合、BSP の 0.25% が営業担当者へのインセンティブに割り当てられます。

上の表では、578 が 4 単位を予約したことが明らかです。2 単位は割引あり、2 単位は割引なしです。

したがって、彼のインセンティブは次のように計算されます。

  var incentive = total_no_of_units_booked_with_agent * 2500;

// since there might be a possibility that more than one units can be
// booked by a sales person.No we have to find if there is any discount 
// applied there, if its there, then extract the incentive for each unit 
//and total it using the above condition. For table shown we have
//since it has 4 records

  incentive = incentive + (.75% of BSP)+ (.75%of BSP)+(1% of BSP)+(1%of BSP) 
4

1 に答える 1