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

SF.net SVN: ledger-smb:[5814] trunk/sql/modules



Revision: 5814
          http://sourceforge.net/p/ledger-smb/code/5814
Author:   ehuelsmann
Date:     2013-05-17 06:48:19 +0000 (Fri, 17 May 2013)
Log Message:
-----------
More fixes for loading issues identified by Chris Calef on PostgreSQL 9.1.

Modified Paths:
--------------
    trunk/sql/modules/Inventory_Report.sql
    trunk/sql/modules/Transaction_Templates.sql

Modified: trunk/sql/modules/Inventory_Report.sql
===================================================================
--- trunk/sql/modules/Inventory_Report.sql	2013-05-17 05:28:16 UTC (rev 5813)
+++ trunk/sql/modules/Inventory_Report.sql	2013-05-17 06:48:19 UTC (rev 5814)
@@ -50,7 +50,7 @@
    SELECT r.id, r.transdate, r.source, r.ar_trans_id, r.ap_trans_id,
           ar.invnumber, ap.invnumber
      FROM inventory_report r
-     JOIN inventory_report_line l ON l.report_id = r.id 
+     JOIN inventory_report_line l ON l.adjust_id = r.id 
 LEFT JOIN ar ON ar.id = r.ar_trans_id
 LEFT JOIN ap ON ap.id = r.ap_trans_id
     WHERE r.id = $1;
@@ -65,7 +65,7 @@
           l.counted - l.expected
      FROM inventory_report_line l
      JOIN parts p ON l.parts_id = p.id
-    WHERE l.report_id = $1;
+    WHERE l.adjust_id = $1;
 
 $$ language sql;
 

Modified: trunk/sql/modules/Transaction_Templates.sql
===================================================================
--- trunk/sql/modules/Transaction_Templates.sql	2013-05-17 05:28:16 UTC (rev 5813)
+++ trunk/sql/modules/Transaction_Templates.sql	2013-05-17 06:48:19 UTC (rev 5814)
@@ -103,7 +103,7 @@
 			e.name, ec.class, 
                         coalesce(
                           r.startdate + r.recurring_interval,
-                          j.transaction_date);
+                          j.transaction_date)
 		FROM journal_entry j
 		LEFT JOIN eca_invoice i ON (i.journal_id = j.id)
 		LEFT JOIN entity_credit_account eca ON (eca.id = credit_id)

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