diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-01-12 05:10:42 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-01-12 05:10:42 +0000 |
commit | ba966358f4b3f5cbe0f0ecc5136445024f7b5a37 (patch) | |
tree | a3b0f67e790432936161b6cd491706a896392f93 | |
parent | c0cce01de4a4b285921059056e1d124ddb28a42f (diff) |
Merging fix for 10825463
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2038 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/OE.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/LedgerSMB/OE.pm b/LedgerSMB/OE.pm index 36e21b36..c542913e 100644 --- a/LedgerSMB/OE.pm +++ b/LedgerSMB/OE.pm @@ -2028,8 +2028,8 @@ sub get_inventory { my @a = ( partnumber, warehouse ); my $sortorder = $form->sort_order( \@a, \%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 @@ sub get_inventory { 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 @@ sub get_inventory { 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, |