diff options
Diffstat (limited to 'LedgerSMB/IC.pm')
-rwxr-xr-x | LedgerSMB/IC.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm index 175393c7..4a98f8a4 100755 --- a/LedgerSMB/IC.pm +++ b/LedgerSMB/IC.pm @@ -1003,16 +1003,19 @@ sub all_parts { ON (p.id = j.parts_id))|; } - if ( $form->{itemstatus} eq 'active' ) { - $where .= " AND p.obsolete = '0'"; - } if ( $form->{itemstatus} eq 'obsolete' ) { $where .= " AND p.obsolete = '1'"; } + else { + # Obsolete items should not show up on onhand, short, or active + # reports --CT + $where .= " AND p.obsolete = '0'"; + } + if ( $form->{itemstatus} eq 'onhand' ) { $where .= " AND p.onhand > 0"; } - if ( $form->{itemstatus} eq 'short' ) { + elsif ( $form->{itemstatus} eq 'short' ) { $where .= " AND p.onhand < p.rop"; } |