details: /erp/stable/2.50/rev/ea8bd3fe2b96
changeset: 9315:ea8bd3fe2b96
user: Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
date: Tue Mar 29 13:44:48 2011 +0200
summary: Fixes bug 16401. Documents are not posted when the period is closed
for their organization.
details: /erp/stable/2.50/rev/1a7a7e2579ec
changeset: 9316:1a7a7e2579ec
user: Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
date: Tue Mar 29 13:51:20 2011 +0200
summary: Fixes issue 16348. Account date in GL Journal Line deprecated
details: /erp/stable/2.50/rev/3432182e4a73
changeset: 9317:3432182e4a73
user: Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
date: Wed Mar 30 12:38:44 2011 +0200
summary: Fixes Issue 16469. Payments set to automatically generated in
c_invoice_post
diffstat:
src-db/database/model/functions/C_INVOICE_POST.xml | 6 +++-
src-db/database/model/tables/GL_JOURNALLINE.xml | 2 +-
src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml | 3 +-
src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml | 9 +++++--
src-db/database/sourcedata/AD_COLUMN.xml | 2 +-
src-db/database/sourcedata/AD_FIELD.xml | 4 +-
src/org/openbravo/erpCommon/ad_forms/AcctServer.java | 4 +-
src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql | 12 ++++------
8 files changed, 22 insertions(+), 20 deletions(-)
diffs (168 lines):
diff -r 69ce984d369b -r 3432182e4a73
src-db/database/model/functions/C_INVOICE_POST.xml
--- a/src-db/database/model/functions/C_INVOICE_POST.xml Fri Apr 01
08:13:24 2011 +0200
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml Wed Mar 30
12:38:44 2011 +0200
@@ -1540,7 +1540,8 @@
C_BANKACCOUNT_ID, C_CASHBOOK_ID, PAYMENTRULE, ISPAID,
AMOUNT, WRITEOFFAMT, DATEPLANNED, ISMANUAL,
ISVALID, C_BANKSTATEMENTLINE_ID, CHANGESETTLEMENTCANCEL,
CANCEL_PROCESSED,
- GENERATE_PROCESSED, c_project_id, status, status_initial,
withholdingamount,C_WITHHOLDING_ID
+ GENERATE_PROCESSED, ISAUTOMATICGENERATED, c_project_id,
status, status_initial,
+ withholdingamount,C_WITHHOLDING_ID
)
VALUES
(
@@ -1551,7 +1552,8 @@
v_bankAccount, v_cashBook, CUR_PAYMENTS.PaymentRule, 'N',
C_Currency_Round((v_paymentamount *v_multiplierarc)
-withholdamount *(v_paymentamount *v_multiplierarc / v_grandtotal),
v_Currency_ID, NULL), 0, v_plannedDate, 'N',
'Y', NULL, 'N', 'N',
- 'N', v_C_Project_Id, 'DE', 'DE',
C_Currency_Round(withholdamount *(v_paymentamount *v_multiplierarc /
v_grandtotal), v_Currency_ID, NULL),cWithHoldId
+ 'N','Y', v_C_Project_Id, 'DE', 'DE',
+ C_Currency_Round(withholdamount *(v_paymentamount
*v_multiplierarc / v_grandtotal), v_Currency_ID, NULL),cWithHoldId
);
END IF;
--AL
diff -r 69ce984d369b -r 3432182e4a73
src-db/database/model/tables/GL_JOURNALLINE.xml
--- a/src-db/database/model/tables/GL_JOURNALLINE.xml Fri Apr 01 08:13:24
2011 +0200
+++ b/src-db/database/model/tables/GL_JOURNALLINE.xml Wed Mar 30 12:38:44
2011 +0200
@@ -69,7 +69,7 @@
<default><![CDATA[0]]></default>
<onCreateDefault/>
</column>
- <column name="DATEACCT" primaryKey="false" required="true"
type="TIMESTAMP" size="7" autoIncrement="false">
+ <column name="DATEACCT" primaryKey="false" required="false"
type="TIMESTAMP" size="7" autoIncrement="false">
<default/>
<onCreateDefault/>
</column>
diff -r 69ce984d369b -r 3432182e4a73
src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml
--- a/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml Fri Apr
01 08:13:24 2011 +0200
+++ b/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml Wed Mar
30 12:38:44 2011 +0200
@@ -61,8 +61,7 @@
END IF;
IF(v_Posted='Y'
- AND ((COALESCE(:old.DATEACCT, v_DateNull) <> COALESCE(:new.DATEACCT,
v_DateNull))
- OR(COALESCE(:old.C_VALIDCOMBINATION_ID, '0') <>
COALESCE(:new.C_VALIDCOMBINATION_ID, '0'))
+ AND ((COALESCE(:old.C_VALIDCOMBINATION_ID, '0') <>
COALESCE(:new.C_VALIDCOMBINATION_ID, '0'))
OR(COALESCE(:old.AMTACCTDR, 0) <> COALESCE(:new.AMTACCTDR, 0))
OR(COALESCE(:old.AMTACCTCR, 0) <> COALESCE(:new.AMTACCTCR, 0)))) THEN
RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted') ;
diff -r 69ce984d369b -r 3432182e4a73
src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml
--- a/src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml Fri Apr 01
08:13:24 2011 +0200
+++ b/src-db/database/model/triggers/GL_JOURNALLINE2_TRG.xml Wed Mar 30
12:38:44 2011 +0200
@@ -28,6 +28,7 @@
v_rate NUMBER;
v_CurrencyRate NUMBER;
v_CurrencyRateType VARCHAR(60) ;
+ v_DateAcct DATE;
BEGIN
@@ -42,10 +43,12 @@
END IF;
SELECT C_AcctSchema_ID,
CurrencyRate,
- COALESCE(CurrencyRateType, 'S')
+ COALESCE(CurrencyRateType, 'S'),
+ dateacct
INTO v_AcctSchema_ID,
v_CurrencyRate,
- v_CurrencyRateType
+ v_CurrencyRateType,
+ v_DateAcct
FROM GL_Journal
WHERE GL_Journal_ID=:NEW.GL_Journal_ID;
SELECT COALESCE(MAX(c.C_Currency_ID), '0'),
@@ -56,7 +59,7 @@
C_Currency c
WHERE a.C_Currency_ID=c.C_Currency_ID
AND a.C_AcctSchema_ID=v_AcctSchema_ID;
- v_rate:=C_CURRENCY_RATE(:NEW.C_Currency_ID, v_TargetCurrency_ID,
:NEW.DateAcct, v_CurrencyRateType, :NEW.AD_CLIENT_ID, :NEW.AD_ORG_ID) ;
+ v_rate:=C_CURRENCY_RATE(:NEW.C_Currency_ID, v_TargetCurrency_ID, v_DateAcct,
v_CurrencyRateType, :NEW.AD_CLIENT_ID, :NEW.AD_ORG_ID) ;
IF(v_rate IS NULL) THEN
v_rate:=v_CurrencyRate;
END IF;
diff -r 69ce984d369b -r 3432182e4a73 src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml Fri Apr 01 08:13:24 2011 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml Wed Mar 30 12:38:44 2011 +0200
@@ -35635,7 +35635,7 @@
<!--2336--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
<!--2336--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
<!--2336--> <AD_CALLOUT_ID><![CDATA[133]]></AD_CALLOUT_ID>
-<!--2336--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--2336--> <DEVELOPMENTSTATUS><![CDATA[DP]]></DEVELOPMENTSTATUS>
<!--2336--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
<!--2336--> <POSITION><![CDATA[18]]></POSITION>
<!--2336--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
diff -r 69ce984d369b -r 3432182e4a73 src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml Fri Apr 01 08:13:24 2011 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml Wed Mar 30 12:38:44 2011 +0200
@@ -15396,7 +15396,7 @@
<!--1293--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
<!--1293--> <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
<!--1293--> <AD_COLUMN_ID><![CDATA[2336]]></AD_COLUMN_ID>
-<!--1293--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1293--> <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
<!--1293-->
<DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@$C_Currency_ID@]]></DISPLAYLOGIC>
<!--1293--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
<!--1293--> <ISREADONLY><![CDATA[N]]></ISREADONLY>
@@ -15404,7 +15404,7 @@
<!--1293--> <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
<!--1293--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
<!--1293--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--1293--> <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--1293--> <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
<!--1293--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
<!--1293--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
<!--1293--></AD_FIELD>
diff -r 69ce984d369b -r 3432182e4a73
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer.java Fri Apr 01
08:13:24 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer.java Wed Mar 30
12:38:44 2011 +0200
@@ -11,7 +11,7 @@
* Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2009 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2011 Openbravo S.L.U.
******************************************************************************
*/
package org.openbravo.erpCommon.ad_forms;
@@ -1752,7 +1752,7 @@
} else if (strStatus.equals(STATUS_InvalidAccount))
strMessage = "@InvalidAccount@";
else if (strStatus.equals(STATUS_PeriodClosed))
- strMessage = "@PeriodClosed@";
+ strMessage = "@PeriodNotAvailable@";
else if (strStatus.equals(STATUS_NotConvertible))
strMessage = "@NotConvertible@";
else if (strStatus.equals(STATUS_NotBalanced))
diff -r 69ce984d369b -r 3432182e4a73
src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql Fri Apr 01
08:13:24 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql Wed Mar 30
12:38:44 2011 +0200
@@ -12,7 +12,7 @@
* Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2009 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2011 Openbravo S.L.U.
******************************************************************************
-->
@@ -149,14 +149,12 @@
<Sql>
<![CDATA[
select max(c_period.c_period_id) as period
- from c_year, c_period, c_periodcontrol, ad_org
- where c_year.c_year_id = c_period.c_year_id
- and c_period.c_period_id = c_periodcontrol.c_period_id
- and c_year.c_calendar_id = ad_org.c_calendar_id
- and ad_org.ad_client_id = ?
+ from c_period, c_periodcontrol
+ where c_period.c_period_id = c_periodcontrol.c_period_id
+ and c_period.ad_client_id = ?
and c_periodcontrol.docbasetype = ?
and c_periodcontrol.periodstatus = 'O'
- and ad_org.ad_org_id = ad_org_getcalendarowner(?)
+ and c_periodcontrol.ad_org_id = ad_org_getcalendarowner(?)
and to_date(?) >= c_period.StartDate
and to_date(?) < c_period.EndDate + 1
]]>
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits