Advertisement
Ihor0k

of_cnvr_sal_by_plbn_rt_md

Apr 2nd, 2018
2,885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. as_plan_md = inv_plprv.ids_data.object.plprv_bn_rt_md[1]
  2.  
  3. IF as_sal_md = 'B' AND (as_plan_md = 'WC' OR as_plan_md = 'WW') THEN
  4.     ldec_cnv_sal = adec_sal_amt * 2.16666/4.33333
  5. ELSEIF as_sal_md = 'B' AND as_plan_md = 'SW' THEN
  6.     ldec_cnv_sal = adec_sal_amt * 2.16666/2
  7. ELSEIF as_sal_md = 'B' AND (as_plan_md = 'MR' OR as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md = 'MW') THEN
  8.     ldec_cnv_sal = adec_sal_amt * 2.16666
  9. ELSEIF as_sal_md = 'B' AND (as_plan_md = 'BC' OR as_plan_md = 'BW') THEN   
  10.     ldec_cnv_sal = adec_sal_amt
  11. ELSEIF as_sal_md = 'W' AND (as_plan_md = 'BC' OR as_plan_md = 'BW') THEN
  12.     ldec_cnv_sal = adec_sal_amt * 2
  13. ELSEIF as_sal_md = 'W' AND as_plan_md = 'SW' THEN
  14.     ldec_cnv_sal = adec_sal_amt * 2.16666
  15. ELSEIF as_sal_md = 'W' AND (as_plan_md = 'MR' OR as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md = 'MW') THEN
  16.     ldec_cnv_sal = adec_sal_amt * 4.33333
  17. ELSEIF as_sal_md = 'W' AND (as_plan_md = 'WC' OR as_plan_md = 'WW') THEN
  18.     ldec_cnv_sal = adec_sal_amt
  19. ELSEIF as_sal_md = 'M' AND (as_plan_md = 'WC' OR as_plan_md = 'WW') THEN
  20.     ldec_cnv_sal = adec_sal_amt/4.33333
  21. ELSEIF as_sal_md = 'M' AND (as_plan_md = 'BC' OR as_plan_md = 'BW') THEN
  22.     ldec_cnv_sal = adec_sal_amt /2.16666
  23. ELSEIF as_sal_md = 'M' AND as_plan_md = 'SW' THEN
  24.     ldec_cnv_sal = adec_sal_amt /2
  25. ELSEIF as_sal_md = 'M' AND (as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md ='MR' OR as_plan_md = 'MW') THEN
  26.     ldec_cnv_sal = adec_sal_amt
  27. ELSEIF as_sal_md = 'S' AND (as_plan_md = 'WC' OR as_plan_md = 'WW') THEN
  28.     ldec_cnv_sal = adec_sal_amt * 2/4.33333
  29. ELSEIF as_sal_md = 'S' AND (as_plan_md = 'BC' OR as_plan_md = 'BW') THEN   
  30.     ldec_cnv_sal = adec_sal_amt * 2/2.16666
  31. ELSEIF as_sal_md = 'S' AND (as_plan_md = 'MR' OR as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md = 'MW') THEN 
  32.     ldec_cnv_sal = adec_sal_amt * 2
  33. ELSEIF as_sal_md = 'S' AND as_plan_md = 'SW' THEN
  34.     ldec_cnv_sal = adec_sal_amt
  35. ELSEIF as_sal_md = 'H' AND (as_plan_md = 'WW' OR as_plan_md = 'WC') THEN
  36.     ldec_cnv_sal = adec_sal_amt * al_prd_hrs_num
  37. ELSEIF as_sal_md = 'H' AND (as_plan_md = 'BW' OR as_plan_md = 'BC') THEN
  38.     ldec_cnv_sal = adec_sal_amt * al_prd_hrs_num * 2
  39. ELSEIF as_sal_md = 'H' AND as_plan_md = 'SW' THEN
  40.     ldec_cnv_sal = adec_sal_amt * al_prd_hrs_num * 2.16666
  41. ELSEIF as_sal_md = 'H' AND (as_plan_md = 'MR' OR as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md = 'MW') THEN
  42.     ldec_cnv_sal = adec_sal_amt * al_prd_hrs_num * 4.33333
  43. ELSEIF as_sal_md = 'Y' AND (as_plan_md = 'WC' OR as_plan_md = 'WW') THEN
  44.     ldec_cnv_sal = adec_sal_amt/52
  45. ELSEIF as_sal_md = 'Y' AND (as_plan_md = 'BC' OR as_plan_md = 'BW') THEN
  46.     ldec_cnv_sal = adec_sal_amt/26
  47. ELSEIF as_sal_md = 'Y' AND as_plan_md = 'SW' THEN
  48.     ldec_cnv_sal = adec_sal_amt/24
  49. ELSEIF as_sal_md = 'Y' AND (as_plan_md = 'MR' OR as_plan_md = 'MC' OR as_plan_md = 'MO' OR as_plan_md = 'MW' ) THEN
  50.     ldec_cnv_sal = adec_sal_amt/12
  51. ELSEIF as_sal_md = 'Y' AND (as_plan_md = 'YC' OR as_plan_md = 'YW') THEN
  52.     ldec_cnv_sal = adec_sal_amt
  53. END IF 
  54. adec_conv_sal_amt = ldec_cnv_sal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement