...
"Element Type"::Bonus:
// Delete the following lines.
BEGIN
PersonIncomeEntry2.RESET;
PersonIncomeEntry2.SETCURRENTKEY("Employee Ledger Entry No.");
PersonIncomeEntry2.SETRANGE("Employee Ledger Entry No.","Employee Ledger Entry No.");
PersonIncomeEntry2.SETRANGE("Period Code","Period Code");
PersonIncomeEntry2.SETRANGE(Calculation,TRUE);
IF PersonIncomeEntry2.FINDFIRST THEN
InsertPersonIncomeEntry(
PersonIncomeEntry2."Entry Type"::"Taxable Income","Document No.",
"Directory Code",0,"Payroll Amount" - PersonIncomeEntry2.Base,0,0,'',0,PostingDate,PostingDate,
0,"Employee Ledger Entry No.",IsInterim,PayrollElement."Advance Payment")
ELSE
InsertPersonIncomeEntry(
PersonIncomeEntry2."Entry Type"::"Taxable Income","Document No.",
"Directory Code",0,"Payroll Amount",0,0,'',0,PostingDate,PostingDate,
0,"Employee Ledger Entry No.",IsInterim,PayrollElement."Advance Payment");
END;
// End of the deleted lines.
"Element Type"::"Tax Deduction":
...
...
"Element Type"::Bonus:
// Add the following lines.
CreateGainTaxLine(PayrollDocLine,PostingDate,PayrollElement."Advance Payment");
"Element Type"::Other:
IF PayrollElement."Income Tax Base" THEN
CreateGainTaxLine(PayrollDocLine,PostingDate,PayrollElement."Advance Payment");
// End of the added lines.
"Element Type"::"Tax Deduction":
...