details:   https://code.openbravo.com/erp/devel/pi/rev/6c1c82b172f4
changeset: 19408:6c1c82b172f4
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Wed Jan 23 18:16:09 2013 +0100
summary:   Fixes issue 22440: It is possible to process an internal consumption 
without lines

diffstat:

 src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml |  10 
+++++++++
 src-db/database/sourcedata/AD_MESSAGE.xml                        |  11 
++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r 1cd5ddac3977 -r 6c1c82b172f4 
src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml
--- a/src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml  Wed Jan 
23 17:58:40 2013 +0100
+++ b/src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml  Wed Jan 
23 18:16:09 2013 +0100
@@ -104,6 +104,16 @@
   IF (v_Count <> 0) THEN
     RAISE_APPLICATION_ERROR(-20000, '@Inline@'||' '||v_line||' 
'||'@productWithoutAttributeSet@') ;
   END IF;
+
+  --Checking if the Internal consumption has lines
+  SELECT count(*)
+  INTO v_Count
+  FROM M_Internal_ConsumptionLine
+  WHERE M_Internal_Consumption_ID=Record_ID;
+  IF (v_Count = 0) THEN
+    RAISE_APPLICATION_ERROR(-20000, '@InternalConsuptionNoLines@') ;
+  END IF;
+  
   IF (v_action IN ('CO')) THEN
     /**
     * Complete action: Create records on m_transaction and update status
diff -r 1cd5ddac3977 -r 6c1c82b172f4 src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Wed Jan 23 17:58:40 2013 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Wed Jan 23 18:16:09 2013 +0100
@@ -16243,6 +16243,17 @@
 <!--36DE1B1B3A8643C38DA099FD57D00235-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--36DE1B1B3A8643C38DA099FD57D00235--></AD_MESSAGE>
 
+<!--36DEFB2B2AC7469B80B2873B3A907B33--><AD_MESSAGE>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  
<AD_MESSAGE_ID><![CDATA[36DEFB2B2AC7469B80B2873B3A907B33]]></AD_MESSAGE_ID>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  
<VALUE><![CDATA[InternalConsuptionNoLines]]></VALUE>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  <MSGTEXT><![CDATA[It is not possible 
to process an Internal Consuption without line.]]></MSGTEXT>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--36DEFB2B2AC7469B80B2873B3A907B33-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--36DEFB2B2AC7469B80B2873B3A907B33--></AD_MESSAGE>
+
 <!--37B25D3CE4344D7CA0E2452CEE985BAF--><AD_MESSAGE>
 <!--37B25D3CE4344D7CA0E2452CEE985BAF-->  
<AD_MESSAGE_ID><![CDATA[37B25D3CE4344D7CA0E2452CEE985BAF]]></AD_MESSAGE_ID>
 <!--37B25D3CE4344D7CA0E2452CEE985BAF-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to