Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Aged Controlled Inventory - Bad Age?
02-13-2018, 09:24 AM (This post was last modified: 02-13-2018 09:27 AM by VortecCPI.)
Post: #1
Aged Controlled Inventory - Bad Age?
AgedControlledInventory.php

This report is showing data based upon oldest stock but I think it should be showing data based upon newest stock (latest received - FIFO).

   

I used MAX(stockmoves.trandate) AS trandate to fix if for our case.

   

Note Age was not using newest stock.

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2018, 12:08 PM (This post was last modified: 02-13-2018 12:15 PM by TurboPT.)
Post: #2
RE: Aged Controlled Inventory - Bad Age?
Instead of MAX, would adding:

Code:
trandate DESC

To the end of the ORDER BY clause make any difference?
Find all posts by this user
Quote this message in a reply
02-13-2018, 10:33 PM
Post: #3
RE: Aged Controlled Inventory - Bad Age?
Not in this case. For FIFO I need to use MAX(). Perhaps a drop-down so the user can choose ALL / FIFO / LIFO?

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-14-2018, 03:12 AM
Post: #4
RE: Aged Controlled Inventory - Bad Age?
This is not the answer to the problem as I just issued stock and now it shows today's date.

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-14-2018, 08:40 PM
Post: #5
RE: Aged Controlled Inventory - Bad Age?
As I recall the aim of this inquiry was to show all batches, with the age of each batch, so as to see at a glance whether you had old batches that needed to be used or obsoleted. However a quick look at it seems to show that isn't working properly.

I like Paul's idea of having the LIFO/FIFO/All option, and maybe we should include an option to show only batches where the expiration date has been breeched, or is about to be breeched?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
02-14-2018, 11:08 PM (This post was last modified: 02-14-2018 11:45 PM by VortecCPI.)
Post: #6
RE: Aged Controlled Inventory - Bad Age?
In the mean time I added UoM to the table.

When we first started with webERP we noticed a few places where UoM was not shown so we added it to our stock description. In my opinion this is bad practice so having it shown in as many tables as possible is a good thing. In my opinion any time we show stick we should show its associated UoM.
I believe my issue is due to receipt of inventory with the same Lot/Batch number on two occasions. The first receipt has come and gone (old age) and the remainder of the last receipt (new age) is still in the warehouse. The report is showing the age/date for the first receipt instead of the last receipt.

Perhaps I have a very odd case here? Below is table data:

   


Attached File(s)
.php  AgedControlledInventory.php (Size: 3.43 KB / Downloads: 1)

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-15-2018, 05:10 AM
Post: #7
RE: Aged Controlled Inventory - Bad Age?
(02-14-2018 08:40 PM)falkoner Wrote:  As I recall the aim of this inquiry was to show all batches, with the age of each batch, so as to see at a glance whether you had old batches that needed to be used or obsoleted. However a quick look at it seems to show that isn't working properly.

I like Paul's idea of having the LIFO/FIFO/All option, and maybe we should include an option to show only batches where the expiration date has been breeched, or is about to be breeched?

Tim
Those ideas sound good to me too.
Find all posts by this user
Quote this message in a reply
02-15-2018, 05:15 AM
Post: #8
RE: Aged Controlled Inventory - Bad Age?
Paul, in the code changes (I can't cross-check with sourceforge at the moment, 503 error says repositories are down -- been most of the day), and SVN is not giving me a diff to the previous version.

Adding the units pieces are ok.

But is the createdate replacements with using trandate intentional? ... as I see that createdate is to be removed from the SQL as well.
Find all posts by this user
Quote this message in a reply
02-15-2018, 05:22 AM (This post was last modified: 02-15-2018 05:29 AM by VortecCPI.)
Post: #9
RE: Aged Controlled Inventory - Bad Age?
Paul,

We are using 4.14.1 for production so I didn't check the version in SVN.

I will do it right now...

PB
No can do as our schema is old and does not have createdate.
Right now we can not afford the time to move all the data over to the SVN version.

This is the problem with mixing bug fixes with new features in the main Trunk...

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
02-15-2018, 05:32 AM
Post: #10
RE: Aged Controlled Inventory - Bad Age?
(02-15-2018 05:22 AM)VortecCPI Wrote:  This is the problem with mixing bug fixes with new features in the main Trunk...

Couldn't agree more. I never did understand why we stopped having the stable branch. I have tried hard to find someone to maintain one.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: