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

SF.net SVN: ledger-smb: [2038] trunk/LedgerSMB/OE.pm



Revision: 2038
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2038&view=rev
Author:   einhverfr
Date:     2008-01-11 21:10:42 -0800 (Fri, 11 Jan 2008)

Log Message:
-----------
Merging fix for 10825463

Modified Paths:
--------------
    trunk/LedgerSMB/OE.pm

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2008-01-12 04:54:45 UTC (rev 2037)
+++ trunk/LedgerSMB/OE.pm	2008-01-12 05:10:42 UTC (rev 2038)
@@ -2028,8 +2028,8 @@
     my @a = ( partnumber, warehouse );
     my $sortorder = $form->sort_order( ..hidden.., \%ordinal );
 
-    if ($fromwarehouse_id) {
-        if ($towarehouse_id) {
+    if ($fromwarehouse_id ne 'NULL') {
+        if ($towarehouse_id ne 'NULL') {
             $where .= "
 				AND NOT i.warehouse_id = $towarehouse_id";
         }
@@ -2041,8 +2041,9 @@
 			FROM inventory i
 			JOIN parts p ON (p.id = i.parts_id)
 			LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
-			JOIN warehouse w ON (w.id = i.warehouse_id)
-			WHERE i.warehouse_id = $fromwarehouse_id
+			LEFT JOIN warehouse w ON (w.id = i.warehouse_id)
+			WHERE (i.warehouse_id = $fromwarehouse_id OR 
+				i.warehouse_id IS NULL))
 			$where
 			GROUP BY p.id, p.partnumber, p.description, 
 				pg.partsgroup, w.description, i.warehouse_id 
@@ -2074,7 +2075,7 @@
 			FROM inventory i
 			JOIN parts p ON (p.id = i.parts_id)
 			LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
-			JOIN warehouse w ON (w.id = i.warehouse_id)
+			LEFT JOIN warehouse w ON (w.id = i.warehouse_id)
 			WHERE i.warehouse_id != $towarehouse_id
 				$where
 			GROUP BY p.id, p.partnumber, p.description, 


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