Calculate Inventory by Sales Unit of Measure
JKoB
Member Posts: 40
Hey!
I need to mod my Item Card.
Presently I only see the Inventory by “Base Unit of Measure”
What I need is following:
1. Read “Sales Unit of Measure”
2. Apply Filter in Table “Item Unit of Measure” (Filtercriteria: ItemNo. & “Sales Unit of Measure”
3. Inventory divided by “Qty. per Unit of Measure”
-> In Short words: Inventory by Sales Unit of Measure
Understood?
I tried this:
Globals:
recFaktorSalesUnit - Record - Item Unit of Measure
Textbox SourceExpr:
recFaktorSalesUnit."Qty. per Unit of Measure"
I know that its just the first the step! (I only created this field to check whether the right decimal is read) But it even doesn’t work.
The Field always shows a “1”. Where did I go wrong?
If I had the right dec. what would be the command to calc “Inventory / Qty. per Unit of Measure” ?
Thx in advance
Jakob
I need to mod my Item Card.
Presently I only see the Inventory by “Base Unit of Measure”
What I need is following:
1. Read “Sales Unit of Measure”
2. Apply Filter in Table “Item Unit of Measure” (Filtercriteria: ItemNo. & “Sales Unit of Measure”
3. Inventory divided by “Qty. per Unit of Measure”
-> In Short words: Inventory by Sales Unit of Measure
Understood?
I tried this:
Globals:
recFaktorSalesUnit - Record - Item Unit of Measure
recFaktorSalesUnit.SETRANGE("Item No.", "No.");
recFaktorSalesUnit.SETRANGE(Code, "Sales Unit of Measure");
Textbox SourceExpr:
recFaktorSalesUnit."Qty. per Unit of Measure"
I know that its just the first the step! (I only created this field to check whether the right decimal is read) But it even doesn’t work.
The Field always shows a “1”. Where did I go wrong?
If I had the right dec. what would be the command to calc “Inventory / Qty. per Unit of Measure” ?
Thx in advance
Jakob
0
Comments
-
Create A new flowfield in the Item Table called "Sales UOM Qty" type Decimal
Calcformula: Lookup("Item Unit Of Measure"."Qty. per Unit of Measure" WHERE (Item No.=Field(No.),Code=Field(Sales Unit Of Measure)))
Now it's up to you if you want to create a "real field" or just a visual one on the item card.
Say you want it just for the form. Then Add A Variable "Actual QOH" or something.OnAfterGetRecord() calcfields("Sales UOM Qty") <<test with & without If "Sales UOM Qty" = 0 then Message('Item %1 Does Not Have A Sale UOM',"No.") else "Actual QOH" := "Quantity On Hand" / "Sales UOM Qty";
Now add a textbox on your card with sourceexp = "Actual QOH"
edit.. might have to calcfields("Sales UOM Qty") if it holds no value0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions