自訂福利和稅額計算

複查這些範例來幫助您自訂福利和稅額計算。

使用案例

您想要以「佣金基礎」科目的百分比來計算佣金,這是一個未隨著人力提供的自訂科目。佣金的計算方式是把「福利與稅額精靈」中輸入的費率乘以自訂「佣金基礎」科目。

範例公式

IF("No Property"->"BegBalance"==[OWP_EarningList.Commission])  
    IF(@ISMBR(@RELATIVE("OWP_Existing Employees",0)))  
        "Commission Basis"->"No Property" * ("OWP_Value"/100);  
    ELSE  
        #Missing;  
    ENDIF  
ENDIF

使用案例

基於前一個範例,您想要新增一個叫作「保險」的福利,其計算方式是「功績俸」科目的百分比,且「福利與稅額精靈」中已選取下列值:

  • 元件類型—自訂
  • 付款條件—每季 (工作曆年)
  • 付款頻率—第一期給付
  • 最大值類型—固定金額
  • 臨界值範圍—YTD
  • 應稅元件—是
  • 所有月份的費率—10
  • 臨界值—400
  • 值類型—您可以對「值類型」選取任何值,因為我們會以自訂邏輯中的「功績俸」百分比來計算福利。

範例公式

IF("No Property"->"BegBalance"==[OWP_EarningList.Commission])  
    IF(@ISMBR(@RELATIVE("OWP_Existing Employees",0)))  
        "Commission Basis"->"No Property" * ("OWP_Value"/100);  
    ELSE  
        #Missing;  
    ENDIF  
ELSEIF("No Property"->"BegBalance"==[OWP_BenefitList.Insurance])
    IF("Cal TP-Index"==1 OR "Cal TP-Index"==4 OR "Cal TP-Index"==7 OR "Cal TP-Index"==10)
        "OWP_Expense amount"="OWP_Merit"->"OWP_Expense amount"*("OWP_Value"/100);
    ENDIF;
    IF("OWP_Expense amount"!=#MISSING)
        IF("OWP_Calculated Max Value"!=#MISSING)
            IF("OWP_CYTD(Prior)"+"OWP_Expense amount">"OWP_Calculated Max Value")
                IF("OWP_CYTD(Prior)"<="OWP_Calculated Max Value")
                    "OWP_Expense amount"="OWP_Calculated Max Value"-"OWP_CYTD(Prior)";
                ELSE
                    "OWP_Expense amount"=#MISSING;
                ENDIF;
            ENDIF;
        ENDIF;
    ENDIF;
ENDIF;

使用案例

基於前一個範例,您想要新增一個叫作 SUTA 的稅 (分級稅額),其計算方式為 Benefit1、Benefit2、Benefit3、Benefit4 的百分比,且「福利與稅額精靈」中已選取下列值:

  • 元件類型—自訂
  • 付款條件—每月
  • 最大值類型—臨界值
  • 臨界值範圍—每月
  • 「費率」頁面中未提供費率。
  • 對於自訂分級稅額,需要提供費率作為自訂公式的一部分。

範例公式

IF("No Property"->"BegBalance"==[OWP_EarningList.Commission])  
    IF(@ISMBR(@RELATIVE("OWP_Existing Employees",0)))  
        "Commission Basis"->"No Property" * ("OWP_Value"/100);  
    ELSE  
        #Missing;  
    ENDIF  
ELSEIF("No Property"->"BegBalance"==[OWP_BenefitList.Insurance])
    IF("Cal TP-Index"==1 OR "Cal TP-Index"==4 OR "Cal TP-Index"==7 OR "Cal TP-Index"==10)
        "OWP_Expense amount"="OWP_Merit"->"OWP_Expense amount"*("OWP_Value"/100);
    ENDIF;
    IF("OWP_Expense amount"!=#MISSING)
        IF("OWP_Calculated Max Value"!=#MISSING)
            IF("OWP_CYTD(Prior)"+"OWP_Expense amount">"OWP_Calculated Max Value")
                IF("OWP_CYTD(Prior)"<="OWP_Calculated Max Value")
                    "OWP_Expense amount"="OWP_Calculated Max Value"-"OWP_CYTD(Prior)";
                ELSE
                    "OWP_Expense amount"=#MISSING;
                ENDIF;
            ENDIF;
        ENDIF
    ENDIF
ELSEIF("No Property"->"BegBalance"==[OWP_TaxList.SUTA])
    IF("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount"<=1000)
        "OWP_Expense amount"=("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount")*(10/100);
    ELSEIF("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount"<=1200)
        "OWP_Expense amount"=(("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount")-1000)*(20/100) + 1000*(10/100);
    ELSEIF("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount"<=1300)
        "OWP_Expense amount"=(("OWP_Benefit1"->"OWP_Expense amount"+"OWP_Benefit2"->"OWP_Expense amount"+"OWP_Benefit3"->"OWP_Expense amount"+"OWP_Benefit4"->"OWP_Expense amount")-1200)*(30/100) + (1200-1000)*(20/100) + 1000*(10/100);
    ELSE
        "OWP_Expense amount"=(1300-1200)*(30/100) + (1200-1000)*(20/100) + 1000*(10/100);
    ENDIF
ENDIF