RE: Stock adjustment improvement needed
Need to think a bit more ... Off the top of my head - if we add a field to stock moves this creates waste on every other stockmove record - and it's a big table so need to be careful not to bloat by mistake.
Perhaps we add a stockadjustments reasons table that links to the stockmoves table id so we only create records for the stockadjustments - needs to be done for stock checks too.
We also need a new table with the reasons - which will need a new form to define the reasons.
CREATE TABLE stockadjustmentreasons (
reasonid,
reasondescription
);
Then the new table of
CREATE TABLE stockadjustreasonglpostings (
reasonid,
loccode,
categoryid,
accountcode
PRIMARY_KEY(reasonid,loccode,categoryid));
We will also need to create a form for input of these as per COGSGLPostings.php or SalesGLPostings.php
Also a new function in SQL_CommonFunctions.inc to
GetStockAdjustmentGLCode (reasonid, loccode, categoryid)
so we can just modify as little as possible of the existing adjustment/stock check scripts
Sorry logged in as testing - but this is Phil :-)
|