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

SF.net SVN: ledger-smb:[6255] addons/1.3/wxPOS/setup/functions.sql



Revision: 6255
          http://sourceforge.net/p/ledger-smb/code/6255
Author:   einhverfr
Date:     2013-11-08 05:13:33 +0000 (Fri, 08 Nov 2013)
Log Message:
-----------
Handling temporary sales properly

Modified Paths:
--------------
    addons/1.3/wxPOS/setup/functions.sql

Modified: addons/1.3/wxPOS/setup/functions.sql
===================================================================
--- addons/1.3/wxPOS/setup/functions.sql	2013-11-08 05:10:36 UTC (rev 6254)
+++ addons/1.3/wxPOS/setup/functions.sql	2013-11-08 05:13:33 UTC (rev 6255)
@@ -57,9 +57,10 @@
        (validfrom is null OR validfrom >= now()) AND
        (validto IS NULL OR validto <= now())
 UNION ALL
-SELECT p.parts_id, p.credit_id, p.pricebreak, p.sellprice
+SELECT p.parts_id, c.id, p.pricebreak, p.sellprice
   FROM partscustomer p
- WHERE credit_id is null and pricegroup_id is null AND
+  JOIN entity_credit_account c ON (c.entity_class = 1)
+ WHERE credit_id is null and p.pricegroup_id is null AND
        (validfrom is null OR validfrom >= now()) AND
        (validto IS NULL OR validto <= now())
 UNION ALL

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


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits