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
0
Comments
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.
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
Jamie
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.
Found another instance of the codeunit being called and have modified accordingly.
Thanks for your help!
Jamie