To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
function in the Gen. Jnl.-Post Line Codeuint (12) as follows:
...
UNTIL OldCustLedgEntry.NEXT = 0;
END;
// Delete the following lines.
PROCEDURE CheckWithholdTax@1130007(DocType@1130000 : ' ,,Invoice,Credit Memo';DocNo@1130001 : Code[20];GenJnlLine@1130002 : Record 81;ApplyInGenJnlLine@1130003 : Boolean);
VAR
ComputedWithholdTax@1130004 : Record 12111;
TmpWithholdingContribution@11300005 : Record 12113;
WithholdCode@1130006 : Record 12104;
BEGIN
IF DocType IN [DocType::Invoice,DocType::"Credit Memo"] THEN BEGIN
ComputedWithholdTax.RESET;
ComputedWithholdTax.SETRANGE("Document No.",DocNo);
IF ComputedWithholdTax.FINDFIRST THEN BEGIN
// End of the deleted lines.
IF NOT ApplyInGenJnlLine THEN
ERROR(Text1130023)
ELSE BEGIN
...
...
UNTIL OldCustLedgEntry.NEXT = 0;
END;
// Add the following lines.
PROCEDURE CheckWithholdTax@1170000000(DocType@1170000000 : ' ,,Invoice,Credit Memo';DocNo@1170000001 : Code[20];GenJnlLine@1170000002 : Record 81;ApplyInGenJnlLine@1170000003 : Boolean);
VAR
ComputedWithholdTax@1170000004 : Record 12111;
TmpWithholdingContribution@1170000005 : Record 12113;
BEGIN
IF (DocType IN [DocType::Invoice,DocType::"Credit Memo"]) AND
(GenJnlLine."Document Type" IN [GenJnlLine."Document Type"::Payment,GenJnlLine."Document Type"::Refund])
THEN BEGIN
ComputedWithholdTax.RESET;
ComputedWithholdTax.SETRANGE("Document No.",DocNo);
IF NOT ComputedWithholdTax.ISEMPTY THEN
// End of the added lines.
IF NOT ApplyInGenJnlLine THEN
ERROR(Text1130023)
ELSE BEGIN
...
...
ELSE BEGIN
TmpWithholdingContribution.RESET;
TmpWithholdingContribution.SETRANGE("Invoice No.",DocNo);
// Delete the following lines.
IF NOT TmpWithholdingContribution.FINDFIRST THEN BEGIN
WithholdCode.GET(ComputedWithholdTax."Withholding Tax Code");
WithholdCode.TESTFIELD("Withholding Taxes Payable Acc.");
IF NOT((GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::"G/L Account") AND
(GenJnlLine."Bal. Account No." = WithholdCode."Withholding Taxes Payable Acc.")) THEN
ERROR(Text1130023);
END;
END;
END;
// End of the deleted lines.
END;
END;
...
...
ELSE BEGIN
TmpWithholdingContribution.RESET;
TmpWithholdingContribution.SETRANGE("Invoice No.",DocNo);
// Add the following lines.
IF TmpWithholdingContribution.ISEMPTY THEN
IF (GenJnlLine."Bal. Account Type" <> GenJnlLine."Bal. Account Type"::"G/L Account") THEN
ERROR(Text1130023);
END;
// End of the added lines.
END;
END;
...