Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why use field glcode in purchdetails table?
04-24-2018, 07:44 PM
Post: #1
Why use field glcode in purchdetails table?
Hi all:

Why are we using the field glcode in table purchdetails when receiving goods to assign the value of goods received into the stock GL account, instead of using the stock GL code of the inventory category of the item?

I found out that some items had the stock value wrongly assigned when receiving. It turns out that some items change their inventory category during its lifetime so, they had a category A with GLcode GLA, then (for business reasons) category changed to B with GLCode GLB before reception.
At reception time, stock gets assigned to the old category GLA account.

The code is quite clear and there must be an accounting reason for this, but I can't find it. Why couldn't we use directly the GL assigned to the stock category of the item?



P.S.: We use stockcategory to control cycle of life of the items, having stock categories: test, stable, discounted, etc... so all the items pass though some stock categories during its life.

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
04-24-2018, 08:21 PM
Post: #2
RE: Why use field glcode in purchdetails table?
Hi Ricard, how are you?

I think the idea was that once the order was made, that the details pertaining to that item/supplier/order should remain fixed, which does make sense in most environments, though I can see how it wouldn't with the way you use stock categories. Not sure what to suggest though, as changing it would be a big change in policy, that vI am not sure I would be in favour of.

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-25-2018, 01:24 AM
Post: #3
RE: Why use field glcode in purchdetails table?
Hi Tim:
My point is that I detected this behaviour (or bug, depending on POV) as everytime we received goods from PO's some stock valuation get unbalanced compared against the Balance Sheer (as we keep different stock GL accounts for different stock categories).

Let's imagine we have just a PO for one item. In the case mentioned on the initial post, stock gets assigned to GL account A but once sold stock value gets deducted from GL Account B, which is wrong accounting :-(

I understand my case could be not a general case, and the code to change is very easy (just grab the glcode from stockcategories instead of using teh one from purchorderdetails) around line 725 on GoodsReceived.php, but I would like to know the rationale behind the standard webERP system, so I do not create a worst collateral damage somewhere.

In my case it does not work, and after some years chasing it (on and off) I could finally locate it ;-) If stock category remain constant for any stockid during its lifetime, then there is no problem.

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
04-25-2018, 07:05 AM
Post: #4
RE: Why use field glcode in purchdetails table?
Hi Ricard, well I think the rationale was as I said to maintain the consistency from the order through to invoice. However reading your post I do see the problem, and I for one would have no problem with that change being put in.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-27-2018, 11:21 AM
Post: #5
RE: Why use field glcode in purchdetails table?
This looks like a bug to me.... However, changes in stock category stock gl codes could easily cause such differences also - not sure how we could nail that down.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
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: 1 Guest(s)