details:   https://code.openbravo.com/erp/devel/pi/rev/d68ebd3dd2fd
changeset: 16611:d68ebd3dd2fd
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Mon May 21 10:15:31 2012 +0200
summary:   Fixes issue 20333: You can change product in m_inoutline with a 
related order.
Possible mismatch between the product at Goods Shipment Line and Sales Order 
Line.

details:   https://code.openbravo.com/erp/devel/pi/rev/457c64b25786
changeset: 16612:457c64b25786
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Tue May 22 11:50:50 2012 +0200
summary:   Fixes issue 20377:'Export Budget to Excel' exports period 
incorrectly.

details:   https://code.openbravo.com/erp/devel/pi/rev/5d862719708d
changeset: 16613:5d862719708d
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Thu May 17 18:36:17 2012 +0200
summary:   Fixes issue 20433: Detail of a Journal Entry without description.

diffstat:

 src-db/database/model/triggers/M_INOUTLINE_TRG.xml                         |  
10 +++++++++
 src-db/database/sourcedata/AD_MESSAGE.xml                                  |  
11 ++++++++++
 src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java          |   
5 +++-
 src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel_data.xsql |  
10 ++++++++-
 4 files changed, 34 insertions(+), 2 deletions(-)

diffs (91 lines):

diff -r 724835aeebaf -r 5d862719708d 
src-db/database/model/triggers/M_INOUTLINE_TRG.xml
--- a/src-db/database/model/triggers/M_INOUTLINE_TRG.xml        Wed May 23 
19:56:50 2012 +0200
+++ b/src-db/database/model/triggers/M_INOUTLINE_TRG.xml        Thu May 17 
18:36:17 2012 +0200
@@ -20,6 +20,7 @@
   V_COUNT  NUMBER;
   v_ISSOTRX CHAR(1);
   v_QTYVARIABLE CHAR(1);
+  v_OrderProduct VARCHAR2(32);
 /******************************************************************************
  * The contents of this file are subject to the   Compiere License  Version 1.1
  * ("License"); You may not use this file except in compliance with the License
@@ -164,6 +165,15 @@
    END IF;
  END IF;
 
+
+ -- Do not allow different product than the one in the related orderline.
+ IF ((UPDATING OR INSERTING) AND :new.C_OrderLine_ID is not null) THEN
+   SELECT m_product_id INTO v_OrderProduct FROM C_OrderLine WHERE 
C_OrderLine_ID = :new.C_OrderLine_ID;
+   IF (v_OrderProduct <> :new.M_Product_ID) THEN
+     RAISE_APPLICATION_ERROR(-20000, '@ProductDefinedByOrder@');
+   END IF;
+ END IF;
+
  
  -- UPDATING inventory
  IF (UPDATING OR DELETING) THEN
diff -r 724835aeebaf -r 5d862719708d src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Wed May 23 19:56:50 2012 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Thu May 17 18:36:17 2012 +0200
@@ -17621,6 +17621,17 @@
 <!--81B47DEBF9E94A369C4629562A90A2B2-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--81B47DEBF9E94A369C4629562A90A2B2--></AD_MESSAGE>
 
+<!--825C7E7D7B8B4303BBE710B0D8FF2541--><AD_MESSAGE>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  
<AD_MESSAGE_ID><![CDATA[825C7E7D7B8B4303BBE710B0D8FF2541]]></AD_MESSAGE_ID>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  
<VALUE><![CDATA[ProductDefinedByOrder]]></VALUE>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  <MSGTEXT><![CDATA[The change of the 
product is not allowed because there is a related order and the change of the 
product would create a mismach in the relation.]]></MSGTEXT>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--825C7E7D7B8B4303BBE710B0D8FF2541--></AD_MESSAGE>
+
 <!--82C113B8F4134B57A4791BAC35B03ADC--><AD_MESSAGE>
 <!--82C113B8F4134B57A4791BAC35B03ADC-->  
<AD_MESSAGE_ID><![CDATA[82C113B8F4134B57A4791BAC35B03ADC]]></AD_MESSAGE_ID>
 <!--82C113B8F4134B57A4791BAC35B03ADC-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 724835aeebaf -r 5d862719708d 
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Wed May 
23 19:56:50 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Thu May 
17 18:36:17 2012 +0200
@@ -524,8 +524,11 @@
           isReceipt ? convertedAmount.toString() : "", Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
           DocumentType, conn);
     }
+    DocLine_FINFinAccTransaction line = new 
DocLine_FINFinAccTransaction(DocumentType,
+        transaction.getId(), "");
+    line.m_description = transaction.getFinPayment().getDescription();
     fact.createLine(
-        null,
+        line,
         getAccountUponDepositWithdrawal(conn, 
transaction.getFinPayment().getPaymentMethod(),
             transaction.getAccount(), as, 
transaction.getFinPayment().isReceipt()), C_Currency_ID,
         transaction.getDepositAmount().toString(), 
transaction.getPaymentAmount().toString(),
diff -r 724835aeebaf -r 5d862719708d 
src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel_data.xsql
--- 
a/src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel_data.xsql    
    Wed May 23 19:56:50 2012 +0200
+++ 
b/src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel_data.xsql    
    Thu May 17 18:36:17 2012 +0200
@@ -75,7 +75,14 @@
                      SELECT PERIODNO           
                      FROM C_PERIOD           
                      WHERE C_PERIOD.C_PERIOD_ID=B.C_PERIOD_ID)        ), 
TO_CHAR(?)      
-                   ) END AS MONTH,    
+                   )  || ' ' ||
+            AD_COLUMN_IDENTIFIER('C_YEAR', (        
+            SELECT TO_CHAR(C_YEAR_ID)         
+            FROM C_YEAR WHERE C_YEAR_ID = (          
+              SELECT C_YEAR_ID           
+              FROM C_PERIOD           
+              WHERE C_PERIOD.C_PERIOD_ID=B.C_PERIOD_ID)        ), TO_CHAR(?)   
   
+            ) END AS MONTH,    
                  C_BUDGET.EXPORTACTUAL,
                  CASE WHEN C_BUDGET.EXPORTACTUAL = 'Y' THEN        (        
                    SELECT CASE WHEN E.ACCOUNTSIGN='C' THEN 
SUM(AMTACCTCR-AMTACCTDR) ELSE SUM(AMTACCTDR-AMTACCTCR) END AS AMOUNT        
@@ -118,6 +125,7 @@
      <Parameter name="adLanguage"/>
      <Parameter name="adLanguage"/>
      <Parameter name="adLanguage"/>
+     <Parameter name="adLanguage"/>
      <Parameter name="cbudgetid"/>
   </SqlMethod>
   <SqlMethod name="set" type="constant" return="multiple">

------------------------------------------------------------------------------
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