diff options
-rw-r--r-- | LedgerSMB/IC.pm | 11 | ||||
-rw-r--r-- | bin/pos.pl | 11 |
2 files changed, 11 insertions, 11 deletions
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"; } @@ -177,7 +177,9 @@ sub openinvoices { sub edit { $form->{title} = $locale->text('Edit POS Invoice'); - + if (!$form->{nextsub}){ + $form->{nextsub} = 'add'; + } $form->{callback} = "$form->{script}?action=$form->{nextsub}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}"; @@ -817,15 +819,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( |