details:   https://code.openbravo.com/erp/devel/pi/rev/bb0e53075e6c
changeset: 17754:bb0e53075e6c
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Thu Aug 23 14:31:02 2012 +0200
summary:   Fixes issue 21149: With the G/L Category ES Standard you could not 
process a tax payment

diffstat:

 src-db/database/model/functions/C_TAXPAYMENT_POST.xml |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r b71a7f9c8a25 -r bb0e53075e6c 
src-db/database/model/functions/C_TAXPAYMENT_POST.xml
--- a/src-db/database/model/functions/C_TAXPAYMENT_POST.xml     Thu Aug 23 
14:24:46 2012 +0200
+++ b/src-db/database/model/functions/C_TAXPAYMENT_POST.xml     Thu Aug 23 
14:31:02 2012 +0200
@@ -138,16 +138,20 @@
 
       select count(*) 
       into v_gl_category_count
-      from gl_category where name='Standard'
-      AND ad_isorgincluded(v_org_id, gl_category.ad_org_id, v_client_id)<>-1
-      AND gl_category.ad_client_id = v_client_id;
+      from gl_category 
+      where ad_isorgincluded(v_org_id, gl_category.ad_org_id, v_client_id)<>-1
+      AND gl_category.ad_client_id = v_client_id
+      and gl_category.categorytype = 'M';
 
       if (v_gl_category_count>0) then
           select max(gl_category_id)
           into v_gl_category_id
-          from gl_category where name='Standard'
-          AND ad_isorgincluded(v_org_id, gl_category.ad_org_id, 
v_client_id)<>-1
-          AND gl_category.ad_client_id = v_client_id;
+          from    (select gl_category_id
+                 from gl_category 
+                 where gl_category.categorytype = 'M'
+                 AND ad_isorgincluded(v_org_id, gl_category.ad_org_id, 
v_client_id)<>-1
+                 AND gl_category.ad_client_id = v_client_id
+                 order by isdefault desc) tmp;
       else
           RAISE_APPLICATION_ERROR(-20000, '@OrgForStandardGLCategory@');
       end if;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to