Product Price List report

Hi - just wanted some feed back on this report if anyone else has used it. 

We are in the process of increasing our fees and wanted a print out of our current prices - so chose this report .

It prints out each of the Unit Prices for each product/service even the old prices that have 'From date' and 'To date' - so if the prices have been updated 3 times - 3 entries are printed out. We thought it would just print out the current price. Makes the report very long for printing.

Thanks Anna

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Product Price List report

Anna - I had a look at the report code and it looks reasonably good to me.  Specifically it contains the clause:

and (
  (curdate() between p1.start_time and p1.end_time) or
  ((p1.end_time is null) and (curdate() >= p1.start_time))
)

ie it is correctly selecting only prices where the current date is between the price start and end dates, or where the current date is after the start date and there is no end date set.

One might want to tweak this to:
and ((curdate() >= p1.start_time) and ((p1.end_time is null) or (curdate() < p1.end_time))
so that it better handles the case where a new start date is set today.

However, this code will not select old prices.

Hence two questions:

  1. what release are you running? - I was checking the code for 1.6
  2. are your 'old' prices correctly terminated with an end date.  ie when you added a new price, with a new start date, have you set the end date on the old price to close the old price off?  If you just left it unset, then the report will show both the old and new prices.

Regards, Tim G

Re: Product Price List report

Hi Tim, thanks for your reply. We are running 1.6. I had a look at some of the ones that came up with 2 prices to ensure that we had the end date of the previous price and we have ended the old one and then started with a new price. We are pretty diligent about this as I like to look back and see our previous charges and when they were adjusted.

I thought it may be related to the dates when they were adjusted but for this report we dont have to select a date range.

It is not a common report we run so not a major issue. Thanks Anna

Re: Product Price List report

Ahah - I think I see the problem - in the 1.6 reports folder there are two similar files "product list report.jrxml" and "product price list report.jrxml" - the second has no date check and dumps all.  The first is the one I checked the code for.

Attached is a hack of the first to also display the start & end dates (i have not suppressed the null on the end dates) - so here is a snip from Run 1

I then ended the Basic price and added a new one as shown below:

And here is Run 2

so this report is correctly showing only the latest prices.

Have fun.  Regards, Tim G

AttachmentSize
product list report tg.jrxml 20.59 KB
Syndicate content