function print_workorders()
{
- global $path_to_root;
+ global $path_to_root, $SysPrefs;
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$qoh = get_qoh_on_date($myrow2["stock_id"], $myrow2["loc_code"], $date_);
if ($show_qoh && ($myrow2["units_req"] * $myrow["units_issued"] > $qoh) &&
- !sys_prefs::allow_negative_stock())
+ !$SysPrefs->allow_negative_stock())
{
// oops, we don't have enough of one of the component items
$has_marked = true;
$rep->NewLine(1);
$rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);
- $comments = get_comments(26, $i);
+ $comments = get_comments(ST_WORKORDER, $i);
if ($comments && db_num_rows($comments))
{
$rep->NewLine();