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

SF.net SVN: ledger-smb: [46] trunk/LedgerSMB



Revision: 46
          http://svn.sourceforge.net/ledger-smb/?rev=46&view=rev
Author:   einhverfr
Date:     2006-09-09 00:48:09 -0700 (Sat, 09 Sep 2006)

Log Message:
-----------
Fixed every known issue with OID's.

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

Modified: trunk/LedgerSMB/IC.pm
===================================================================
--- trunk/LedgerSMB/IC.pm	2006-09-09 07:33:54 UTC (rev 45)
+++ trunk/LedgerSMB/IC.pm	2006-09-09 07:48:09 UTC (rev 46)
@@ -63,7 +63,7 @@
 		JOIN assembly a ON (a.parts_id = p.id)
 		LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
 		WHERE a.id = $form->{id}
-		ORDER BY $oid{$myconfig->{dbdriver}}|;
+    |;
 
     $sth = $dbh->prepare($query);
     $sth->execute || $form->dberror($query);
@@ -1390,7 +1390,7 @@
 
   my @a = qw(partnumber description bin);
   if ($form->{sort} eq 'partnumber') {
-    $sortorder = "$oid{$myconfig->{dbdriver}}";
+    $sortorder = "TRUE";
   } else {
     @a = grep !/$form->{sort}/, @a;
     $sortorder = "$form->{sort} $form->{direction}, ". join ',', @a;

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2006-09-09 07:33:54 UTC (rev 45)
+++ trunk/LedgerSMB/IS.pm	2006-09-09 07:48:09 UTC (rev 46)
@@ -451,9 +451,7 @@
   my $sortorder = "";
 
   if ($form->{grouppartsgroup}) {
-    $sortorder = qq|ORDER BY pg.partsgroup, a.$oid|;
-  } else {
-    $sortorder = qq|ORDER BY a.$oid|;
+    $sortorder = qq|ORDER BY pg.partsgroup|;
   }
   
   my $query = qq|SELECT p.partnumber, p.description, p.unit, a.qty,

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2006-09-09 07:33:54 UTC (rev 45)
+++ trunk/LedgerSMB/OE.pm	2006-09-09 07:48:09 UTC (rev 46)
@@ -626,7 +626,7 @@
     $sth->finish;
     for (qw(printed emailed queued)) { $form->{$_} =~ s/ +$//g }
 
-    my %oid = ( 'Pg'		=> 'TRUE',
+    my %oid = ( 'Pg'		=> 'id',
                 'Oracle'	=> 'rowid',
 		'DB2'		=> '1=1'
 	      );
@@ -1607,8 +1607,8 @@
 sub adj_inventory {
   my ($dbh, $myconfig, $form) = @_;
 
-  my %oid = ( 'Pg'	=> 'TRUE',
-              'PgPP'	=> 'TRUE',
+  my %oid = ( 'Pg'	=> 'id',
+              'PgPP'	=> 'id',
               'Oracle'	=> 'rowid',
 	      'DB2'	=> '1=1'
 	    );
@@ -1620,7 +1620,7 @@
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
-  $query = qq|SELECT $oid{$myconfig->{dbdriver}} AS oid, qty,
+  $query = qq|SELECT qty,
                      (SELECT SUM(qty) FROM inventory
                       WHERE trans_id = $form->{id}
 		      AND orderitems_id = ?) AS total


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