...
TempICGenJnlLine.VALIDATE("Account Type",TempICGenJnlLine."Account Type"::"IC Partner");
TempICGenJnlLine.VALIDATE("Account No.",SalesLine."IC Partner Code");
TempICGenJnlLine."Source Currency Code" := SalesHeader."Currency Code";
TempICGenJnlLine."Source Currency Amount" := TempICGenJnlLine.Amount;
TempICGenJnlLine.Correction := SalesHeader.Correction;
// Delete the following lines.
TempICGenJnlLine."Shortcut Dimension 1 Code" := SalesLine."Shortcut Dimension 1 Code";
TempICGenJnlLine."Shortcut Dimension 2 Code" := SalesLine."Shortcut Dimension 2 Code";
// End of the lines.
TempICGenJnlLine."Source Code" := SrcCode;
TempICGenJnlLine."Country/Region Code" := SalesHeader."VAT Country/Region Code";
TempICGenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer;
TempICGenJnlLine."Source No." := SalesHeader."Bill-to Customer No.";
TempICGenJnlLine."Posting No. Series" := SalesHeader."Posting No. Series";
...
...
TempICGenJnlLine.VALIDATE("Account Type",TempICGenJnlLine."Account Type"::"IC Partner");
TempICGenJnlLine.VALIDATE("Account No.",SalesLine."IC Partner Code");
TempICGenJnlLine."Source Currency Code" := SalesHeader."Currency Code";
TempICGenJnlLine."Source Currency Amount" := TempICGenJnlLine.Amount;
TempICGenJnlLine.Correction := SalesHeader.Correction;
TempICGenJnlLine."Source Code" := SrcCode;
TempICGenJnlLine."Country/Region Code" := SalesHeader."VAT Country/Region Code";
TempICGenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer;
TempICGenJnlLine."Source No." := SalesHeader."Bill-to Customer No.";
TempICGenJnlLine."Posting No. Series" := SalesHeader."Posting No. Series";
...
...
TempICGenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer;
TempICGenJnlLine."Source No." := SalesHeader."Bill-to Customer No.";
TempICGenJnlLine."Posting No. Series" := SalesHeader."Posting No. Series";
TempICGenJnlLine.VALIDATE("Bal. Account Type",TempICGenJnlLine."Bal. Account Type"::"G/L Account");
TempICGenJnlLine.VALIDATE("Bal. Account No.",SalesLine."No.");
Vend.SETRANGE("IC Partner Code",SalesLine."IC Partner Code");
IF Vend.FINDFIRST THEN BEGIN
TempICGenJnlLine.VALIDATE("Bal. Gen. Bus. Posting Group",Vend."Gen. Bus. Posting Group");
TempICGenJnlLine.VALIDATE("Bal. VAT Bus. Posting Group",Vend."VAT Bus. Posting Group");
END;
...
...
TempICGenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer;
TempICGenJnlLine."Source No." := SalesHeader."Bill-to Customer No.";
TempICGenJnlLine."Posting No. Series" := SalesHeader."Posting No. Series";
TempICGenJnlLine.VALIDATE("Bal. Account Type",TempICGenJnlLine."Bal. Account Type"::"G/L Account");
TempICGenJnlLine.VALIDATE("Bal. Account No.",SalesLine."No.");
// Add the following lines.
TempICGenJnlLine."Shortcut Dimension 1 Code" := SalesLine."Shortcut Dimension 1 Code";
TempICGenJnlLine."Shortcut Dimension 2 Code" := SalesLine."Shortcut Dimension 2 Code";
// End of the lines.
Vend.SETRANGE("IC Partner Code",SalesLine."IC Partner Code");
IF Vend.FINDFIRST THEN BEGIN
TempICGenJnlLine.VALIDATE("Bal. Gen. Bus. Posting Group",Vend."Gen. Bus. Posting Group");
TempICGenJnlLine.VALIDATE("Bal. VAT Bus. Posting Group",Vend."VAT Bus. Posting Group");
END;
...