summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/IC.pm11
-rwxr-xr-xbin/pos.pl7
2 files changed, 8 insertions, 10 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";
}
diff --git a/bin/pos.pl b/bin/pos.pl
index 873e2a24..66e6e93f 100755
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -808,15 +808,10 @@ sub display_row {
}
}
- if ( $i < $numrows ) {
- $column_data{discount} =
+ $column_data{discount} =
qq|<td align="right"><input name="discount_$i" size="3" value="|
. $form->format_amount( \%myconfig, $form->{"discount_$i"} )
. qq|"></td>|;
- }
- else {
- $column_data{discount} = qq|<td></td>|;
- }
$discount =
$form->round_amount(