web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)
New Discussion

BookValueAfterDisposal-FixedAsset

(0) ShareShare
ReportReport
Posted on by 558

BookValueAfterDisposal-FixedAsset

 ShowBookValueAfterDisposal()
IF "Disposal Date" > 0D THEN BEGIN
  CLEAR(TempFALedgEntry);
  TempFALedgEntry.DELETEALL;
  TempFALedgEntry.SETCURRENTKEY("FA No.","Depreciation Book Code","FA Posting Date");
  DepreciationCalc.SetFAFilter(FALedgEntry,"FA No.","Depreciation Book Code",FALSE);
  WITH FALedgEntry DO BEGIN
    IF FIND('-') THEN
      REPEAT
        IF (("FA Posting Category" = "FA Posting Category"::Disposal) AND
            ("FA Posting Type" <> "FA Posting Type"::"Book Value on Disposal") AND
            ("FA Posting Type" <> "FA Posting Type"::"Salvage Value")) OR
           "Part of Book Value"
        THEN BEGIN
          TempFALedgEntry := FALedgEntry;
          TempFALedgEntry.INSERT;
        END;
      UNTIL NEXT = 0;
    TempFALedgEntry.SETRANGE("FA No.",TempFALedgEntry."FA No.");
    TempFALedgEntry.SETRANGE("Depreciation Book Code",TempFALedgEntry."Depreciation Book Code");
    PAGE.RUN(0,TempFALedgEntry);
  END;
END ELSE BEGIN
  FALedgEntry.SETCURRENTKEY("FA No.","Depreciation Book Code","Part of Book Value","FA Posting Date");
  FALedgEntry.SETRANGE("FA No.","FA No.");
  FALedgEntry.SETRANGE("Depreciation Book Code","Depreciation Book Code");
  FALedgEntry.SETRANGE("Part of Book Value",TRUE);
  PAGE.RUN(0,FALedgEntry);
END;
CalcBookValue()
IF "Disposal Date" > 0D THEN
  "Book Value" := 0
ELSE
  CALCFIELDS("Book Value");

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans