Esaminare gli esempi seguenti per ricevere indicazioni sulla customizzazione dei calcoli di benefit e imposte.
Caso d'uso 1
Si desidera calcolare la commissione come percentuale del conto Commission Basis (base commissione), che è un conto customizzato non fornito da Workforce. La commissione viene calcolata moltiplicando il tasso immesso nella procedura guidata Benefit e imposte per il conto customizzato base commissione.
Formula campione
IF("No Property"->"BegBalance"==[OWP_EarningList.Commission])
IF(@ISMBR(@RELATIVE("OWP_Existing Employees",0)))
"Commission Basis"->"No Property" * ("OWP_Value"/100);
ELSE
#Missing;
ENDIF
ENDIFCaso d'uso 2
Sempre partendo dall'esempio precedente, si desidera aggiungere un benefit denominato Assicurazione, calcolato come percentuale del conto relativo al merito, con i seguenti valori selezionati nella procedura guidata Benefit e imposte.
Formula campione
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;
"Custom Expense"="OWP_Expense amount";
ENDIF;
Caso d'uso 3
Sempre partendo dall'esempio precedente, si desidera aggiungere un'imposta (imposta a livelli) denominata SUTA, calcolata come percentuale di Benefit1, Benefit2, Benefit3, Benefit4 , con i seguenti valori selezionati nella procedura guidata Benefit e imposte.
Formula campione
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
"Custom Expense"="OWP_Expense amount";
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_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_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_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
(1300-1200)*(30/100) + (1200-1000)*(20/100) + 1000*(10/100);
ENDIF
ENDIF
Nota:
Non assegnare valori al membro OWP_Expense Amount. Se esiste un caso d'uso per applicare ulteriore logica a un valore calcolato, assegnare l'importo OWP_Expense Amount a OWP_Custom Expense. Fare riferimento al precedente Caso d'uso 2 analogo.