+ $args = func_get_args();
+ $args = (object)array_combine(array('wo_ref', 'loc_code', 'units_reqd', 'stock_id',
+ 'type', 'date_', 'memo_', 'costs', 'cr_acc', 'labour', 'cr_lab_acc'), $args);
+ $args->woid = 0;
+ hook_db_prewrite($args, ST_WORKORDER);