Fixes Issue 25319:Acct dimensions aren't copied from invoice to payment & trnxs
authorAtul Gaware <atul.gaware@openbravo.com>
Fri, 24 Jan 2014 23:05:01 +0530
changeset 21880 d1b98da0caed
parent 21879 42d8b6d87b76
child 21881 7b6a2eecd1fa
Fixes Issue 25319:Acct dimensions aren't copied from invoice to payment & trnxs
modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_ACCT_V.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_ACCT_V.xml	Tue Jan 28 14:06:41 2014 +0530
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_ACCT_V.xml	Fri Jan 24 23:05:01 2014 +0530
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_FINACC_TRANSACTION_ACCT_V">
-    <view name="APRM_FINACC_TRANSACTION_ACCT_V"><![CDATA[SELECT fact_acct.fact_acct_id AS fin_finacc_transaction_acct_id, fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.isactive, fact_acct.created, fact_acct.createdby, fact_acct.updated, fact_acct.updatedby, fact_acct.c_acctschema_id, fact_acct.account_id AS c_elementvalue_id, fact_acct.datetrx, fact_acct.dateacct, fact_acct.c_period_id, fact_acct.ad_table_id, fact_acct.record_id AS fin_finacc_transaction_id, fin_finacc_transaction.fin_financial_account_id, fact_acct.gl_category_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.amtsourcedr, fact_acct.amtsourcecr, fact_acct.amtacctdr, fact_acct.amtacctcr, fact_acct.c_uom_id, fact_acct.qty, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.description, fact_acct.a_asset_id, fact_acct.fact_acct_group_id, fact_acct.seqno, fact_acct.factaccttype, fact_acct.docbasetype, fact_acct.acctvalue, fact_acct.acctdescription, fact_acct.c_withholding_id, fin_finacc_transaction.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id FROM fact_acct, fin_finacc_transaction WHERE fact_acct.record_id = fin_finacc_transaction.fin_finacc_transaction_id AND fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17']]></view>
+    <view name="APRM_FINACC_TRANSACTION_ACCT_V"><![CDATA[SELECT fact_acct.fact_acct_id AS fin_finacc_transaction_acct_id, fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.isactive, fact_acct.created, fact_acct.createdby, fact_acct.updated, fact_acct.updatedby, fact_acct.c_acctschema_id, fact_acct.account_id AS c_elementvalue_id, fact_acct.datetrx, fact_acct.dateacct, fact_acct.c_period_id, fact_acct.ad_table_id, fact_acct.record_id AS fin_finacc_transaction_id, fin_finacc_transaction.fin_financial_account_id, fact_acct.gl_category_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.amtsourcedr, fact_acct.amtsourcecr, fact_acct.amtacctdr, fact_acct.amtacctcr, fact_acct.c_uom_id, fact_acct.qty, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.description, fact_acct.a_asset_id, fact_acct.fact_acct_group_id, fact_acct.seqno, fact_acct.factaccttype, fact_acct.docbasetype, fact_acct.acctvalue, fact_acct.acctdescription, fact_acct.c_withholding_id, fin_finacc_transaction.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id, fact_acct.c_costcenter_id FROM fact_acct, fin_finacc_transaction WHERE fact_acct.record_id = fin_finacc_transaction.fin_finacc_transaction_id AND fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17']]></view>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jan 28 14:06:41 2014 +0530
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Fri Jan 24 23:05:01 2014 +0530
@@ -2396,6 +2396,41 @@
 <!--63454E73F07B4C908EB1268C41F5DE8A-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--63454E73F07B4C908EB1268C41F5DE8A--></AD_COLUMN>
 
+<!--670423B76C554A6C957A58F1DA4A6D98--><AD_COLUMN>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_COLUMN_ID><![CDATA[670423B76C554A6C957A58F1DA4A6D98]]></AD_COLUMN_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <NAME><![CDATA[Cost Center]]></NAME>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <DESCRIPTION><![CDATA[Division that adds to the cost of an organization]]></DESCRIPTION>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <HELP><![CDATA[Division that adds to the cost of an organization. Internal structure for cost allocation.]]></HELP>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <COLUMNNAME><![CDATA[C_Costcenter_ID]]></COLUMNNAME>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_TABLE_ID><![CDATA[1BAA61D216CB4A62838AA785658EE092]]></AD_TABLE_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <SEQNO><![CDATA[490]]></SEQNO>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_ELEMENT_ID><![CDATA[BB1B0593596A4F63B2553183B11B0D28]]></AD_ELEMENT_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <POSITION><![CDATA[49]]></POSITION>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--670423B76C554A6C957A58F1DA4A6D98-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--670423B76C554A6C957A58F1DA4A6D98--></AD_COLUMN>
+
 <!--68C853FD393C4620A3947EC34C416B9A--><AD_COLUMN>
 <!--68C853FD393C4620A3947EC34C416B9A-->  <AD_COLUMN_ID><![CDATA[68C853FD393C4620A3947EC34C416B9A]]></AD_COLUMN_ID>
 <!--68C853FD393C4620A3947EC34C416B9A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Jan 28 14:06:41 2014 +0530
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Fri Jan 24 23:05:01 2014 +0530
@@ -2398,7 +2398,9 @@
 <!--2864F0DB02224A748B57719396E4338E-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--2864F0DB02224A748B57719396E4338E-->  <AD_COLUMN_ID><![CDATA[A6B405E9791D4BC685220C11CCA916C0]]></AD_COLUMN_ID>
 <!--2864F0DB02224A748B57719396E4338E-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--2864F0DB02224A748B57719396E4338E-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--2864F0DB02224A748B57719396E4338E-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--2864F0DB02224A748B57719396E4338E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--2864F0DB02224A748B57719396E4338E-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--2864F0DB02224A748B57719396E4338E-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--2864F0DB02224A748B57719396E4338E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--2864F0DB02224A748B57719396E4338E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
@@ -4591,6 +4593,36 @@
 <!--4BBE86A40070422CB644510F93C92F81-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--4BBE86A40070422CB644510F93C92F81--></AD_FIELD>
 
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F--><AD_FIELD>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_FIELD_ID><![CDATA[4BF4CA0C5A5D4D2D945FD2373DD52B4F]]></AD_FIELD_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <NAME><![CDATA[Cost Center]]></NAME>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <DESCRIPTION><![CDATA[Division that adds to the cost of an organization]]></DESCRIPTION>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <HELP><![CDATA[Division that adds to the cost of an organization. Internal structure for cost allocation.]]></HELP>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_COLUMN_ID><![CDATA[670423B76C554A6C957A58F1DA4A6D98]]></AD_COLUMN_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4BF4CA0C5A5D4D2D945FD2373DD52B4F--></AD_FIELD>
+
 <!--4C3D2B4E7CD14390BF20A8FB5474EE32--><AD_FIELD>
 <!--4C3D2B4E7CD14390BF20A8FB5474EE32-->  <AD_FIELD_ID><![CDATA[4C3D2B4E7CD14390BF20A8FB5474EE32]]></AD_FIELD_ID>
 <!--4C3D2B4E7CD14390BF20A8FB5474EE32-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4688,7 +4720,9 @@
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <AD_COLUMN_ID><![CDATA[50D9D2D098E54FB7B5109C4BAA8977A5]]></AD_COLUMN_ID>
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--4CFDE354811341B1923BCD1AA449E1B0-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--4CFDE354811341B1923BCD1AA449E1B0-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--4CFDE354811341B1923BCD1AA449E1B0-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--4CFDE354811341B1923BCD1AA449E1B0-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--4CFDE354811341B1923BCD1AA449E1B0-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
@@ -5521,6 +5555,7 @@
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <AD_COLUMN_ID><![CDATA[1D64AD4366EF4A209F2A462A8DE42735]]></AD_COLUMN_ID>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--576653206CA64C59BF19A53B94AEDBA8-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
@@ -5888,6 +5923,7 @@
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <AD_COLUMN_ID><![CDATA[4B98FCB4357B49DA9DB7D79FD28838AF]]></AD_COLUMN_ID>
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--5E7451300D254B11B582F0FBA8F11D2A-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <DISPLAYLOGIC><![CDATA[@$Element_SR@='Y']]></DISPLAYLOGIC>
 <!--5E7451300D254B11B582F0FBA8F11D2A-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
@@ -11818,6 +11854,7 @@
 <!--970254B3E03D4A009FE4BF179AC61703-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--970254B3E03D4A009FE4BF179AC61703-->  <AD_COLUMN_ID><![CDATA[E6DB13E1516947B7A8DC5741D58A7AB2]]></AD_COLUMN_ID>
 <!--970254B3E03D4A009FE4BF179AC61703-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--970254B3E03D4A009FE4BF179AC61703-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--970254B3E03D4A009FE4BF179AC61703-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--970254B3E03D4A009FE4BF179AC61703-->  <DISPLAYLOGIC><![CDATA[@$Element_MC@='Y']]></DISPLAYLOGIC>
 <!--970254B3E03D4A009FE4BF179AC61703-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
@@ -15411,6 +15448,7 @@
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <AD_COLUMN_ID><![CDATA[806198F4784445109D9067A0C868701C]]></AD_COLUMN_ID>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--B2F1D76CA33240B69A4012D5CA370476-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <DISPLAYLOGIC><![CDATA[@$Element_AS@='Y']]></DISPLAYLOGIC>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
@@ -18871,6 +18909,7 @@
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <AD_COLUMN_ID><![CDATA[528EE4D486444C08A1CE90CAA066BA48]]></AD_COLUMN_ID>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E81BDEBDB5C0448DAECD48AA5857A091-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Tue Jan 28 14:06:41 2014 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Fri Jan 24 23:05:01 2014 +0530
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -256,15 +256,50 @@
         FieldProviderFactory.setField(data[i], "lineno", transaction.getLineNo().toString());
 
         FieldProviderFactory.setField(data[i], "user1Id", paymentDetails.get(i)
-            .getFINPaymentScheduleDetailList().get(0).getStDimension() != null ? paymentDetails
-            .get(i).getFINPaymentScheduleDetailList().get(0).getStDimension().getId() : "");
+            .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getInvoicePaymentSchedule().getInvoice().getStDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+            .getInvoice().getStDimension().getId() : (paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getOrderPaymentSchedule().getOrder().getStDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule().getOrder()
+            .getStDimension().getId() : (paymentDetails.get(i).getFINPaymentScheduleDetailList()
+            .get(0).getStDimension() != null ? paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getStDimension().getId() : "")));
         FieldProviderFactory.setField(data[i], "user2Id", paymentDetails.get(i)
-            .getFINPaymentScheduleDetailList().get(0).getNdDimension() != null ? paymentDetails
-            .get(i).getFINPaymentScheduleDetailList().get(0).getNdDimension().getId() : "");
+            .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getInvoicePaymentSchedule().getInvoice().getNdDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+            .getInvoice().getNdDimension().getId() : (paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getOrderPaymentSchedule().getOrder().getNdDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule().getOrder()
+            .getNdDimension().getId() : (paymentDetails.get(i).getFINPaymentScheduleDetailList()
+            .get(0).getNdDimension() != null ? paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getNdDimension().getId() : "")));
         FieldProviderFactory
-            .setField(data[i], "cCostcenterId", paymentDetails.get(i)
-                .getFINPaymentScheduleDetailList().get(0).getCostCenter() != null ? paymentDetails
-                .get(i).getFINPaymentScheduleDetailList().get(0).getCostCenter().getId() : "");
+            .setField(
+                data[i],
+                "cCostcenterId",
+                paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                    .getInvoicePaymentSchedule() != null
+                    && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                        .getInvoicePaymentSchedule().getInvoice().getCostcenter() != null ? paymentDetails
+                    .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+                    .getInvoice().getCostcenter().getId()
+                    : (paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                        .getOrderPaymentSchedule() != null
+                        && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                            .getOrderPaymentSchedule().getOrder().getCostcenter() != null ? paymentDetails
+                        .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule()
+                        .getOrder().getCostcenter().getId()
+                        : (paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                            .getCostCenter() != null ? paymentDetails.get(i)
+                            .getFINPaymentScheduleDetailList().get(0).getCostCenter().getId() : "")));
 
       }
     } finally {
@@ -731,10 +766,13 @@
     // Total
     retValue = retValue.add(new BigDecimal(getAmount(AcctServer.AMTTYPE_Gross)));
 
-    FIN_Payment payment = OBDal.getInstance().get(FIN_FinaccTransaction.class, Record_ID).getFinPayment();
-    // if payment IN/OUT is in Multi-Currency then get Multi-Currency amount field because FIN_Payment line amount is in that currency.
+    FIN_Payment payment = OBDal.getInstance().get(FIN_FinaccTransaction.class, Record_ID)
+        .getFinPayment();
+    // if payment IN/OUT is in Multi-Currency then get Multi-Currency amount field because
+    // FIN_Payment line amount is in that currency.
     if (payment != null) {
-      if (!payment.getAccount().getCurrency().getId().equalsIgnoreCase(payment.getCurrency().getId())) {
+      if (!payment.getAccount().getCurrency().getId()
+          .equalsIgnoreCase(payment.getCurrency().getId())) {
         retValue = payment.getAmount();
       }
     }
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Tue Jan 28 14:06:41 2014 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Fri Jan 24 23:05:01 2014 +0530
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -217,16 +217,51 @@
             .getFINPaymentScheduleDetailList().get(0).getSalesRegion() != null ? paymentDetails
             .get(i).getFINPaymentScheduleDetailList().get(0).getSalesRegion().getId() : "");
         FieldProviderFactory
-            .setField(data[i], "cCostcenterId", paymentDetails.get(i)
-                .getFINPaymentScheduleDetailList().get(0).getCostCenter() != null ? paymentDetails
-                .get(i).getFINPaymentScheduleDetailList().get(0).getCostCenter().getId() : "");
+            .setField(
+                data[i],
+                "cCostcenterId",
+                paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                    .getInvoicePaymentSchedule() != null
+                    && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                        .getInvoicePaymentSchedule().getInvoice().getCostcenter() != null ? paymentDetails
+                    .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+                    .getInvoice().getCostcenter().getId()
+                    : (paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                        .getOrderPaymentSchedule() != null
+                        && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                            .getOrderPaymentSchedule().getOrder().getCostcenter() != null ? paymentDetails
+                        .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule()
+                        .getOrder().getCostcenter().getId()
+                        : (paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                            .getCostCenter() != null ? paymentDetails.get(i)
+                            .getFINPaymentScheduleDetailList().get(0).getCostCenter().getId() : "")));
 
         FieldProviderFactory.setField(data[i], "user1Id", paymentDetails.get(i)
-            .getFINPaymentScheduleDetailList().get(0).getStDimension() != null ? paymentDetails
-            .get(i).getFINPaymentScheduleDetailList().get(0).getStDimension().getId() : "");
+            .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getInvoicePaymentSchedule().getInvoice().getStDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+            .getInvoice().getStDimension().getId() : (paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getOrderPaymentSchedule().getOrder().getStDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule().getOrder()
+            .getStDimension().getId() : (paymentDetails.get(i).getFINPaymentScheduleDetailList()
+            .get(0).getStDimension() != null ? paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getStDimension().getId() : "")));
         FieldProviderFactory.setField(data[i], "user2Id", paymentDetails.get(i)
-            .getFINPaymentScheduleDetailList().get(0).getNdDimension() != null ? paymentDetails
-            .get(i).getFINPaymentScheduleDetailList().get(0).getNdDimension().getId() : "");
+            .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getInvoicePaymentSchedule().getInvoice().getNdDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+            .getInvoice().getNdDimension().getId() : (paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule() != null
+            && paymentDetails.get(i).getFINPaymentScheduleDetailList().get(0)
+                .getOrderPaymentSchedule().getOrder().getNdDimension() != null ? paymentDetails
+            .get(i).getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule().getOrder()
+            .getNdDimension().getId() : (paymentDetails.get(i).getFINPaymentScheduleDetailList()
+            .get(0).getNdDimension() != null ? paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList().get(0).getNdDimension().getId() : "")));
 
       }
     } finally {