General Description
Salary Rules should be assigned to Salary Structure. Because salary rules accomodate the calculations of each components which are needed.
MK (Masa Kerja) is the salary rule which functioned to calculate the months of the employeement in the company. If they have been worked for more than 12 months, the system will generate MK as 12.
Salary rules in monthly salary structure basically is variables that help the calculation of NET_1_MONTH value. This value is the one that going to be the amount which has to be transferred by the company. In the calculation process of NET_1_MONTH, there are many another nested steps.
For example, The python code for NET_1_MONTH is
if DESEPARATE:
result = (GROSS - (DETOTAL + PPH21_TOTAL))+DESEPARATE + LOANINS
else:
result = GROSS - (DETOTAL + PPH21_TOTAL) + LOANINS
the value of GROSS, DETOTAL, PPH21_TOTAL, DESEPARATE, and LOANINS has to be calculated first, because they functioned as variables. The code below shows GROSS variable calculation:
result = categories.BASIC + categories.ALW + ALPPH21
DETOTAL calculation:
total = 0
if employee.bpjstk_no:
total += DEJHTEMP
total += DEJPEMP
if employee.bpjsks_no:
total += DEBEMP
result = categories.DED - total
Those lines of codes can be viewed by choosing the configuration option.
Configuration Salary Rules Choose One of the available Salary RulesThe py code will be shown in general tab.
Sequences
Sequences is important to help the execution of phyton code in salary rules. A sequence is a positionally ordered collection of items. And you can refer to any item in the sequence by using its index number e.g., s[0] and s[1]. For more details, check here.
Here is the position of sequence information in salary rules details.