From 50976eed0c12a2cb45944d0818b63a7c65885afb Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 31 Oct 2007 05:30:57 +0000 Subject: 1) Fixing bug which hides discount input in POS screen. 2) Fixing bug: Obsolete items show on short parts report git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1829 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/IC.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'LedgerSMB/IC.pm') diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm index 2f06891b..1f016394 100644 --- a/LedgerSMB/IC.pm +++ b/LedgerSMB/IC.pm @@ -1002,16 +1002,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"; } -- cgit v1.2.3