Topic: import multiple items adjustment

Hi,
I am wanting to import multiple items adjustment in the DB.
So, i looked how /inventory/adjustments.php?NewAdjustment=1&application=stock works.

I understand that:
1. Adjustments are recorded in the table 0_stock_moves.
2. The value of material_cost in 0_stock_master is updated to give an average value of the item cost.

However, there is 2 fields in the table 0_stock_moves which i am not sure about:

> person_id: I see it is a tinyblob. My feeling is that , this is user type of doing the request, but I am not sure. Especially some entries has a value of 0 so for sure it is not the user_id.

> trans_no: This seems to be an incremental value mapped with the stock_id, right ?

Also, is there any other tables except from 0_stock_master and 0_stock_moves that are impacted from item adjustment ?

Tx for your help

Maurice

Re: import multiple items adjustment

DavidMaurice wrote:

Also, is there any other tables except from 0_stock_master and 0_stock_moves that are impacted from item adjustment ?

Yes, adjusting the stock also generates some GL entries which are probably tricky to generate manually. I wouldn't recommend
adjusting the stock directly in the DB.

You can use the text cart module to do "bulk" adjustment (from a spreadsheet for example), even though it's has to be manual.

/Elax

Re: import multiple items adjustment

any reason why person_id is a tinyblob?

Re: import multiple items adjustment

it think the person_id is the supplier id. i was looking at the sql_audit table and the only table has person id that was queried was the supplier table.  I'm not really certain about this.

for the trans_no it is the incremental value mapped with the trans_no by type.

5 (edited by apmuthu 01/03/2015 07:56:11 pm)

Re: import multiple items adjustment

This is now evident from the ERD at the Wiki.

Those who want to make the change can apply the following with the appropriate table prefix for each company:

ALTER TABLE `0_bank_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;
ALTER TABLE `0_budget_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;
ALTER TABLE `0_gl_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;