zero movement inventory

karuchua
Member Posts: 151
am trying to create to create a form to output for me inventory with zero movement.
am trying to filter for the items and also check in the item ledger entries the last posting date then compare against my calculated months and end date.
in the code below but not working,what am i missing?
am trying to filter for the items and also check in the item ledger entries the last posting date then compare against my calculated months and end date.
in the code below but not working,what am i missing?
IF GReportDate = 0D THEN GReportDate := WORKDATE; GYearFormular := '-' + FORMAT(GNoOfMonths) + 'M'; GMonthDates[1] := CALCDATE('CM',GReportDate); GMonthDates[1] := CALCDATE(GYearFormular,GMonthDates[1]); GMonthDates[2] := CALCDATE('-CM',GMonthDates[1]); IF GMonthDates[2] < 080809D THEN GMonthDates[2] := 080809D + 3; LItemLedgEntriesREC.RESET; LItemLedgEntriesREC.SETCURRENTKEY("Item No.","Posting Date"); LItemLedgEntriesREC.SETRANGE("Item No.","No."); LItemLedgEntriesREC.SETRANGE("Posting Date",GMonthDates[2],GReportDate); IF LItemLedgEntriesREC.FINDLAST THEN BEGIN SETFILTER("Date Filter",'%1',GMonthDates[2]); END;
0
Comments
-
try to check calculated GMonthDates by printing message
Message('%1 %2',GMonthDates[1],GMonthDates[2]);
use below statementsGMonthDates[1] := CALCDATE('<CM>',GReportDate); GMonthDates[2] := CALCDATE('<-CM>',GMonthDates[1]); GYearFormular := '<-' + FORMAT(GNoOfMonths) + 'M>';
0 -
i can output the dates but seems not to filter on my aftergetrecord of my form.0
-
where did you write this code?0
-
its on my aftergetrecord of the form0
-
What are you expecting from this code?
SETFILTER("Date Filter",'%1',GMonthDates[2]);
0 -
am expecting it to filter items that the meet the item ledger entries setrange above,how should it be?0
-
no one with an idea ?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions