date_row(_("Date:"), 'AdjDate', '', true);
table_section(2, "50%");
- ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_INVADJUST));
+
+ ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_INVADJUST, null, array('location'=>get_post('StockLocation'), 'date'=>get_post('AdjDate'))),
+ false, ST_INVADJUST);
end_outer_table(1); // outer table
}