From 5a3cbfe6d2df1c8c32edcab8bf93e8a8432a15fc Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 10 Oct 2018 16:03:24 +0200 Subject: [PATCH] [0004216] Print Work Orders: database error fixed when voided WO is in selected range. --- reporting/includes/reports_classes.inc | 3 ++- reporting/rep409.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index 1b9694d3..56148d70 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -408,7 +408,8 @@ class BoxReports case 'WORKORDER': $sql = "SELECT wo.id, concat(wo.id, '-', item.description) as IName FROM ".TB_PREF."stock_master item," - .TB_PREF."workorders wo + .TB_PREF."workorders wo + LEFT JOIN ".TB_PREF."voided v ON wo.id=v.id and v.type=".ST_WORKORDER." WHERE item.stock_id=wo.stock_id ORDER BY wo.id DESC"; return combo_input($name, '', $sql, 'id', 'IName',array('order'=>false)); diff --git a/reporting/rep409.php b/reporting/rep409.php index 8ad60606..6f453834 100644 --- a/reporting/rep409.php +++ b/reporting/rep409.php @@ -62,7 +62,7 @@ function print_workorders() for ($i = $from; $i <= $to; $i++) { - $myrow = get_work_order($i); + $myrow = get_work_order($i, true); if ($myrow === false) continue; if ($email == 1) -- 2.30.2