details:   https://code.openbravo.com/erp/devel/pi/rev/e1f39d8fd8c2
changeset: 20181:e1f39d8fd8c2
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Apr 19 15:01:29 2013 +0200
summary:   Fixed bug 23593

details:   https://code.openbravo.com/erp/devel/pi/rev/51ad74e87865
changeset: 20182:51ad74e87865
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Mon Apr 22 13:21:47 2013 +0200
summary:   Related to issue 23593

diffstat:

 
src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton_data.xsql
 |  18 +++++++++-
 src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java           
             |   4 +-
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 423380e4f7ea -r 51ad74e87865 
src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton_data.xsql
--- 
a/src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton_data.xsql
       Tue Apr 23 12:52:24 2013 +0200
+++ 
b/src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton_data.xsql
       Mon Apr 22 13:21:47 2013 +0200
@@ -34,7 +34,7 @@
         SELECT count(*) as exist
         FROM DUAL
         WHERE EXISTS (SELECT 1 FROM ad_preference
-                      WHERE attribute = 'Period_Open_Close_Button_is_Updated')
+                      WHERE attribute = 'Period_Open_Close_Button_is_Updated' 
and attribute='updateTypeForDivideUp')
       ]]>
     </Sql>
   </SqlMethod>
@@ -89,4 +89,20 @@
       ]]>
     </Sql>
   </SqlMethod>
+    <SqlMethod name="createPreference" type="preparedStatement" 
return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        INSERT INTO ad_preference (
+          ad_preference_id, ad_client_id, ad_org_id, isactive,
+          createdby, created, updatedby, updated,
+          attribute, value
+        ) VALUES (
+          get_uuid(), '0', '0', 'Y',
+          '0', NOW(), '0', NOW(),
+          'updateTypeForDivideUp', 'Y'
+        )
+      ]]>
+    </Sql>
+  </SqlMethod>
 </SqlClass>
diff -r 423380e4f7ea -r 51ad74e87865 
src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java
--- a/src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java      
Tue Apr 23 12:52:24 2013 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java      
Mon Apr 22 13:21:47 2013 +0200
@@ -284,7 +284,7 @@
                 EndYearCloseUtilityData.cCurrencyId(conn, strAcctSchema), "0",
                 
ExpenseAmtCr.add(RevenueAmtCr).subtract(RevenueAmtDr).subtract(ExpenseAmtDr)
                     .toString(), "0", 
ExpenseAmtCr.add(RevenueAmtCr).subtract(RevenueAmtDr)
-                    .subtract(ExpenseAmtDr).toString(), strDivideUpId, "10", 
"C", account[0].name,
+                    .subtract(ExpenseAmtDr).toString(), strDivideUpId, "10", 
"D", account[0].name,
                 account[0].value, account[0].cBpartnerId, account[0].recordId2,
                 account[0].mProductId, account[0].aAssetId, strClosingEntry, 
account[0].cTaxId,
                 account[0].cProjectId, account[0].cActivityId, 
account[0].user1Id,
@@ -298,7 +298,7 @@
                 EndYearCloseUtilityData.cCurrencyId(conn, strAcctSchema),
                 
ExpenseAmtCr.add(RevenueAmtCr).subtract(RevenueAmtDr).subtract(ExpenseAmtDr)
                     .toString(), "0", 
ExpenseAmtCr.add(RevenueAmtCr).subtract(RevenueAmtDr)
-                    .subtract(ExpenseAmtDr).toString(), "0", strDivideUpId, 
"10", "C",
+                    .subtract(ExpenseAmtDr).toString(), "0", strDivideUpId, 
"10", "D",
                 account2[0].name, account2[0].value, account2[0].cBpartnerId,
                 account2[0].recordId2, account2[0].mProductId, 
account2[0].aAssetId,
                 strClosingEntry, account2[0].cTaxId, account2[0].cProjectId,

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to