Fixes issue 0016049: Months appear in english
authorAdrián Romero <adrianromero@openbravo.com>
Sun, 06 Mar 2011 21:08:57 +0100
changeset 11042 a6e2d070652e
parent 11041 583db6a6f29c
child 11043 6615a4b2a8aa
Fixes issue 0016049: Months appear in english
Fixing database consistency in Oracle
src-db/database/model/functions/C_YEARPERIODS.xml
--- a/src-db/database/model/functions/C_YEARPERIODS.xml	Sun Mar 06 20:27:15 2011 +0100
+++ b/src-db/database/model/functions/C_YEARPERIODS.xml	Sun Mar 06 21:08:57 2011 +0100
@@ -70,7 +70,7 @@
     LOOP
       IF Cur_Parameter.ParameterName = 'AD_LANGUAGE_ID' THEN
         SELECT AD_LANGUAGE INTO v_language FROM AD_LANGUAGE WHERE AD_LANGUAGE_ID = Cur_Parameter.P_String;
-	v_language = COALESCE(v_language, 'en_US');
+        v_language = COALESCE(v_language, 'en_US');
       END IF;
       v_Year_ID:=Cur_Parameter.Record_ID;
     END LOOP; -- Get Parameter
@@ -93,7 +93,7 @@
     WHERE C_Year_ID=v_Year_ID;
     -- Check the format
     DBMS_OUTPUT.PUT_LINE('Checking format') ;
-    v_ResultStr:='Year not numeric: '||v_Year_Str;    
+    v_ResultStr:='Year not numeric: '||v_Year_Str;
     BEGIN
     SELECT TO_NUMBER(v_Year_Str) INTO v_year_num FROM DUAL;
      -- Postgres hack
@@ -137,8 +137,8 @@
             v_NextNo, v_Client_ID, v_Org_ID, 'Y',
             now(), v_User_ID, now(), v_User_ID,
             v_Year_ID, v_MonthNo, TO_DATE(ADD_MONTHS(v_StartDate, v_MonthNo-1)), 'S',
-	        (SELECT SUBSTR(COALESCE(AD_MONTH_TRL.NAME, AD_MONTH.NAME), 1,3) || '-' || SUBSTR(C_YEAR.YEAR,3,2) 
-                 FROM AD_MONTH LEFT OUTER JOIN AD_MONTH_TRL ON AD_MONTH.AD_MONTH_ID = AD_MONTH_TRL.AD_MONTH_ID AND AD_MONTH_TRL.AD_LANGUAGE = v_language, C_YEAR 
+            (SELECT SUBSTR(COALESCE(AD_MONTH_TRL.NAME, AD_MONTH.NAME), 1,3) || '-' || SUBSTR(C_YEAR.YEAR,3,2)
+                 FROM AD_MONTH LEFT OUTER JOIN AD_MONTH_TRL ON AD_MONTH.AD_MONTH_ID = AD_MONTH_TRL.AD_MONTH_ID AND AD_MONTH_TRL.AD_LANGUAGE = v_language, C_YEAR
                  WHERE  TO_NUMBER(AD_MONTH.VALUE) = v_MonthNo
                  AND C_YEAR.C_YEAR_ID = v_Year_ID)
            );