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

SF.net SVN: ledger-smb:[5653] branches/1.3



Revision: 5653
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5653&view=rev
Author:   einhverfr
Date:     2013-02-08 04:01:38 +0000 (Fri, 08 Feb 2013)
Log Message:
-----------
Fixing history report blank where no fx records exist, 3602084

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/sql/modules/Company.sql

Property Changed:
----------------
    branches/1.3/Changelog

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-02-08 03:59:50 UTC (rev 5652)
+++ branches/1.3/Changelog	2013-02-08 04:01:38 UTC (rev 5653)
@@ -9,6 +9,7 @@
 * Fixed vendor cash account link not respected in payment interface (Chris T)
 * Updated INSTALL with "Actions for Fedora 18" (Havard S)
 * Fixed print and save buttons on orders (Chris T, 3602071)
+* Fixing history report blank when no fx (Chris T, 3602084)
 
 Chris T is Chris Travers
 Havard S is Havard Sorli


Property changes on: branches/1.3/Changelog
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/Changelog:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5513,5515,5519,5524,5529,5548,5563,5565,5578-5579,5581,5583,5587,5590,5593,5595,5597,5608,5610,5612,5615,5617,5620,5622,5626,5633-5634,5649-5650
   + /trunk/Changelog:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5513,5515,5519,5524,5529,5548,5563,5565,5578-5579,5581,5583,5587,5590,5593,5595,5597,5608,5610,5612,5615,5617,5620,5622,5626,5633-5634,5649-5650,5652

Modified: branches/1.3/sql/modules/Company.sql
===================================================================
--- branches/1.3/sql/modules/Company.sql	2013-02-08 03:59:50 UTC (rev 5652)
+++ branches/1.3/sql/modules/Company.sql	2013-02-08 04:01:38 UTC (rev 5653)
@@ -80,7 +80,7 @@
             i.description, i.qty, i.unit::text, i.sellprice, i.discount, 
             i.deliverydate, pr.id as project_id, pr.projectnumber,
             i.serialnumber, 
-            case when $16 = 1 then xr.buy else xr.sell end as exchange_rate,
+            case when $16 = 1 THEN xr.buy else xr.sell end as exchange_rate,
             ee.id as salesperson_id, 
             ep.last_name || ', ' || ep.first_name as salesperson_name
      FROM (select * from entity_credit_account 
@@ -118,7 +118,7 @@
            select quonumber, curr, transdate, entity_credit_account, id,
                   person_id
            from oe 
-           where($16= 1 and oe.oe_class_id = 4 and $13 = 'q'
+           where($16= 1 and oe.oe_class_id = 3 and $13 = 'q'
                 and quotation is true)
                   and (($17 and not closed) or ($18 and closed))
            union 
@@ -139,11 +139,10 @@
              FROM orderitems where $13 <> 'i'
           ) i on i.trans_id = a.id
      JOIN parts p ON (p.id = i.parts_id)
-LEFT JOIN exchangerate ex ON (ex.transdate = a.transdate)
 LEFT JOIN project pr ON (pr.id = i.project_id)
 LEFT JOIN entity ee ON (a.person_id = ee.id)
 LEFT JOIN person ep ON (ep.entity_id = ee.id)
-     JOIN exchangerate xr ON a.transdate = xr.transdate
+LEFT JOIN exchangerate xr ON a.transdate = xr.transdate
     -- these filters don't perform as well on large databases
     WHERE (e.name ilike '%' || $1 || '%' or $1 is null)
           and ($3 is null or eca.id in 

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