-function dec_amount($row, $amount)
-{
- return number_format2($amount, $row['decimals']);
-}
-
-$sql = "SELECT
- workorder.id,
- workorder.wo_ref,
- workorder.type,
- location.location_name,
- item.description,
- workorder.units_reqd,
- workorder.units_issued,
- workorder.date_,
- workorder.required_by,
- workorder.released_date,
- workorder.closed,
- workorder.released,
- workorder.stock_id,
- unit.decimals
- FROM ".TB_PREF."workorders as workorder,"
- .TB_PREF."stock_master as item,"
- .TB_PREF."item_units as unit,"
- .TB_PREF."locations as location
- WHERE workorder.stock_id=item.stock_id
- AND workorder.loc_code=location.loc_code
- AND item.units=unit.abbr";
-
-if (check_value('OpenOnly') || $outstanding_only != 0)