[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [2037] branches/1.2/LedgerSMB/OE.pm
- Subject: SF.net SVN: ledger-smb: [2037] branches/1.2/LedgerSMB/OE.pm
- From: ..hidden..
- Date: Fri, 11 Jan 2008 20:54:46 -0800
Revision: 2037
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2037&view=rev
Author: einhverfr
Date: 2008-01-11 20:54:45 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Correcting bug 1835463, cannot transfer to warehouses
Modified Paths:
--------------
branches/1.2/LedgerSMB/OE.pm
Modified: branches/1.2/LedgerSMB/OE.pm
===================================================================
--- branches/1.2/LedgerSMB/OE.pm 2008-01-10 23:00:37 UTC (rev 2036)
+++ branches/1.2/LedgerSMB/OE.pm 2008-01-12 04:54:45 UTC (rev 2037)
@@ -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.