ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Codeunit 5631 FA Jnl.-Check Line - CheckFAIntegration

Open bartpattijn opened this issue 6 years ago • 1 comments

we would like to be able to suppres the errors in CU5631 function "CheckFAIntegration" and would need an event:

IF GenJnlPosting AND FA."Budgeted Asset" THEN GenJnlLine.FIELDERROR("Account No.",STRSUBSTNO(Text006,FA.FIELDCAPTION("Budgeted Asset"))); IF FA."Budgeted Asset" THEN EXIT; CASE FAPostingType OF FAPostingType::"Acquisition Cost": GLIntegration := DeprBook."G/L Integration - Acq. Cost"; FAPostingType::Depreciation: GLIntegration := DeprBook."G/L Integration - Depreciation"; FAPostingType::"Write-Down": GLIntegration := DeprBook."G/L Integration - Write-Down"; FAPostingType::Appreciation: GLIntegration := DeprBook."G/L Integration - Appreciation"; FAPostingType::"Custom 1": GLIntegration := DeprBook."G/L Integration - Custom 1"; FAPostingType::"Custom 2": GLIntegration := DeprBook."G/L Integration - Custom 2"; FAPostingType::Disposal: GLIntegration := DeprBook."G/L Integration - Disposal"; FAPostingType::Maintenance: GLIntegration := DeprBook."G/L Integration - Maintenance"; FAPostingType::"Salvage Value": GLIntegration := FALSE; END; OnAfterSetGLIntegration(FAPostingType;var GLIntegration;GnlJnlPosting); //new event IF GLIntegration AND NOT GenJnlPosting THEN FAJnlLine.FIELDERROR( "FA Posting Type", STRSUBSTNO(Text007,FAJnlLine."FA Posting Type"));

IF NOT GLIntegration AND GenJnlPosting THEN GenJnlLine.FIELDERROR( "FA Posting Type", STRSUBSTNO(Text008,GenJnlLine."FA Posting Type"));

GLIntegration := DeprBook."G/L Integration - Depreciation"; IF GenJnlPosting THEN WITH GenJnlLine DO BEGIN IF "Depr. until FA Posting Date" AND NOT GLIntegration THEN FIELDERROR( "Depr. until FA Posting Date",STRSUBSTNO(Text009, DeprBook.FIELDCAPTION("G/L Integration - Depreciation"),FALSE,DeprBook.TABLECAPTION)); IF "Depr. Acquisition Cost" AND NOT GLIntegration THEN FIELDERROR( "Depr. Acquisition Cost",STRSUBSTNO(Text009, DeprBook.FIELDCAPTION("G/L Integration - Depreciation"),FALSE,DeprBook.TABLECAPTION)); END; IF NOT GenJnlPosting THEN WITH FAJnlLine DO BEGIN IF "Depr. until FA Posting Date" AND GLIntegration THEN FIELDERROR( "Depr. until FA Posting Date",STRSUBSTNO(Text009, DeprBook.FIELDCAPTION("G/L Integration - Depreciation"),TRUE,DeprBook.TABLECAPTION)); IF "Depr. Acquisition Cost" AND GLIntegration THEN FIELDERROR( "Depr. Acquisition Cost",STRSUBSTNO(Text009, DeprBook.FIELDCAPTION("G/L Integration - Depreciation"),TRUE,DeprBook.TABLECAPTION)); END;

bartpattijn avatar Dec 02 '19 13:12 bartpattijn

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Dec 19 '19 07:12 bc-ghost