[Managerial] Fixes issue 22353: Adds posibility to create
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 22 Nov 2012 16:27:44 +0100
changeset 18902 bd1f03290ef5
parent 18901 ecc8f647df7a
child 18903 360b26736f9e
[Managerial] Fixes issue 22353: Adds posibility to create
a Payment from Journal Lines.
modules/org.openbravo.advpaymentmngt/src-db/database/model/modifiedTables/GL_JOURNALLINE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournalLine.java
src-db/database/model/tables/GL_JOURNALLINE.xml
src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml
src-db/database/sourcedata/AD_AUXILIARINPUT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/modifiedTables/GL_JOURNALLINE.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+  <database name="MODIFIED TABLE GL_JOURNALLINE">
+    <table name="GL_JOURNALLINE" primaryKey="GL_JOURNALENTRY_KEY">
+      <column name="EM_APRM_ADDPAYMENT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+    </table>
+  </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -8174,6 +8174,43 @@
 <!--DD5C635F60EF4CA6BD8395F81E8466AD-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--DD5C635F60EF4CA6BD8395F81E8466AD--></AD_COLUMN>
 
+<!--E206BFA90CC94498B257BC65C516B9C5--><AD_COLUMN>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <NAME><![CDATA[EM_APRM_Add Payment]]></NAME>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DESCRIPTION><![CDATA[Add Payment button.]]></DESCRIPTION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <HELP><![CDATA[Launches a process to add a payment to the selected invoice.]]></HELP>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <COLUMNNAME><![CDATA[EM_Aprm_Addpayment]]></COLUMNNAME>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <SEQNO><![CDATA[131]]></SEQNO>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_ELEMENT_ID><![CDATA[78A3787B4823C096E040007F0101250E]]></AD_ELEMENT_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[35]]></POSITION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--E206BFA90CC94498B257BC65C516B9C5--></AD_COLUMN>
+
 <!--E3E69DDF3725407BABA84827647EF002--><AD_COLUMN>
 <!--E3E69DDF3725407BABA84827647EF002-->  <AD_COLUMN_ID><![CDATA[E3E69DDF3725407BABA84827647EF002]]></AD_COLUMN_ID>
 <!--E3E69DDF3725407BABA84827647EF002-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -166,6 +166,8 @@
 <!--78A3787B4823C096E040007F0101250E-->  <PRINTNAME><![CDATA[Add Payment]]></PRINTNAME>
 <!--78A3787B4823C096E040007F0101250E-->  <DESCRIPTION><![CDATA[Add Payment button.]]></DESCRIPTION>
 <!--78A3787B4823C096E040007F0101250E-->  <HELP><![CDATA[Launches a process to add a payment to the selected invoice.]]></HELP>
+<!--78A3787B4823C096E040007F0101250E-->  <PO_NAME><![CDATA[Add Payment]]></PO_NAME>
+<!--78A3787B4823C096E040007F0101250E-->  <PO_PRINTNAME><![CDATA[Add Payment]]></PO_PRINTNAME>
 <!--78A3787B4823C096E040007F0101250E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--78A3787B4823C096E040007F0101250E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--78A3787B4823C096E040007F0101250E--></AD_ELEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -782,6 +782,36 @@
 <!--1106ED7C155243B38D6B1EC8E44B75B2-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--1106ED7C155243B38D6B1EC8E44B75B2--></AD_FIELD>
 
+<!--110FB2A04E69473784A8478D0BD8B3FB--><AD_FIELD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_FIELD_ID><![CDATA[110FB2A04E69473784A8478D0BD8B3FB]]></AD_FIELD_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <NAME><![CDATA[Add Payment]]></NAME>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DESCRIPTION><![CDATA[Add Payment From Journal Line]]></DESCRIPTION>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <HELP><![CDATA[Process to add new Payments from the G/L Journal Lines.]]></HELP>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='']]></DISPLAYLOGIC>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <SEQNO><![CDATA[240]]></SEQNO>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--110FB2A04E69473784A8478D0BD8B3FB--></AD_FIELD>
+
 <!--1186723500D044EBBDB20410F8E0FED8--><AD_FIELD>
 <!--1186723500D044EBBDB20410F8E0FED8-->  <AD_FIELD_ID><![CDATA[1186723500D044EBBDB20410F8E0FED8]]></AD_FIELD_ID>
 <!--1186723500D044EBBDB20410F8E0FED8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -180,6 +180,18 @@
 <!--DF09705B3D7F4756A1E741FB3E73B825-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--DF09705B3D7F4756A1E741FB3E73B825--></AD_MODEL_OBJECT>
 
+<!--E711C538D5414BC6AABC2281BEA2F738--><AD_MODEL_OBJECT>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_MODEL_OBJECT_ID><![CDATA[E711C538D5414BC6AABC2281BEA2F738]]></AD_MODEL_OBJECT_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ACTION><![CDATA[P]]></ACTION>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.FIN_AddPaymentFromJournalLine]]></CLASSNAME>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--E711C538D5414BC6AABC2281BEA2F738--></AD_MODEL_OBJECT>
+
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE--><AD_MODEL_OBJECT>
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE-->  <AD_MODEL_OBJECT_ID><![CDATA[E7D054B44F5848B6B6FC5923EBA4E1DE]]></AD_MODEL_OBJECT_ID>
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -318,6 +318,27 @@
 <!--DC23BB9234174E52879E4B21C8CD1F4B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--DC23BB9234174E52879E4B21C8CD1F4B--></AD_PROCESS>
 
+<!--DE1B382FDD2540199D223586F6E216D0--><AD_PROCESS>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <VALUE><![CDATA[FIN_AddPaymentFromJournalLine]]></VALUE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <NAME><![CDATA[Add Payment From Journal Line]]></NAME>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <DESCRIPTION><![CDATA[Add Payment From Journal Line]]></DESCRIPTION>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <HELP><![CDATA[Process to add new Payments from the G/L Journal Lines.]]></HELP>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--DE1B382FDD2540199D223586F6E216D0--></AD_PROCESS>
+
 <!--E011F492B0814A74B63CD1F3B9FF0526--><AD_PROCESS>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <AD_PROCESS_ID><![CDATA[E011F492B0814A74B63CD1F3B9FF0526]]></AD_PROCESS_ID>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -1,5 +1,26 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--173E22F30A234210BE895DBB291AE971--><AD_PROCESS_PARA>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_PARA_ID><![CDATA[173E22F30A234210BE895DBB291AE971]]></AD_PROCESS_PARA_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--173E22F30A234210BE895DBB291AE971-->  <NAME><![CDATA[Payment Method]]></NAME>
+<!--173E22F30A234210BE895DBB291AE971-->  <DESCRIPTION><![CDATA[It is the method by which payment is expected to be made or received.]]></DESCRIPTION>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_VALUE_ID><![CDATA[EED0EF97D4A7421687F3B365D009E7A6]]></AD_REFERENCE_VALUE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <COLUMNNAME><![CDATA[fin_paymentmethod_id]]></COLUMNNAME>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--173E22F30A234210BE895DBB291AE971-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--173E22F30A234210BE895DBB291AE971-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@) > 0) THEN fin_paymentmethod_id ELSE po_paymentmethod_id END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_ELEMENT_ID><![CDATA[7DC34559B411B45BE040007F0100784A]]></AD_ELEMENT_ID>
+<!--173E22F30A234210BE895DBB291AE971--></AD_PROCESS_PARA>
+
 <!--1913962D2952412B84B8CDD3BC17026F--><AD_PROCESS_PARA>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_PROCESS_PARA_ID><![CDATA[1913962D2952412B84B8CDD3BC17026F]]></AD_PROCESS_PARA_ID>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21,6 +42,26 @@
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_ELEMENT_ID><![CDATA[454]]></AD_ELEMENT_ID>
 <!--1913962D2952412B84B8CDD3BC17026F--></AD_PROCESS_PARA>
 
+<!--28734F2240554E628433520DBFA0A75A--><AD_PROCESS_PARA>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_PARA_ID><![CDATA[28734F2240554E628433520DBFA0A75A]]></AD_PROCESS_PARA_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--28734F2240554E628433520DBFA0A75A-->  <NAME><![CDATA[Date]]></NAME>
+<!--28734F2240554E628433520DBFA0A75A-->  <DESCRIPTION><![CDATA[Date]]></DESCRIPTION>
+<!--28734F2240554E628433520DBFA0A75A-->  <HELP><![CDATA[Date]]></HELP>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <COLUMNNAME><![CDATA[Date]]></COLUMNNAME>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--28734F2240554E628433520DBFA0A75A-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--28734F2240554E628433520DBFA0A75A-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_ELEMENT_ID><![CDATA[17ADA898A5534B858EC8BD7651492088]]></AD_ELEMENT_ID>
+<!--28734F2240554E628433520DBFA0A75A--></AD_PROCESS_PARA>
+
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--><AD_PROCESS_PARA>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_PROCESS_PARA_ID><![CDATA[4F5EE1017087464EAD95F3CCA4C5AFA5]]></AD_PROCESS_PARA_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -42,6 +83,28 @@
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_ELEMENT_ID><![CDATA[208]]></AD_ELEMENT_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--></AD_PROCESS_PARA>
 
+<!--65B5C8CA308F46988BDE3E31BC1D78C8--><AD_PROCESS_PARA>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_PARA_ID><![CDATA[65B5C8CA308F46988BDE3E31BC1D78C8]]></AD_PROCESS_PARA_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <NAME><![CDATA[Business Partner]]></NAME>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DESCRIPTION><![CDATA[Anyone who takes part in daily business operations by acting as a customer, employee, etc.]]></DESCRIPTION>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <HELP><![CDATA[A Business Partner is anyone with whom you transact.  This can include a customer, vendor, employee or any combination of these.]]></HELP>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_VALUE_ID><![CDATA[138]]></AD_REFERENCE_VALUE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_VAL_RULE_ID><![CDATA[E491153CCBEE49A1842A7CC8544929DD]]></AD_VAL_RULE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <COLUMNNAME><![CDATA[c_bpartner_para_id]]></COLUMNNAME>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DEFAULTVALUE><![CDATA[@C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ELEMENT_ID><![CDATA[187]]></AD_ELEMENT_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8--></AD_PROCESS_PARA>
+
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8--><AD_PROCESS_PARA>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_PROCESS_PARA_ID><![CDATA[6EEE4A4DB1BA476BA7929EC7FCF285F8]]></AD_PROCESS_PARA_ID>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -207,6 +270,49 @@
 <!--D04309BB0DA14B5789FB76C141ED464C-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
 <!--D04309BB0DA14B5789FB76C141ED464C--></AD_PROCESS_PARA>
 
+<!--D2D748A3C65F4976B4461635A04EFA5F--><AD_PROCESS_PARA>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_PARA_ID><![CDATA[D2D748A3C65F4976B4461635A04EFA5F]]></AD_PROCESS_PARA_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <NAME><![CDATA[Financial Account]]></NAME>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_VALUE_ID><![CDATA[DF1CEA94B3564A33AFDB37C07E1CE353]]></AD_REFERENCE_VALUE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_VAL_RULE_ID><![CDATA[4DB5167147F24078A1FD39DC7564B48D]]></AD_VAL_RULE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <COLUMNNAME><![CDATA[fin_financial_account_id]]></COLUMNNAME>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN ((TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@)) > 0) THEN fin_financial_account_id ELSE po_financial_account_id END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ELEMENT_ID><![CDATA[7891269C840C655DE040007F010155CE]]></AD_ELEMENT_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F--></AD_PROCESS_PARA>
+
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31--><AD_PROCESS_PARA>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_PARA_ID><![CDATA[DC3ADA42B2C443B79ACD6215AD5D9C31]]></AD_PROCESS_PARA_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <NAME><![CDATA[G/L Item]]></NAME>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DESCRIPTION><![CDATA[An alias for the Account Combination which can be commonly used in daily operations.]]></DESCRIPTION>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <HELP><![CDATA[General ledger item.]]></HELP>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_VALUE_ID><![CDATA[66E310A87A844A51B8BAD2884E996CD6]]></AD_REFERENCE_VALUE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <COLUMNNAME><![CDATA[c_glitem_id]]></COLUMNNAME>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31--></AD_PROCESS_PARA>
+
 <!--E2EB0EFA3CE741C1848590D270CEBE2B--><AD_PROCESS_PARA>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_PROCESS_PARA_ID><![CDATA[E2EB0EFA3CE741C1848590D270CEBE2B]]></AD_PROCESS_PARA_ID>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -22,6 +22,17 @@
 <!--29010995FD39439D97A5C0CE8CE27D70-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--29010995FD39439D97A5C0CE8CE27D70--></AD_VAL_RULE>
 
+<!--4DB5167147F24078A1FD39DC7564B48D--><AD_VAL_RULE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_VAL_RULE_ID><![CDATA[4DB5167147F24078A1FD39DC7564B48D]]></AD_VAL_RULE_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <NAME><![CDATA[FIN_FinancialAccountInNaturalTree]]></NAME>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <TYPE><![CDATA[S]]></TYPE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')]]></CODE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D--></AD_VAL_RULE>
+
 <!--575E470ABADB4C278132C957A78C47E3--><AD_VAL_RULE>
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_VAL_RULE_ID><![CDATA[575E470ABADB4C278132C957A78C47E3]]></AD_VAL_RULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -33,6 +44,34 @@
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3--></AD_VAL_RULE>
 
+<!--959ADF046AFE4F509ABC6E2F41F9DB04--><AD_VAL_RULE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccount]]></NAME>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <TYPE><![CDATA[S]]></TYPE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <CODE><![CDATA[EXISTS(
+SELECT FIN_PAYMENTMETHOD_ID 
+FROM FIN_FINACC_PAYMENTMETHOD 
+WHERE FIN_FINANCIAL_ACCOUNT_ID = CASE WHEN (@FIN_FINANCIAL_ACCOUNT_ID@ IS NOT NULL AND @FIN_FINANCIAL_ACCOUNT_ID@ <> COALESCE('','-1')) THEN @FIN_FINANCIAL_ACCOUNT_ID@ ELSE
+(SELECT CASE WHEN ((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) > 0) THEN FIN_FINANCIAL_ACCOUNT_ID ELSE PO_FINANCIAL_ACCOUNT_ID END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@)
+END
+AND FIN_FINACC_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID = FIN_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID )]]></CODE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04--></AD_VAL_RULE>
+
+<!--D035365830AF466BA81F2AB8ECC6FAE0--><AD_VAL_RULE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <NAME><![CDATA[FIN_GLItemInNaturalTree]]></NAME>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <TYPE><![CDATA[S]]></TYPE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')]]></CODE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0--></AD_VAL_RULE>
+
 <!--E00B19370995405C8014D48E2DE98FD1--><AD_VAL_RULE>
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_VAL_RULE_ID><![CDATA[E00B19370995405C8014D48E2DE98FD1]]></AD_VAL_RULE_ID>
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -45,6 +84,20 @@
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E00B19370995405C8014D48E2DE98FD1--></AD_VAL_RULE>
 
+<!--E491153CCBEE49A1842A7CC8544929DD--><AD_VAL_RULE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_VAL_RULE_ID><![CDATA[E491153CCBEE49A1842A7CC8544929DD]]></AD_VAL_RULE_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <NAME><![CDATA[FIN_BusinessPartnerInNaturaTreeAndCustomerOrVendor]]></NAME>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <TYPE><![CDATA[S]]></TYPE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')
+AND ((((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) > 0) AND (ISCUSTOMER = 'Y' OR C_BPARTNER_ID = @C_BPARTNER_ID@))
+OR  (((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) < 0) AND (ISVENDOR = 'Y' OR C_BPARTNER_ID = @C_BPARTNER_ID@)))
+]]></CODE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD--></AD_VAL_RULE>
+
 <!--FF8080812E448A62012E44943A160017--><AD_VAL_RULE>
 <!--FF8080812E448A62012E44943A160017-->  <AD_VAL_RULE_ID><![CDATA[FF8080812E448A62012E44943A160017]]></AD_VAL_RULE_ID>
 <!--FF8080812E448A62012E44943A160017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournalLine.java	Thu Nov 22 16:27:44 2012 +0100
@@ -0,0 +1,161 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * 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-2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.FIN_Utility;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.DocumentType;
+import org.openbravo.model.financialmgmt.gl.GLItem;
+import org.openbravo.model.financialmgmt.gl.GLJournalLine;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class FIN_AddPaymentFromJournalLine extends DalBaseProcess {
+  private static AdvPaymentMngtDao dao;
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    dao = new AdvPaymentMngtDao();
+    OBError message = null;
+    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+        .getProperty("dateFormat.java");
+    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
+
+    String strMessageType = "";
+    StringBuilder strMessageResult = new StringBuilder();
+    String strTitle = "";
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String journalLineId = (String) bundle.getParams().get("GL_JournalLine_ID");
+      final String bPartnerId = (String) bundle.getParams().get("cBpartnerParaId");
+      final String glItemId = (String) bundle.getParams().get("cGlitemId");
+      final String financialAccountId = (String) bundle.getParams().get("finFinancialAccountId");
+      final String paymentMethodId = (String) bundle.getParams().get("finPaymentmethodId");
+      final String strDate = (String) bundle.getParams().get("date");
+
+      // Initialize objects
+      GLJournalLine journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLineId);
+      FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          financialAccountId);
+      FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+          paymentMethodId);
+      BusinessPartner bPartner = OBDal.getInstance().get(BusinessPartner.class, bPartnerId);
+      GLItem glItem = OBDal.getInstance().get(GLItem.class, glItemId);
+      Date date = dateFormat.parse(strDate);
+      boolean isReceipt = journalLine.getDebit().subtract(journalLine.getCredit())
+          .compareTo(BigDecimal.ZERO) > 0;
+
+      // Check restrictions
+      if (!journalLine.getCurrency().equals(financialAccount.getCurrency())) {
+        throw new OBException("@FIN_NoMultiCurrencyAllowed@");
+      }
+      if (journalLine.getDebit().subtract(journalLine.getCredit()).compareTo(BigDecimal.ZERO) > 0
+          && !bPartner.isCustomer()) {
+        throw new OBException("@FIN_NoCustomer@");
+      }
+      if (journalLine.getDebit().subtract(journalLine.getCredit()).compareTo(BigDecimal.ZERO) < 0
+          && !bPartner.isVendor()) {
+        throw new OBException("@FIN_NoVendor@");
+      }
+
+      // Retrieve additional variables
+      final List<Object> parameters = new ArrayList<Object>();
+      parameters.add(journalLine.getClient().getId());
+      parameters.add(journalLine.getOrganization().getId());
+      parameters.add(isReceipt ? "ARR" : "APP");
+      String strDocTypeId = (String) CallStoredProcedure.getInstance().call("AD_GET_DOCTYPE",
+          parameters, null);
+      String strPaymentDocumentNo = FIN_Utility.getDocumentNo(journalLine.getOrganization(),
+          (isReceipt) ? "ARR" : "APP", (isReceipt) ? "AR Receipt" : "AP Payment");
+
+      // Generate Payment
+      FIN_Payment payment = dao.getNewPayment(isReceipt, journalLine.getOrganization(),
+          dao.getObject(DocumentType.class, strDocTypeId), strPaymentDocumentNo, bPartner,
+          paymentMethod, financialAccount, journalLine.getDebit().subtract(journalLine.getCredit())
+              .abs().toString(), date, null, journalLine.getCurrency(), null, null);
+
+      // Add Payment Details
+      FIN_AddPayment.saveGLItem(payment, journalLine.getDebit().subtract(journalLine.getCredit())
+          .abs(), glItem, bPartner, journalLine.getProduct(), journalLine.getProject(),
+          journalLine.getSalesCampaign(), journalLine.getActivity(), journalLine.getSalesRegion(),
+          journalLine.getCostCenter(), journalLine.getStDimension(), journalLine.getNdDimension());
+
+      OBDal.getInstance().flush();
+
+      // process payment
+      message = FIN_AddPayment.processPayment(bundle.getContext().toVars(), bundle.getConnection(),
+          "P", payment);
+
+      // Print result
+      if (message.getType().equals("Error")) {
+        String exceptionMessage = payment.getBusinessPartner().getName();
+        exceptionMessage += ": " + message.getMessage();
+        throw new OBException(exceptionMessage);
+      } else if (message.getType().equals("Warning")) {
+        strTitle = "@Warning@";
+        strMessageType = "Warning";
+      } else {
+        strTitle = "@Success@";
+        strMessageType = "Success";
+      }
+      strMessageResult.append("@Payment@ ").append(payment.getDocumentNo());
+      strMessageResult.append(" (").append(payment.getBusinessPartner().getName()).append(")");
+      if (!"".equals(message.getMessage()))
+        strMessageResult.append(": ").append(message.getMessage());
+      strMessageResult.append("<br>");
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+      msg.setType(strMessageType);
+      msg.setTitle(strTitle);
+      msg.setMessage(strMessageResult.toString());
+
+      journalLine.setRelatedPayment(payment);
+      OBDal.getInstance().flush();
+
+      bundle.setResult(msg);
+
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      msg.setTitle("@Error@");
+      bundle.setResult(msg);
+    }
+
+  }
+}
--- a/src-db/database/model/tables/GL_JOURNALLINE.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/model/tables/GL_JOURNALLINE.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -145,6 +145,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="FIN_PAYMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="A_ASSET" name="GL_JOURNALLINE_A_ASSET">
         <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
       </foreign-key>
@@ -196,6 +200,9 @@
       <foreign-key foreignTable="M_PRODUCT" name="GL_JOURNALLINE_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="FIN_PAYMENT" name="GL_JOURNALLINE_PAYMENT" onDelete="setnull">
+        <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="USER1" name="GL_JOURNALLINE_USER1">
         <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
--- a/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -52,7 +52,6 @@
       OR(COALESCE(:old.AMTSOURCECR, 0) <> COALESCE(:new.AMTSOURCECR, 0))
       OR(COALESCE(:old.C_CURRENCY_ID, '0') <> COALESCE(:new.C_CURRENCY_ID, '0'))
       OR(COALESCE(:old.C_UOM_ID, '0') <> COALESCE(:new.C_UOM_ID, '0'))
-      OR(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0'))
       OR(COALESCE(:old.AD_CLIENT_ID, '0') <> COALESCE(:new.AD_CLIENT_ID, '0')))) 
     THEN
       RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
@@ -61,6 +60,7 @@
     DBMS_OUTPUT.PUT_LINE('Posted:'||v_Posted);
     IF(v_Posted='Y'
       AND ((COALESCE(:old.C_VALIDCOMBINATION_ID, '0') <> COALESCE(:new.C_VALIDCOMBINATION_ID, '0'))
+      OR(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0'))
       OR(COALESCE(:old.AMTACCTDR, 0) <> COALESCE(:new.AMTACCTDR, 0))
       OR(COALESCE(:old.AMTACCTCR, 0) <> COALESCE(:new.AMTACCTCR, 0))
       OR(COALESCE(:OLD.User1_ID, '0') <> COALESCE(:NEW.User1_ID, '0'))
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -1607,6 +1607,20 @@
 <!--8282A027544447EE82CD9D6CA8113525-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8282A027544447EE82CD9D6CA8113525--></AD_AUXILIARINPUT>
 
+<!--8482E2A2C9D74EA592CE8AF25AA9364C--><AD_AUXILIARINPUT>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <AD_AUXILIARINPUT_ID><![CDATA[8482E2A2C9D74EA592CE8AF25AA9364C]]></AD_AUXILIARINPUT_ID>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <NAME><![CDATA[NumberOfAcctSchemas]]></NAME>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <CODE><![CDATA[@SQL=SELECT COUNT(DISTINCT(C_ACCTSCHEMA_ID))
+FROM AD_ORG
+WHERE AD_ISORGINCLUDED(@AD_ORG_ID@, AD_ORG_ID, AD_CLIENT_ID) <> -1
+AND C_ACCTSCHEMA_ID IS NOT NULL]]></CODE>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8482E2A2C9D74EA592CE8AF25AA9364C--></AD_AUXILIARINPUT>
+
 <!--87EA26BD00A04638B556D52621D46131--><AD_AUXILIARINPUT>
 <!--87EA26BD00A04638B556D52621D46131-->  <AD_AUXILIARINPUT_ID><![CDATA[87EA26BD00A04638B556D52621D46131]]></AD_AUXILIARINPUT_ID>
 <!--87EA26BD00A04638B556D52621D46131-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -24087,7 +24087,7 @@
 <!--1681-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1681-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--1681-->  <AD_ELEMENT_ID><![CDATA[2EB6010EAA174169880C588220EFE7B8]]></AD_ELEMENT_ID>
-<!--1681-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1681-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--1681-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1681-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1681-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -24121,7 +24121,7 @@
 <!--1682-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1682-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--1682-->  <AD_ELEMENT_ID><![CDATA[0131585AC1F246DBAF6B84E53534F5FA]]></AD_ELEMENT_ID>
-<!--1682-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1682-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--1682-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1682-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1682-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -286020,7 +286020,7 @@
 <!--A7F1531510454244E040007F010064A6-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--A7F1531510454244E040007F010064A6-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--A7F1531510454244E040007F010064A6-->  <AD_ELEMENT_ID><![CDATA[187]]></AD_ELEMENT_ID>
-<!--A7F1531510454244E040007F010064A6-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--A7F1531510454244E040007F010064A6-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--A7F1531510454244E040007F010064A6-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--A7F1531510454244E040007F010064A6-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A7F1531510454244E040007F010064A6-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -292489,6 +292489,41 @@
 <!--B77F641D5777417CAEDFF43E2BB18742-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--B77F641D5777417CAEDFF43E2BB18742--></AD_COLUMN>
 
+<!--B7AC5B839A864B7EB99DCF53390E5F89--><AD_COLUMN>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_COLUMN_ID><![CDATA[B7AC5B839A864B7EB99DCF53390E5F89]]></AD_COLUMN_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <NAME><![CDATA[Related Payment]]></NAME>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <DESCRIPTION><![CDATA[Payment event]]></DESCRIPTION>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <HELP><![CDATA[Payment event]]></HELP>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <COLUMNNAME><![CDATA[FIN_Payment_ID]]></COLUMNNAME>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <SEQNO><![CDATA[141]]></SEQNO>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_ELEMENT_ID><![CDATA[7891269C83EA655DE040007F010155CE]]></AD_ELEMENT_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <POSITION><![CDATA[36]]></POSITION>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--B7AC5B839A864B7EB99DCF53390E5F89--></AD_COLUMN>
+
 <!--B7D39D63B1734983ABB6829E13A6F46F--><AD_COLUMN>
 <!--B7D39D63B1734983ABB6829E13A6F46F-->  <AD_COLUMN_ID><![CDATA[B7D39D63B1734983ABB6829E13A6F46F]]></AD_COLUMN_ID>
 <!--B7D39D63B1734983ABB6829E13A6F46F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -199796,6 +199796,35 @@
 <!--5B7BCB6A77D1449DBBB5BD68C6334E28-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--5B7BCB6A77D1449DBBB5BD68C6334E28--></AD_FIELD>
 
+<!--5B8B513DB09446C4A363E1C5508ECB35--><AD_FIELD>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_FIELD_ID><![CDATA[5B8B513DB09446C4A363E1C5508ECB35]]></AD_FIELD_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <NAME><![CDATA[Payment]]></NAME>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <DESCRIPTION><![CDATA[Payment event]]></DESCRIPTION>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <HELP><![CDATA[Payment event]]></HELP>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_COLUMN_ID><![CDATA[B7AC5B839A864B7EB99DCF53390E5F89]]></AD_COLUMN_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <DISPLAYLOGIC><![CDATA[@FIN_Payment_ID@!'']]></DISPLAYLOGIC>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <SEQNO><![CDATA[125]]></SEQNO>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--5B8B513DB09446C4A363E1C5508ECB35--></AD_FIELD>
+
 <!--5B8D9C34AEF24D9D850747AFC924C63D--><AD_FIELD>
 <!--5B8D9C34AEF24D9D850747AFC924C63D-->  <AD_FIELD_ID><![CDATA[5B8D9C34AEF24D9D850747AFC924C63D]]></AD_FIELD_ID>
 <!--5B8D9C34AEF24D9D850747AFC924C63D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Nov 22 16:25:18 2012 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Nov 22 16:27:44 2012 +0100
@@ -15179,6 +15179,17 @@
 <!--1860E10DED5C486D8CF33B7C8104448E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1860E10DED5C486D8CF33B7C8104448E--></AD_MESSAGE>
 
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F--><AD_MESSAGE>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <AD_MESSAGE_ID><![CDATA[19600C7CBF5942CFAD8F3B72EDAFC13F]]></AD_MESSAGE_ID>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <VALUE><![CDATA[FIN_NoCustomer]]></VALUE>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <MSGTEXT><![CDATA[The selected Business Partner is not a Customer.]]></MSGTEXT>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--19600C7CBF5942CFAD8F3B72EDAFC13F--></AD_MESSAGE>
+
 <!--1961EDB8E6F743B29134D8DA4E411528--><AD_MESSAGE>
 <!--1961EDB8E6F743B29134D8DA4E411528-->  <AD_MESSAGE_ID><![CDATA[1961EDB8E6F743B29134D8DA4E411528]]></AD_MESSAGE_ID>
 <!--1961EDB8E6F743B29134D8DA4E411528-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -15509,6 +15520,17 @@
 <!--239B36AC9A144464861B1E76C83A07E9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--239B36AC9A144464861B1E76C83A07E9--></AD_MESSAGE>
 
+<!--23A6C6403FF944AC81B67C168882B57D--><AD_MESSAGE>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <AD_MESSAGE_ID><![CDATA[23A6C6403FF944AC81B67C168882B57D]]></AD_MESSAGE_ID>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <VALUE><![CDATA[FIN_NoVendor]]></VALUE>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <MSGTEXT><![CDATA[The selected Business Partner is not a Vendor.]]></MSGTEXT>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--23A6C6403FF944AC81B67C168882B57D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--23A6C6403FF944AC81B67C168882B57D--></AD_MESSAGE>
+
 <!--23B122FD033649F7854EC76DCD746E72--><AD_MESSAGE>
 <!--23B122FD033649F7854EC76DCD746E72-->  <AD_MESSAGE_ID><![CDATA[23B122FD033649F7854EC76DCD746E72]]></AD_MESSAGE_ID>
 <!--23B122FD033649F7854EC76DCD746E72-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -19201,6 +19223,17 @@
 <!--AA196DCD58DA494FA1ADCF695FFAA80C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--AA196DCD58DA494FA1ADCF695FFAA80C--></AD_MESSAGE>
 
+<!--AA8371C7B5984858B3020B9C578008FB--><AD_MESSAGE>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <AD_MESSAGE_ID><![CDATA[AA8371C7B5984858B3020B9C578008FB]]></AD_MESSAGE_ID>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <VALUE><![CDATA[FIN_NoMultiCurrencyAllowed]]></VALUE>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <MSGTEXT><![CDATA[No Multicurrency transactions are allowed. The exchange rate should be the same as the exchange rate of the Financial Account.]]></MSGTEXT>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--AA8371C7B5984858B3020B9C578008FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--AA8371C7B5984858B3020B9C578008FB--></AD_MESSAGE>
+
 <!--AB8F1CCBF6254BB2862CE7FD75D2B6AE--><AD_MESSAGE>
 <!--AB8F1CCBF6254BB2862CE7FD75D2B6AE-->  <AD_MESSAGE_ID><![CDATA[AB8F1CCBF6254BB2862CE7FD75D2B6AE]]></AD_MESSAGE_ID>
 <!--AB8F1CCBF6254BB2862CE7FD75D2B6AE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>