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

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



Revision: 5680
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5680&view=rev
Author:   einhverfr
Date:     2013-03-10 10:02:27 +0000 (Sun, 10 Mar 2013)
Log Message:
-----------
tentative fix for onhand numbers not handled properly in invoicing process when ship numbers directly entered into order entry screen

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/IR.pm
    trunk/LedgerSMB/IS.pm
    trunk/LedgerSMB/OE.pm

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-03-10 09:24:52 UTC (rev 5679)
+++ trunk/Changelog	2013-03-10 10:02:27 UTC (rev 5680)
@@ -86,6 +86,7 @@
 * Removed spurious commit saving orders (Chris T)
 * Removed check for reversing too many sales, since this poses problems 
   in corner cases with no good solutions (Chris T)
+* R5680-1, (tentatively) fixes to shipping/invoice onhand numbers (Chris T)
 
 Changelog for 1.3.30
 * Documented behavior of Outstanding Summary report (Chris T, 3601314)

Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm	2013-03-10 09:24:52 UTC (rev 5679)
+++ trunk/LedgerSMB/IR.pm	2013-03-10 10:02:27 UTC (rev 5680)
@@ -426,8 +426,8 @@
                 # update parts table
                 $form->update_balance( $dbh, "parts", "onhand",
                     qq|id = $form->{"id_$i"}|,
-                    $form->{"qty_$i"} )
-                  unless $form->{shipped};
+                    $form->{"qty_$i"} );
+                 # unless $form->{shipped};
 
             }
             else {

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2013-03-10 09:24:52 UTC (rev 5679)
+++ trunk/LedgerSMB/IS.pm	2013-03-10 10:02:27 UTC (rev 5680)
@@ -1194,7 +1194,7 @@
                             $dbh, "parts", "onhand",
                             qq|id = | . qq|$form->{"id_$i"}|,
                             $form->{"qty_$i"} * -1
-                        ) unless $form->{shipped};
+                        ); # unless $form->{shipped};
                     }
 
                     &process_assembly( $dbh, $form, $form->{"id_$i"},
@@ -1205,7 +1205,7 @@
                         $dbh, "parts", "onhand",
                         qq|id = $form->{"id_$i"}|,
                         $form->{"qty_$i"} * -1
-                    ) unless $form->{shipped};
+                    ); # unless $form->{shipped};
 
                 }
             }

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2013-03-10 09:24:52 UTC (rev 5679)
+++ trunk/LedgerSMB/OE.pm	2013-03-10 10:02:27 UTC (rev 5680)
@@ -1734,11 +1734,17 @@
             $sth2->finish;
 
             # update onhand for parts
-            $form->update_balance(
-                $dbh, "parts", "onhand",
-                qq|id = $form->{"id_$i"}|,
-                $form->{"ship_$i"} * $ml
-            );
+            # REMOVING THIS
+            #
+            # This leads to corner cases regarding inventory not being adjusted
+            # correctly.  Going to look at how to provide a report which shows
+            # inventory shipping/recieving numbers  for adjusting inventory 
+            # instead. --CT
+            # $form->update_balance(
+            #    $dbh, "parts", "onhand",
+            #    qq|id = $form->{"id_$i"}|,
+            #    $form->{"ship_$i"} * $ml
+            # );
 
         }
     }

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