How To: Create a Report listing Stock Creation Dates
To produce a report featuring all stock items, including the dates they were created and the user who created them, copy, paste and run the following SQL in the Report section of Khaos Control;
select sk.stock_code, ast.event_time, ul.user_name from stock as sk inner join audit_stock as ast on sk.stock_id = ast.stock_id inner join user_list as ul on ul.user_id = ast.user_id inner join stock_option as sko on ast.stock_id = sko.stock_id where ast.event_type = 2 and sko.discontinued = 0