[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1829] trunk



Revision: 1829
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1829&view=rev
Author:   einhverfr
Date:     2007-10-30 22:30:57 -0700 (Tue, 30 Oct 2007)

Log Message:
-----------
1)  Fixing bug which hides discount input in POS screen.
2)  Fixing bug:  Obsolete items show on short parts report

Modified Paths:
--------------
    trunk/LedgerSMB/IC.pm
    trunk/bin/pos.pl

Modified: trunk/LedgerSMB/IC.pm
===================================================================
--- trunk/LedgerSMB/IC.pm	2007-10-31 05:29:32 UTC (rev 1828)
+++ trunk/LedgerSMB/IC.pm	2007-10-31 05:30:57 UTC (rev 1829)
@@ -1002,16 +1002,19 @@
 			                        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";
     }
 

Modified: trunk/bin/pos.pl
===================================================================
--- trunk/bin/pos.pl	2007-10-31 05:29:32 UTC (rev 1828)
+++ trunk/bin/pos.pl	2007-10-31 05:30:57 UTC (rev 1829)
@@ -177,7 +177,9 @@
 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 @@
             }
         }
 
-        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(


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.