Report showing current retail price of item.

JamieBrown
Member Posts: 107
Hi,
I'm new to Navision so please bear with me. Any help would be very much appreciated.
We have a Sales Price table which has the following fields:
Item No.
Starting Date
Ending Date
This allows us to store multiple prices per product (e.g. where a sales price could be active for a week and then revert back to previous price) The current price is calculated from the starting and ending dates of the price.
The problem I have is that we have a great deal of item prices without any start or end dates. (As only one price exists for that item) We also have other permutations i.e. No starting date or no ending date.
The report needs to be able to show the current price of an item. Here is an example of an item with numerous prices:
Item No. Starting Date Ending Date Price
913751 5.87
913751 01/10/05 6.10
913751 16/12/05 4.66
The current price for this item is £4.66 (As it has the most recent start date). What logic is needed to show this on a single line against the Item No.?
I'm already filtering for 'possible' current prices:
SETFILTER("Sales Price"."Starting Date",'%2..|%1',TODAY,0D);
SETFILTER("Sales Price"."Ending Date",'%1..|%2',TODAY,0D);
SETFILTER("Sales Price"."Sales Type",'retail');
Once any help is greatly appreciated.
thanks
Jamie
I'm new to Navision so please bear with me. Any help would be very much appreciated.
We have a Sales Price table which has the following fields:
Item No.
Starting Date
Ending Date
This allows us to store multiple prices per product (e.g. where a sales price could be active for a week and then revert back to previous price) The current price is calculated from the starting and ending dates of the price.
The problem I have is that we have a great deal of item prices without any start or end dates. (As only one price exists for that item) We also have other permutations i.e. No starting date or no ending date.
The report needs to be able to show the current price of an item. Here is an example of an item with numerous prices:
Item No. Starting Date Ending Date Price
913751 5.87
913751 01/10/05 6.10
913751 16/12/05 4.66
The current price for this item is £4.66 (As it has the most recent start date). What logic is needed to show this on a single line against the Item No.?
I'm already filtering for 'possible' current prices:
SETFILTER("Sales Price"."Starting Date",'%2..|%1',TODAY,0D);
SETFILTER("Sales Price"."Ending Date",'%1..|%2',TODAY,0D);
SETFILTER("Sales Price"."Sales Type",'retail');
Once any help is greatly appreciated.
thanks
Jamie
0
Comments
-
The best way to approach this would be to let the codeunit 7000 Sales Price Calc. Mgt. handle this for you.
This codeunits calculates the current price for you depending on the input you provide.
Please have a look at the codeunit and report back your findings.0 -
Mark,
Just looked at the codeunit and to be honest, it blew my mind a bit.
Do you know of a standard report that uses this codeunit? So I can see how it's called.
thanks
Jamie0 -
It is called from all places in navision where a salesprice is required. Look or example at the sales line.
You can off-course also make your own function to calculate the current sales price, but using this codeunit you are sure you do not mis something.0 -
Mark,
Found another instance of the codeunit being called and have modified accordingly.
Thanks for your help!
Jamie0
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