diff --git a/migration/320-330/001_add_brazilian_states.sql b/migration/320-330/001_add_brazilian_states.sql
new file mode 100644
index 0000000000..91dd691ed0
--- /dev/null
+++ b/migration/320-330/001_add_brazilian_states.sql
@@ -0,0 +1,43 @@
+--Enable Brazil in country Table
+UPDATE c_country SET hasregion = 'Y', regionname = 'Estado' WHERE c_country_id = 139;
+
+COMMIT;
+
+--Add Brazilian States
+INSERT INTO c_region VALUES (441, 0, 0, 'Y', TO_DATE ('2007-04-30 16:40:42', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:40:42', 'YYYY-MM-DD HH24:MI:SS'), 0, 'AC', 'Acre', 139, 'N');
+INSERT INTO c_region VALUES (442, 0, 0, 'Y', TO_DATE ('2007-04-30 16:40:57', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:40:57', 'YYYY-MM-DD HH24:MI:SS'), 0, 'AL', 'Alagoas', 139, 'N');
+INSERT INTO c_region VALUES (443, 0, 0, 'Y', TO_DATE ('2007-04-30 16:41:06', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:41:06', 'YYYY-MM-DD HH24:MI:SS'), 0, 'AP', 'Amapá', 139, 'N');
+INSERT INTO c_region VALUES (444, 0, 0, 'Y', TO_DATE ('2007-04-30 16:41:19', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:41:19', 'YYYY-MM-DD HH24:MI:SS'), 0, 'AM', 'Amazonas', 139, 'N');
+INSERT INTO c_region VALUES (445, 0, 0, 'Y', TO_DATE ('2007-04-30 16:41:29', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:41:29', 'YYYY-MM-DD HH24:MI:SS'), 0, 'BA', 'Bahia', 139, 'N');
+INSERT INTO c_region VALUES (446, 0, 0, 'Y', TO_DATE ('2007-04-30 16:41:49', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:41:49', 'YYYY-MM-DD HH24:MI:SS'), 0, 'CE', 'Ceará°', 139, 'N');
+INSERT INTO c_region VALUES (447, 0, 0, 'Y', TO_DATE ('2007-04-30 16:42:04', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:42:04', 'YYYY-MM-DD HH24:MI:SS'), 0, 'DF', 'Distrito Federal', 139, 'N');
+INSERT INTO c_region VALUES (448, 0, 0, 'Y', TO_DATE ('2007-04-30 16:42:19', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:42:19', 'YYYY-MM-DD HH24:MI:SS'), 0, 'ES', 'EspÃrito Santo', 139, 'N');
+INSERT INTO c_region VALUES (449, 0, 0, 'Y', TO_DATE ('2007-04-30 16:42:34', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:42:34', 'YYYY-MM-DD HH24:MI:SS'), 0, 'GO', 'Goiás', 139, 'N');
+INSERT INTO c_region VALUES (450, 0, 0, 'Y', TO_DATE ('2007-04-30 16:42:40', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:42:40', 'YYYY-MM-DD HH24:MI:SS'), 0, 'MA', 'Maranhão', 139, 'N');
+INSERT INTO c_region VALUES (451, 0, 0, 'Y', TO_DATE ('2007-04-30 16:42:49', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:42:49', 'YYYY-MM-DD HH24:MI:SS'), 0, 'MT', 'Mato Grosso', 139, 'N');
+INSERT INTO c_region VALUES (452, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:00', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:00', 'YYYY-MM-DD HH24:MI:SS'), 0, 'MS', 'Mato Grosso do Sul', 139, 'N');
+INSERT INTO c_region VALUES (453, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:11', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:11', 'YYYY-MM-DD HH24:MI:SS'), 0, 'MG', 'Minas Gerais', 139, 'N');
+INSERT INTO c_region VALUES (454, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:21', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:21', 'YYYY-MM-DD HH24:MI:SS'), 0, 'PA', 'Pará', 139, 'N');
+INSERT INTO c_region VALUES (455, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:31', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:31', 'YYYY-MM-DD HH24:MI:SS'), 0, 'PB', 'ParaÃba', 139, 'N');
+INSERT INTO c_region VALUES (456, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:40', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:40', 'YYYY-MM-DD HH24:MI:SS'), 0, 'PR', 'Paraná', 139, 'N');
+INSERT INTO c_region VALUES (457, 0, 0, 'Y', TO_DATE ('2007-04-30 16:43:53', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:43:53', 'YYYY-MM-DD HH24:MI:SS'), 0, 'PE', 'Pernambuco', 139, 'N');
+INSERT INTO c_region VALUES (458, 0, 0, 'Y', TO_DATE ('2007-04-30 16:44:03', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:44:03', 'YYYY-MM-DD HH24:MI:SS'), 0, 'PI', 'PiauÃ', 139, 'N');
+INSERT INTO c_region VALUES (459, 0, 0, 'Y', TO_DATE ('2007-04-30 16:44:30', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:44:30', 'YYYY-MM-DD HH24:MI:SS'), 0, 'RJ', 'Rio de Janeiro', 139, 'N');
+INSERT INTO c_region VALUES (460, 0, 0, 'Y', TO_DATE ('2007-04-30 16:44:43', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:44:43', 'YYYY-MM-DD HH24:MI:SS'), 0, 'RN', 'Rio Grande do Norte', 139, 'N');
+INSERT INTO c_region VALUES (461, 0, 0, 'Y', TO_DATE ('2007-04-30 16:44:59', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:44:59', 'YYYY-MM-DD HH24:MI:SS'), 0, 'RS', 'Rio Grande do Sul', 139, 'N');
+INSERT INTO c_region VALUES (462, 0, 0, 'Y', TO_DATE ('2007-04-30 16:45:07', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:45:07', 'YYYY-MM-DD HH24:MI:SS'), 0, 'RO', 'Rondônia', 139, 'N');
+INSERT INTO c_region VALUES (463, 0, 0, 'Y', TO_DATE ('2007-04-30 16:45:20', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:45:20', 'YYYY-MM-DD HH24:MI:SS'), 0, 'RR', 'Roraima', 139, 'N');
+INSERT INTO c_region VALUES (464, 0, 0, 'Y', TO_DATE ('2007-04-30 16:45:30', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:45:30', 'YYYY-MM-DD HH24:MI:SS'), 0, 'SC', 'Santa Catarina', 139, 'N');
+INSERT INTO c_region VALUES (465, 0, 0, 'Y', TO_DATE ('2007-04-30 16:45:40', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:45:40', 'YYYY-MM-DD HH24:MI:SS'), 0, 'SP', 'Sõo Paulo', 139, 'N');
+INSERT INTO c_region VALUES (466, 0, 0, 'Y', TO_DATE ('2007-04-30 16:45:53', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:45:53', 'YYYY-MM-DD HH24:MI:SS'), 0, 'SE', 'Sergipe', 139, 'N');
+INSERT INTO c_region VALUES (467, 0, 0, 'Y', TO_DATE ('2007-04-30 16:46:03', 'YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE ('2007-04-30 16:46:03', 'YYYY-MM-DD HH24:MI:SS'), 0, 'TO', 'Tocantins', 139, 'N');
+
+COMMIT;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (c_region_id) + 1
+ FROM C_REGION
+ WHERE c_region_id < 1000000)
+ WHERE NAME = 'C_Region';
+
+COMMIT;
diff --git a/migration/320-330/002_add_feature_1714090.sql b/migration/320-330/002_add_feature_1714090.sql
new file mode 100644
index 0000000000..5b38da4e9e
--- /dev/null
+++ b/migration/320-330/002_add_feature_1714090.sql
@@ -0,0 +1,31 @@
+-- Feature Request
+-- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335
+
+INSERT INTO AD_PROCESS_PARA
+ (ad_process_para_id, ad_client_id, ad_org_id, isactive, created,
+ createdby, updated, updatedby, NAME,
+ description,
+ HELP,
+ ad_process_id, seqno, ad_reference_id, ad_reference_value_id,
+ ad_val_rule_id, columnname, iscentrallymaintained, fieldlength,
+ ismandatory, isrange, ad_element_id, entitytype
+ )
+ VALUES (50019, 0, 0, 'Y', TO_DATE ('2007-03-03', 'YYYY-MM-DD'),
+ 100, TO_DATE ('2007-03-03', 'YYYY-MM-DD'), 100, 'Shipment Date',
+ 'Date printed on shipment',
+ 'The Shipment Date indicates the date printed on the shipment.',
+ 118, 15, 15, NULL,
+ NULL, 'MovementDate', 'N', 0,
+ 'Y', 'N', 1037, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1
+ FROM AD_PROCESS_PARA
+ WHERE ad_process_para_id < 1000000)
+ WHERE NAME = 'AD_Process_Para';
+
+COMMIT ;
diff --git a/migration/320-330/003_make_feature_1714090_optional.sql b/migration/320-330/003_make_feature_1714090_optional.sql
new file mode 100644
index 0000000000..009b9eb261
--- /dev/null
+++ b/migration/320-330/003_make_feature_1714090_optional.sql
@@ -0,0 +1,8 @@
+UPDATE AD_PROCESS_PARA
+ SET defaultvalue = NULL,
+ ismandatory = 'N',
+ updated = TO_DATE ('2007-05-07 20:55:59', 'YYYY-MM-DD HH24:MI:SS'),
+ updatedby = 100
+ WHERE ad_process_para_id = 50019;
+
+COMMIT ;
diff --git a/migration/320-330/004_java_process_official.sql b/migration/320-330/004_java_process_official.sql
new file mode 100644
index 0000000000..02b883779f
--- /dev/null
+++ b/migration/320-330/004_java_process_official.sql
@@ -0,0 +1,12 @@
+-- only needed for oracle
+
+UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.SynchronizeTerminology',
+ procedurename = NULL,
+ updated = TO_DATE ('2007-05-07 21:20:30', 'YYYY-MM-DD HH24:MI:SS'),
+ updatedby = 100
+ WHERE ad_process_id = 172;
+
+COMMIT ;
+
+DROP PROCEDURE Ad_Synchronize;
diff --git a/migration/320-330/005_2pack_enhancements_message.sql b/migration/320-330/005_2pack_enhancements_message.sql
new file mode 100644
index 0000000000..e726ddfa3c
--- /dev/null
+++ b/migration/320-330/005_2pack_enhancements_message.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_PACKAGE_EXP_DETAIL ADD ad_message_id NUMBER(10);
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, seqno, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50213, 0, 0, 'Y',
+ TO_DATE ('05/14/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('05/14/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Message', 'System Message',
+ 'Information and Error messages', 0, 'D', 'AD_Message_ID',
+ 50006, 19, 22, 'N', 'N',
+ 'N', 'Y', 'N', 0, 'N',
+ 'N', 'N', 1752, 'N',
+ 'N'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylogic, displaylength, isreadonly, seqno, issameline,
+ isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50183, 0, 0, 'Y',
+ TO_DATE ('05/14/2007 19:51:35', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('05/14/2007 19:52:28', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Message', 'System Message', 'Information and Error messages',
+ 'Y', 50006, 50213, 'Y',
+ '@Type@=''MSG''', 22, 'N', 246, 'N',
+ 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_REF_LIST
+ (ad_ref_list_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ VALUE, NAME, ad_reference_id, entitytype
+ )
+ VALUES (50043, 0, 0, 'Y',
+ TO_DATE ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'MSG', 'Message', 50004, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM AD_COLUMN
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM AD_FIELD
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_ref_list_id) + 1
+ FROM AD_REF_LIST
+ WHERE ad_ref_list_id < 1000000)
+ WHERE NAME = 'AD_Ref_List';
+
+COMMIT ;
\ No newline at end of file
diff --git a/migration/320-330/006_BF_1721252_xe.sql b/migration/320-330/006_BF_1721252_xe.sql
new file mode 100644
index 0000000000..f839f9e107
--- /dev/null
+++ b/migration/320-330/006_BF_1721252_xe.sql
@@ -0,0 +1,130 @@
+--
+-- [ 1721252 ] XE: paymentTermDiscount not using C_NonBusinessDay
+-- http://sourceforge.net/tracker/?func=detail&atid=879332&aid=1721252&group_id=176962
+--
+-- Run *ONLY* if you are using Oracle XE
+--
+
+create or replace
+function nextBusinessDay
+(
+ p_Date in date,
+ p_AD_Client_ID in number
+)
+return date
+/**
+*This file is part of Adempiere ERP Bazaar
+*http://www.adempiere.org
+*
+*Copyright (C) 2007 Teo Sarca
+*
+*This program is free software; you can redistribute it and/or
+*modify it under the terms of the GNU General Public License
+*as published by the Free Software Foundation; either version 2
+*of the License, or (at your option) any later version.
+*
+*This program is distributed in the hope that it will be useful,
+*but WITHOUT ANY WARRANTY; without even the implied warranty of
+*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+*GNU General Public License for more details.
+*
+*You should have received a copy of the GNU General Public License
+*along with this program; if not, write to the Free Software
+*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
+*/
+as
+ v_nextDate date := TRUNC(p_Date);
+ v_offset number := 0;
+ v_Saturday number := TO_CHAR(TO_DATE('2000-01-01', 'YYYY-MM-DD'), 'D');
+ v_Sunday number := (case when v_Saturday = 7 then 1 else v_Saturday + 1 end);
+ v_isHoliday boolean := true;
+
+ cursor nonBusinessDays(pp_Date date) is
+ select nbd.Date1 from C_NonBusinessDay nbd
+ where AD_Client_ID=p_AD_Client_ID and IsActive ='Y' and Date1>=pp_Date
+ order by Date1;
+begin
+ v_isHoliday := true;
+ loop
+ SELECT DECODE(TO_CHAR(v_nextDate,'D'), v_Saturday, 2, v_Sunday, 1, 0) INTO v_offset FROM DUAL;
+ v_nextDate := TRUNC(v_nextDate + v_offset);
+ v_isHoliday := false;
+ for nbd in nonBusinessDays(v_nextDate) loop
+ exit when v_nextDate <> TRUNC(nbd.Date1);
+ v_nextDate := v_nextDate + 1;
+ v_isHoliday := true;
+ end loop;
+ exit when v_isHoliday=false;
+ end loop;
+ --
+ return v_nextDate;
+end nextBusinessDay;
+/
+
+CREATE OR REPLACE FUNCTION paymentTermDiscount
+(
+ Amount IN NUMBER,
+ Currency_ID IN NUMBER,
+ PaymentTerm_ID IN NUMBER,
+ DocDate IN DATE,
+ PayDate IN DATE
+)
+RETURN NUMBER
+/*************************************************************************
+ * The contents of this file are subject to the Compiere License. You may
+ * obtain a copy of the License at http://www.compiere.org/license.html
+ * Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the License for details. Code: Compiere ERP+CRM
+ * Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved.
+ *************************************************************************
+ * $Id: C_PaymentTerm_Discount.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
+ ***
+ * Title: Calculate Discount
+ * Description:
+ * Calculate the allowable Discount Amount of the Payment Term
+ *
+ * Test: SELECT C_PaymentTerm_Discount(17777, 103, '10-DEC-1999') FROM DUAL
+ ************************************************************************/
+
+AS
+ Discount NUMBER := 0;
+ CURSOR Cur_PT IS
+ SELECT *
+ FROM C_PaymentTerm
+ WHERE C_PaymentTerm_ID = PaymentTerm_ID;
+ Discount1Date DATE;
+ Discount2Date DATE;
+ Add1Date NUMBER := 0;
+ Add2Date NUMBER := 0;
+BEGIN
+ -- No Data - No Discount
+ IF (Amount IS NULL OR PaymentTerm_ID IS NULL OR DocDate IS NULL) THEN
+ RETURN 0;
+ END IF;
+
+ FOR p IN Cur_PT LOOP -- for convineance only
+-- DBMS_OUTPUT.PUT_LINE(p.Name || ' - Doc = ' || TO_CHAR(DocDate));
+ Discount1Date := TRUNC(DocDate + p.DiscountDays + p.GraceDays);
+ Discount2Date := TRUNC(DocDate + p.DiscountDays2 + p.GraceDays);
+
+ -- Next Business Day
+ IF (p.IsNextBusinessDay='Y') THEN
+ Discount1Date := nextBusinessDay(Discount1Date, p.AD_Client_ID);
+ Discount2Date := nextBusinessDay(Discount2Date, p.AD_Client_ID);
+ END IF;
+
+ -- Discount 1
+ IF (Discount1Date >= TRUNC(PayDate)) THEN
+-- DBMS_OUTPUT.PUT_LINE('Discount 1 ' || TO_CHAR(Discount1Date) || ' ' || p.Discount);
+ Discount := Amount * p.Discount / 100;
+ -- Discount 2
+ ELSIF (Discount2Date >= TRUNC(PayDate)) THEN
+-- DBMS_OUTPUT.PUT_LINE('Discount 2 ' || TO_CHAR(Discount2Date) || ' ' || p.Discount2);
+ Discount := Amount * p.Discount2 / 100;
+ END IF;
+ END LOOP;
+ --
+ RETURN ROUND(NVL(Discount,0), 2); -- fixed rounding
+END paymentTermDiscount;
+/
+
diff --git a/migration/320-330/007_add_StoreArchiveOnFilesystem.sql b/migration/320-330/007_add_StoreArchiveOnFilesystem.sql
new file mode 100644
index 0000000000..e31ddf28fb
--- /dev/null
+++ b/migration/320-330/007_add_StoreArchiveOnFilesystem.sql
@@ -0,0 +1,248 @@
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50071, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'StoreArchiveOnFileSystem', 'D', 'Store Archive On File System',
+ 'Store Archive On File System'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, callout, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50214, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Store Archive On File System', 'Store Archive On File System', 1,
+ 'D', 'StoreArchiveOnFileSystem', 112, 20,
+ 1, 'N', 'N', 'Y', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50071, 'org.compiere.model.CalloutClient.storeArchiveOnFileSystem', 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50184, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Store Archive On File System', 'Store Archive On File System', 'Y', 250, 145,
+ 50214, 'Y', 1, 'N',
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+
+
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50072, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'WindowsArchivePath', 'D', 'Windows Archive Path',
+ 'Windows Archive Path'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50215, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Windows Archive Path', 'Windows Archive Path - If you change this value make sure to copy the archive entries to the new path!',
+ 'Path of the adempiere archive entries in the file system. If you change this value make sure to copy the archive entries to the new path!', 1,
+ 'D', 'WindowsArchivePath', 112, 10,
+ 255, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50072, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype, displaylogic
+ )
+ VALUES (50185, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Windows Archive Path', 'Windows Archive Path',
+ 'If you change this value make sure to copy the archive entries to the new path!',
+ 'Y', 260, 145,
+ 50215, 'Y', 1, 'N',
+ 'N', 'N', 'N', 'N', 'D','@StoreArchiveOnFileSystem@=''Y'''
+ );
+
+
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50073, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'UnixArchivePath', 'D', 'Unix Archive Path',
+ 'Unix Archive Path'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50216, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Unix Archive Path', 'Unix Archive Path - If you change this value make sure to copy the archive entries to the new path!',
+ 'Path of the adempiere archive entries in the file system. If you change this value make sure to copy the archive entries to the new path!', 1,
+ 'D', 'UnixArchivePath', 112, 10,
+ 255, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50073, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype, displaylogic
+ )
+ VALUES (50186, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Unix Archive Path', 'Unix Archive Path',
+ 'If you change this value make sure to copy the archive entries to the new path!',
+ 'Y', 270 ,145,
+ 50216, 'Y', 1, 'N',
+ 'Y', 'N', 'N', 'N', 'D','@StoreArchiveOnFileSystem@=''Y'''
+ );
+
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50015, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'StoreArchiveWarning',
+ 'If you change the archive storage method, the old archive entries are no longer available to your client.','I'
+ );
+
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50016, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'ArchivePathWarning','Make sure to copy the archive entries to the new path!','I'
+ );
+
+INSERT INTO ad_message_trl
+ (ad_message_id, ad_language, ad_client_id, ad_org_id, isactive,
+ created, createdby, updated, updatedby, msgtext, msgtip,
+ istranslated)
+ SELECT m.ad_message_id, lang.ad_language, m.ad_client_id, m.ad_org_id, 'Y',
+ m.created, m.createdby, m.updated, m.updatedby, m.msgtext, m.msgtip,
+ 'N'
+ FROM ad_message m, ad_language lang
+ WHERE m.ad_message_id in (50015, 50016)
+ AND lang.issystemlanguage = 'Y'
+ AND lang.isbaselanguage = 'N'
+ AND NOT EXISTS (
+ SELECT *
+ FROM ad_message_trl m2
+ WHERE m2.ad_message_id = m.ad_message_id
+ AND m2.ad_language = lang.ad_language);
+
+COMMIT ;
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+ UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_message_id) + 1
+ FROM ad_message
+ WHERE ad_message_id < 1000000)
+ WHERE NAME = 'AD_Message';
+
+
+ALTER TABLE ad_client ADD StoreArchiveOnFilesystem CHAR(1 BYTE) DEFAULT 'N' NOT NULL;
+ALTER TABLE ad_client ADD WindowsArchivePath NVARCHAR2(255);
+ALTER TABLE ad_client ADD UnixArchivePath NVARCHAR2(255);
+
+COMMIT ;
diff --git a/migration/320-330/008_2pack_enhancements_printformat.sql b/migration/320-330/008_2pack_enhancements_printformat.sql
new file mode 100644
index 0000000000..a86e192e75
--- /dev/null
+++ b/migration/320-330/008_2pack_enhancements_printformat.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_PACKAGE_EXP_DETAIL ADD ad_printformat_id NUMERIC(10,0);
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, seqno, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50217, 0, 0, 'Y',
+ TO_DATE ('05/25/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('05/25/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Print Format', 'Data Print Format',
+ 'The print format determines how data is rendered for print.', 0, 'D', 'AD_PrintFormat_ID',
+ 50006, 19, 22, 'N', 'N',
+ 'N', 'Y', 'N', 0, 'N',
+ 'N', 'N', 1790, 'N',
+ 'N'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylogic, displaylength, isreadonly, seqno, issameline,
+ isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50187, 0, 0, 'Y',
+ TO_DATE ('05/25/2007 19:51:35', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('05/25/2007 19:52:28', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PrintFormat', 'Print Format', 'Print Format',
+ 'Y', 50006, 50217, 'Y',
+ '@Type@=''PFT''', 22, 'N', 246, 'N',
+ 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_REF_LIST
+ (ad_ref_list_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ VALUE, NAME, ad_reference_id, entitytype
+ )
+ VALUES (50044, 0, 0, 'Y',
+ TO_DATE ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PFT', 'PrintFormat', 50004, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM AD_COLUMN
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM AD_FIELD
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_ref_list_id) + 1
+ FROM AD_REF_LIST
+ WHERE ad_ref_list_id < 1000000)
+ WHERE NAME = 'AD_Ref_List';
+
+COMMIT ;
diff --git a/migration/320-330/009_add_MandatoryLogic.sql b/migration/320-330/009_add_MandatoryLogic.sql
new file mode 100644
index 0000000000..5b6aea2357
--- /dev/null
+++ b/migration/320-330/009_add_MandatoryLogic.sql
@@ -0,0 +1,163 @@
+SET DEFINE OFF;
+
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50074, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'MandatoryLogic', 'D', 'Mandatory Logic',
+ 'Mandatory Logic'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50218, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Mandatory Logic', 'Logic to determine if field is mandatory (applies only when field is not mandatory in general)',
+ 'Logic to determine if field is mandatory (applies only when field is not mandatory in general).
+ format := {expression} [{logic} {expression}]
+ expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+ logic := {|}|{&}
+ context := any global or window context
+ value := strings or numbers
+ logic operators := AND or OR with the previous result from left to right
+ operand := eq{=}, gt{>}, le{<}, not{~^!}
+ Examples:
+ @AD_Table_ID@=14 | @Language@!GERGER
+ @PriceLimit@>10 | @PriceList@>@PriceActual@
+ @Name@>J
+ Strings may be in single quotes (optional)', 1,
+ 'D', 'MandatoryLogic', 101, 14,
+ 2000, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50074, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50188, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Mandatory Logic', 'Logic to determine if field is mandatory (applies only when field is not mandatory in general)',
+ 'Logic to determine if field is mandatory (applies only when field is not mandatory in general).
+ format := {expression} [{logic} {expression}]
+ expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+ logic := {|}|{&}
+ context := any global or window context
+ value := strings or numbers
+ logic operators := AND or OR with the previous result from left to right
+ operand := eq{=}, gt{>}, le{<}, not{~^!}
+ Examples:
+ @AD_Table_ID@=14 | @Language@!GERGER
+ @PriceLimit@>10 | @PriceList@>@PriceActual@
+ @Name@>J
+ Strings may be in single quotes (optional)',
+ 'Y', 275 ,101,
+ 50218, 'Y', 60, 'N',
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+
+
+ALTER TABLE ad_column ADD MandatoryLogic NVARCHAR2(2000);
+
+
+
+ CREATE OR REPLACE FORCE VIEW AD_FIELD_V AS
+ SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
+ f.Name, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
+ f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
+ f.IsEncrypted AS IsEncryptedField, f.ObscureType,
+ c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent,
+ COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
+ c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID,
+ c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
+ c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
+ c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn,
+ c.IsSelectionColumn,
+ tbl.TableName, c.ValueMin, c.ValueMax,
+ fg.Name AS FieldGroup, vr.Code AS ValidationCode
+FROM AD_Field f
+ INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID)
+ LEFT OUTER JOIN AD_FieldGroup fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
+ LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID)
+ INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
+ INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID)
+ LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID)
+WHERE f.IsActive = 'Y'
+ AND c.IsActive = 'Y';
+
+
+ CREATE OR REPLACE FORCE VIEW AD_FIELD_VT AS
+ SELECT trl.AD_Language, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
+ trl.Name, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
+ f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
+ f.IsEncrypted AS IsEncryptedField, f.ObscureType,
+ c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent,
+ COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
+ c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID,
+ c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
+ c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
+ c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn,
+ tbl.TableName, c.ValueMin, c.ValueMax,
+ fgt.Name AS FieldGroup, vr.Code AS ValidationCode
+ FROM AD_Field f
+ INNER JOIN AD_Field_Trl trl ON (f.AD_Field_ID = trl.AD_Field_ID)
+ INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID)
+ LEFT OUTER JOIN AD_FieldGroup_Trl fgt ON
+ (f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_Language=fgt.AD_Language)
+ LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID)
+ INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
+ INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID)
+ LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID)
+ WHERE f.IsActive = 'Y'
+ AND c.IsActive = 'Y';
+
+
+COMMIT ;
\ No newline at end of file
diff --git a/migration/320-330/010_add_printpreview_button.sql b/migration/320-330/010_add_printpreview_button.sql
new file mode 100644
index 0000000000..c81055985b
--- /dev/null
+++ b/migration/320-330/010_add_printpreview_button.sql
@@ -0,0 +1,21 @@
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50017, 0, 0, 'Y',
+ TO_DATE ('06/12/2007 18:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('06/12/2007 18:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PrintPreview','Print preview','I'
+ );
+
+COMMIT ;
+
+ UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_message_id) + 1
+ FROM ad_message
+ WHERE ad_message_id < 1000000)
+ WHERE NAME = 'AD_Message';
+
+COMMIT ;
diff --git a/migration/320-330/013_fix_istranslated.sql b/migration/320-330/013_fix_istranslated.sql
new file mode 100644
index 0000000000..baf461ad51
--- /dev/null
+++ b/migration/320-330/013_fix_istranslated.sql
@@ -0,0 +1,9 @@
+UPDATE AD_COLUMN
+ SET istranslated = 'N'
+ WHERE ad_column_id = 7604;
+
+UPDATE AD_COLUMN
+ SET istranslated = 'Y'
+ WHERE ad_column_id = 6256;
+
+COMMIT;
diff --git a/migration/320-330/014_postcode_lookup.sql b/migration/320-330/014_postcode_lookup.sql
new file mode 100644
index 0000000000..f1591324f6
--- /dev/null
+++ b/migration/320-330/014_postcode_lookup.sql
@@ -0,0 +1,92 @@
+---
+-- Feature 1741222 - Add Post code lookup infrastructure
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335
+--
+
+--- Modify C_COUNTRY Table
+ALTER TABLE C_COUNTRY ADD
+ IsPostcodeLookup CHAR(1) DEFAULT 'N' NOT NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupClassname VARCHAR(255) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupClientID VARCHAR(50) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupPassword VARCHAR(50) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupUrl VARCHAR(100) DEFAULT NULL NULL;
+
+-- Add Postcode Constraint
+ALTER TABLE C_COUNTRY ADD CHECK (IsPostcodeLookup IN ('Y','N'));
+
+-- Insert Element Definitions
+
+INSERT INTO ad_element
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+ VALUES (51000, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-19 23:09:22','YYYY-MM-DD HH24:MI:SS'), 100, 'IsPostcodeLookup', 'D', 'IsPostcodeLookup', 'IsPostcodeLookup', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+ VALUES (51001, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-19 23:09:54','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupClassName', 'D', 'LookupClassName', 'LookupClassName', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+ VALUES (51002, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-19 23:10:06','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupClientID', 'D', 'LookupClientID', 'LookupClientID', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+ VALUES (51003, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-19 23:10:19','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupUrl', 'D', 'LookupUrl', 'LookupUrl', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+ VALUES (51004, 0, 0, 'Y', TO_DATE('2007-06-22 02:03:37','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-22 02:04:31','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupPassword', 'D', 'LookupPassword', 'LookupPassword', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- Insert Column Definitions
+INSERT INTO ad_column
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL, MANDATORYLOGIC)
+ VALUES (51000, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-06-19 23:14:47','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'IsPostcodeLookup', NULL, NULL, 0, 'D', 'IsPostcodeLookup', 170, 20, NULL, NULL, 1, 'N', 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51000, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL, MANDATORYLOGIC)
+ VALUES (51001, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-06-19 23:04:48','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'LookupClassName', NULL, NULL, 0, 'D', 'LookupClassName', 170, 10, NULL, NULL, 255, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51001, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL, MANDATORYLOGIC)
+ VALUES (51002, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-06-19 23:04:48','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'LookupClientID', NULL, NULL, 0, 'D', 'LookupClientID', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51002, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL, MANDATORYLOGIC)
+ VALUES (51003, 0, 0, 'Y', TO_DATE('2007-06-19 22:43:07','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-06-19 23:04:48','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'LookupUrl', NULL, NULL, 0, 'D', 'LookupUrl', 170, 10, NULL, NULL, 100, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51003, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL, MANDATORYLOGIC)
+ VALUES (51004, 0, 0, 'Y', TO_DATE('2007-06-22 02:03:37','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-06-22 02:05:17','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'LookupPassword', NULL, NULL, 0, 'D', 'LookupPassword', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51004, NULL, 'N', 'N', NULL, NULL);
+
+-- Insert Field Definitions
+INSERT INTO ad_field
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+ VALUES (51000, 0, 0, 'Y', TO_DATE('2007-06-19 23:17:05','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-19 23:17:05','YYYY-MM-DD HH24:MI:SS'), 100, 'IsPostcodeLookup', NULL, NULL, 'Y', 135, 51000, NULL, 'Y', NULL, 1, 'N', 220, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+ VALUES (51001, 0, 0, 'Y', TO_DATE('2007-06-19 23:17:06','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-20 09:10:31','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupClassName', NULL, NULL, 'Y', 135, 51001, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 255, 'N', 260, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+ VALUES (51002, 0, 0, 'Y', TO_DATE('2007-06-19 23:17:06','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-20 09:10:17','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupClientID', NULL, NULL, 'Y', 135, 51002, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 240, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+ VALUES (51003, 0, 0, 'Y', TO_DATE('2007-06-19 23:17:06','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-20 09:10:12','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupUrl', NULL, NULL, 'Y', 135, 51003, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 100, 'N', 230, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+ VALUES (51004, 0, 0, 'Y', TO_DATE('2007-06-19 23:17:06','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2007-06-22 02:07:11','YYYY-MM-DD HH24:MI:SS'), 100, 'LookupPassword', NULL, NULL, 'Y', 135, 51004, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 250, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+-- Update Sequences
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/015_postcode_lookup2.sql b/migration/320-330/015_postcode_lookup2.sql
new file mode 100644
index 0000000000..05337bc230
--- /dev/null
+++ b/migration/320-330/015_postcode_lookup2.sql
@@ -0,0 +1,24 @@
+
+---
+-- FEATURE: 1741222 - Add Post code lookup infrastructure
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335
+-- Update additional fields per Carlos request
+
+-- Update Element Definitions
+UPDATE ad_element SET description = 'Does this country have a post code web service', help = 'Enable the IsPostcodeLookup if you wish to configure a post code lookup web service' WHERE ad_element_id = 51000;
+UPDATE ad_element SET description = 'The class name of the postcode lookup plugin', help = 'Enter the class name of the post code lookup plugin for your postcode web service provider' WHERE ad_element_id = 51001;
+UPDATE ad_element SET description = 'The ClientID or Login submitted to the Lookup URL', help ='Enter the ClientID or Login for your account provided by the post code web service provider' WHERE ad_element_id = 51002;
+UPDATE ad_element SET description = 'The password submitted to the Lookup URL', help = 'Enter the password for your account provided by the post code web service provider' WHERE ad_element_id = 51004;
+UPDATE ad_element SET description = 'The URL of the web service that the plugin connects to in order to retrieve postcode data', help = 'Enter the URL of the web service that the plugin connects to in order to retrieve postcode data' WHERE ad_element_id = 51003;
+
+-- Update Column Definitions
+UPDATE ad_column SET description = 'Does this country have a post code web service', help = 'Enable the IsPostcodeLookup if you wish to configure a post code lookup web service' WHERE ad_column_id = 51000;
+UPDATE ad_column SET description = 'The class name of the postcode lookup plugin', help = 'Enter the class name of the post code lookup plugin for your postcode web service provider' WHERE ad_column_id = 51001;
+UPDATE ad_column SET description = 'The ClientID or Login submitted to the Lookup URL', help = 'Enter the ClientID or Login for your account provided by the post code web service provider' WHERE ad_column_id = 51002;
+UPDATE ad_column SET description = 'The password submitted to the Lookup URL', help = 'Enter the password for your account provided by the post code web service provider' WHERE ad_column_id = 51004;
+UPDATE ad_column SET description = 'The URL of the web service that the plugin connects to in order to retrieve postcode data', help = 'Enter the URL of the web service that the plugin connects to in order to retrieve postcode data' WHERE ad_column_id = 51003;
+
+-- Update Field Definitions
+UPDATE ad_field SET seqno = 225 WHERE ad_field_id = 51000;
+
+COMMIT;
diff --git a/migration/320-330/016_new_dashboard.sql b/migration/320-330/016_new_dashboard.sql
new file mode 100644
index 0000000000..eb35ebff9f
--- /dev/null
+++ b/migration/320-330/016_new_dashboard.sql
@@ -0,0 +1,728 @@
+SET DEFINE OFF;
+SET SQLBLANKLINES OFF;
+
+-- create new table
+
+CREATE TABLE PA_DASHBOARDCONTENT
+(
+ pa_dashboardcontent_id NUMBER(10) NOT NULL,
+ ad_client_id NUMBER(10) NOT NULL,
+ ad_org_id NUMBER(10) NOT NULL,
+ created DATE NOT NULL,
+ createdby NUMBER(10) NOT NULL,
+ updated DATE NOT NULL,
+ updatedby NUMBER(10) NOT NULL,
+ isactive CHAR(1 BYTE) NOT NULL,
+ NAME NVARCHAR2(120) NOT NULL,
+ ad_window_id NUMBER(10),
+ description NVARCHAR2(255),
+ html CLOB,
+ line NUMBER,
+ pa_goal_id NUMBER(10),
+ CHECK (isactive IN ('Y','N')),
+ CONSTRAINT pa_dashboardcontent_key
+ PRIMARY KEY
+ (pa_dashboardcontent_id)
+);
+
+-- dictionary additions
+
+-- new table
+
+INSERT INTO AD_TABLE
+ (ad_table_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, tablename, isview, accesslevel, entitytype,
+ issecurityenabled, isdeleteable, ishighvolume, importtable,
+ ischangelog, replicationtype
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content', 'PA_DashboardContent', 'N', '1', 'D',
+ 'N', 'Y', 'N', 'N',
+ 'N', 'L'
+ );
+
+-- new sequence
+
+INSERT INTO AD_SEQUENCE
+ (ad_sequence_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, isautosequence, incrementno,
+ startno, currentnext, currentnextsys, isaudited, istableid,
+ startnewyear
+ )
+ VALUES (50015, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PA_DashboardContent', 'Table PA_DashboardContent', 'Y', 1,
+ 1000000, 1000000, 50000, 'N', 'Y',
+ 'N'
+ );
+
+-- new elements
+
+INSERT INTO AD_ELEMENT
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME, printname
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'HTML', 'D', 'HTML', 'HTML'
+ );
+
+INSERT INTO AD_ELEMENT
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PA_DashboardContent_ID', 'D', 'PA_DashboardContent_ID',
+ 'PA_DashboardContent_ID'
+ );
+
+-- new columns
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Name', 'Alphanumeric identifier of the entity',
+ 'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',
+ 0, 'D', 'Name', 50010, 10,
+ 120, 'N', 'N', 'Y', 'Y',
+ 'Y', 1, 'N', 'N',
+ 'N', 469, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:53', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:53', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Organization', 'Organizational entity within client',
+ 'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',
+ 0, 'D', 'AD_Org_ID', 50010, 19,
+ 10, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 113, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:54', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:54', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Window', 'Data entry or display window',
+ 'The Window field identifies a unique Window in the system.', 0,
+ 'D', 'AD_Window_ID', 50010, 19,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 143, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51008, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:55', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:55', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Created', 'Date this record was created',
+ 'The Created field indicates the date that this record was created.',
+ 0, 'D', 'Created', 50010, 16,
+ 7, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 245, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ ad_reference_value_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51009, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:57', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:57', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Created By', 'User who created this records',
+ 'The Created By field indicates the user who created this record.',
+ 0, 'D', 'CreatedBy', 50010, 18,
+ 110, 10, 'N', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 246, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype,
+ columnname, ad_table_id, ad_reference_id, fieldlength, iskey,
+ isparent, ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:59', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:59', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Description', 'Optional short description of the record',
+ 'A description is limited to 255 characters.', 0, 'D',
+ 'Description', 50010, 10, 255, 'N',
+ 'N', 'N', 'Y', 'N', 'N',
+ 'N', 'N', 275, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ ad_reference_value_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51011, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Updated By', 'User who updated this records',
+ 'The Updated By field indicates the user who updated this record.',
+ 0, 'D', 'UpdatedBy', 50010, 18,
+ 110, 10, 'N', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 608, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, VERSION, entitytype, columnname, ad_table_id,
+ ad_reference_id, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51012, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'HTML', 0, 'D', 'HTML', 50010,
+ 36, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 51005, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51013, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:03', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:03', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Active', 'The record is active in the system',
+ 'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons FOR de-activating AND NOT DELETING records:
+(1) THE SYSTEM requires THE RECORD FOR AUDIT purposes.
+(2) THE RECORD IS referenced BY other records. E.g., you cannot DELETE a Business Partner, IF there are invoices FOR this partner RECORD existing. You de-ACTIVATE THE Business Partner AND prevent that this RECORD IS used FOR future entries.',
+ 0, 'D', 'IsActive', 50010, 20,
+ 1, 'N', 'N', 'Y', 'Y',
+ 'N', 'N', 'N', 'N',
+ 348, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51014, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:04', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:04', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Line No', 'Unique line for this document',
+ 'Indicates the unique line for a document. It will also control the display order of the lines within a document.',
+ 0, 'D', 'Line', 50010, 22,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 439, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51015, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:05', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:05', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Goal', 'Performance Goal',
+ 'The Performance Goal indicates what this users performance will be measured against.',
+ 0, 'D', 'PA_Goal_ID', 50010, 19,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 1594, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51016, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:06', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:06', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Updated', 'Date this record was updated',
+ 'The Updated field indicates the date that this record was updated.',
+ 0, 'D', 'Updated', 50010, 16,
+ 7, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 607, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51017, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Client', 'Client/Tenant for this installation.',
+ 'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',
+ 0, 'D', 'AD_Client_ID', 50010, 19,
+ 10, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 102, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51018, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'PA_DashboardContent_ID', 0, 'D', 'PA_DashboardContent_ID',
+ 50010, 13, 10, 'Y', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 51006, 'Y',
+ 'N'
+ );
+
+-- new window
+
+INSERT INTO AD_WINDOW
+ (ad_window_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, windowtype, issotrx, entitytype, processing, isdefault,
+ isbetafunctionality
+ )
+ VALUES (50007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:12', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content Edit', 'M', 'Y', 'D', 'N', 'N',
+ 'N'
+ );
+
+-- new menu
+
+INSERT INTO AD_MENU
+ (ad_menu_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated,
+ NAME, updatedby, issummary, issotrx, isreadonly, action,
+ ad_window_id, entitytype
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'),
+ 'Dashboard Content Edit', 100, 'N', 'N', 'N', 'W',
+ 50007, 'D'
+ );
+
+-- new menu in tree
+
+INSERT INTO AD_TREENODEMM
+ (ad_tree_id, node_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ parent_id, seqno
+ )
+ VALUES (10, 50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:35', 'MM/DD/YYYY HH24:MI:SS'), 0,
+ TO_DATE ('07/09/2007 14:23:35', 'MM/DD/YYYY HH24:MI:SS'), 0,
+ 175, 0
+ );
+
+-- access to new window
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 0, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 102, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 103, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 50001, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+-- new tab
+
+INSERT INTO AD_TAB
+ (ad_tab_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, ad_table_id, ad_window_id, seqno, tablevel, issinglerow,
+ isinfotab, istranslationtab, isreadonly, hastree, processing,
+ issorttab, entitytype, isinsertrecord, isadvancedtab
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:15', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Edit', 50010, 50007, 10, 0, 'Y',
+ 'N', 'N', 'N', 'N', 'N',
+ 'N', 'D', 'Y', 'N'
+ );
+
+-- new fields
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:09', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:17', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Client', 'Client/Tenant for this installation.',
+ 'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',
+ 'Y', 50010, 51017, 'Y',
+ 10, 'N', 10, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:18', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Organization', 'Organizational entity within client',
+ 'An organization is a unit of your client or legal entity - examples are store department. You can share data between organizations.',
+ 'Y', 50010, 51006, 'Y',
+ 10, 'N', 20, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Name', 'Alphanumeric identifier of the entity',
+ 'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',
+ 'Y', 50010, 51005, 'Y',
+ 120, 'N', 30, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51008, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:22', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Active', 'The record is active in the system',
+ 'There are two methods of making records unavailable in the system: One is to delete the record the other is to de-activate the record. A de-activated record is not available for selection but available for reports.
+There are two reasons FOR de-activating AND NOT DELETING records:
+(1) THE SYSTEM requires THE RECORD FOR AUDIT purposes.
+(2) THE RECORD IS referenced BY other records. E.g. you cannot DELETE a Business Partner IF there are invoices FOR this partner RECORD existing. You de-ACTIVATE THE Business Partner AND prevent that this RECORD IS used FOR future entries.',
+ 'Y', 50010, 51013, 'Y',
+ 1, 'N', 40, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51009, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:23', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Line No', 'Unique line for this document',
+ 'Indicates the unique line for a document. It will also control the display order of the lines within a document.',
+ 'Y', 50010, 51014, 'Y',
+ 22, 'N', 50, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP, iscentrallymaintained, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly, seqno,
+ sortno, issameline, isheading, isfieldonly, isencrypted,
+ entitytype
+ )
+ VALUES (51010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:24', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Description', 'Optional short description of the record',
+ 'A description is limited to 255 characters.', 'Y', 50010,
+ 51010, 'Y', 255, 'N', 60,
+ 0, 'N', 'N', 'N', 'N',
+ 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, iscentrallymaintained, ad_tab_id, ad_column_id,
+ isdisplayed, displaylength, isreadonly, seqno, sortno,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51011, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:26', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'HTML', 'Y', 50010, 51012,
+ 'Y', 0, 'N', 70, 0,
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51012, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:27', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Goal', 'Performance Goal',
+ 'The Performance Goal indicates what this users performance will be measured against.',
+ 'Y', 50010, 51015, 'Y',
+ 22, 'N', 80, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51013, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:29', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Window', 'Data entry or display window',
+ 'The Window field identifies a unique Window in the system.',
+ 'Y', 50010, 51007, 'Y',
+ 22, 'N', 90, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, iscentrallymaintained, ad_tab_id, ad_column_id,
+ isdisplayed, displaylength, isreadonly, seqno, sortno,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51014, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content', 'Y', 50010, 51018,
+ 'N', 10, 'N', 0, 0,
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+-- assign window to new table
+
+UPDATE AD_TABLE
+ SET ad_window_id = 50007
+ WHERE ad_table_id = 50010;
+
+
+-- NOTE: Don't forget to run the three processes:
+-- 1 - Add missing translations
+-- 2 - Synchronize terminology
+-- 3 - Check sequences
diff --git a/migration/320-330/017_update_non_encrypted.sql b/migration/320-330/017_update_non_encrypted.sql
new file mode 100644
index 0000000000..af3e589ccb
--- /dev/null
+++ b/migration/320-330/017_update_non_encrypted.sql
@@ -0,0 +1,17 @@
+-- Please review before apply
+-- if you have any of this columns REALLY encrypted you must not apply this patch:
+-- AD_USER.EMailUserPW
+-- AD_USER.Password
+-- C_PAYMENTPROCESSOR.Password
+-- C_PAYMENTPROCESSOR.ProxyPassword
+
+-- defining columns non encrypted by default as discussed here
+-- [ 1722235 ] ENCRYPTION FOR PASSWORD wrongly MANAGED
+-- https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1722235&group_id=176962
+
+UPDATE AD_COLUMN
+ SET isencrypted = 'N',
+ updated = TO_DATE ('07/10/2007 00:00:01', 'MM/DD/YYYY HH24:MI:SS')
+ WHERE ad_column_id IN (417, 5059, 5065, 7794);
+
+COMMIT ;
\ No newline at end of file
diff --git a/migration/320-330/018_version330.sql b/migration/320-330/018_version330.sql
new file mode 100644
index 0000000000..04578883ee
--- /dev/null
+++ b/migration/320-330/018_version330.sql
@@ -0,0 +1,6 @@
+UPDATE AD_SYSTEM
+ SET releaseno = '330',
+ VERSION = '2007-07-13'
+ WHERE ad_system_id = 0 AND ad_client_id = 0;
+
+COMMIT ;
diff --git a/migration/320-330/019_RMA_dml.sql b/migration/320-330/019_RMA_dml.sql
new file mode 100644
index 0000000000..3663ffb8fd
--- /dev/null
+++ b/migration/320-330/019_RMA_dml.sql
@@ -0,0 +1,287 @@
+-- Element change
+
+INSERT INTO AD_ELEMENT
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY,COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+VALUES
+ (52000,0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'InOut_ID', 'D', 'Shipment/Receipt', 'Shipment/Receipt', 'MaterialShipment Document', 'The Material Shipment / Receipt ', 'Receipt', 'Receipt', 'Material Receipt Document', 'The Material Shipment / Receipt ');
+
+
+-- Rule
+
+INSERT INTO AD_VAL_RULE
+ (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOutShipment/Receipt', NULL, 'S', 'M_InOut.MovementType IN (''C-'', ''V+'') AND M_InOut.DocStatus IN (''CO'', ''CL'')', 'D');
+
+INSERT INTO AD_VAL_RULE
+ (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOutShipment/Receipt (RMA)', NULL, 'S', 'M_InOutLine.M_InOut_ID=@InOut_ID@', 'D');
+
+
+-- Processes
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52000, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_RMA_CreateOrder', 'Create Order From RMA', 'Creates an order based on this RMA Document. The RMA should be correct and completed.', 'Generate Order from RMA will create an order based on this RMA document.', '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.RMACreateOrder', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52001, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOut_GenerateRMA (Manual)', 'Generate Shipments for Vendor RMA', 'Generate Shipments from open vendor RMA based on selection.', NULL, '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.InOutGenerateRMA', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52002, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'C_Invoice_GenerateRMA (Manual)', 'Generate Invoices for Vendor RMA', 'Generate Invoices from open vendor RMA based on selection.', NULL, '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.InvoiceGenerateRMA', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+
+-- Column Addition
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Sales Transaction', 'This is a Sales Transaction', 'The Sales Transaction checkbox indicates if this item is a Sales Transaction.', 1, 'D', 'IsSOTrx', 661, 20, NULL, NULL, 1, '@IsSOTrx@', 'N', 'N', 'Y', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 1106, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Amount', 'Amount', 'Amount', 1, 'D', 'Amt', 660, 12, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', '@M_InOutLine_ID@!0', 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 160, NULL, 'N', 'N', NULL);
+
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52002, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Charge', 'Additional document charges', 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', 1, 'D', 'C_Charge_ID', 660, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 968, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52003, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Line Amount', 'Line Extended Amount (Quantity * Actual Price) without Freight and Charges','Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.', 1, 'D', 'LineNetAmt', 660, 12, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 441, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52004, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Line No', 'Unique line for this document', 'Indicates the unique line for a document. It will also control the display order of the lines within a document.', 1, 'D', 'Line', 660, 11, NULL, NULL, 22, '@SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_RMALine WHERE M_RMA_ID=@M_RMA_ID@', 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 439, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52005, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Delivered Quantity', 'Delivered Quantity', 'The Delivered Quantity indicates the quantity of a product that has been delivered.', 1, 'D', 'QtyDelivered', 660, 29, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 528, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52006, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Generate To', 'Generate To', NULL, 0, 'D', 'GenerateTo', 661, 28, NULL, NULL, 1, NULL, 'N','N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 1491, 52000, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52007, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 1, 'D', 'M_RMA_ID', 318, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2412, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52008, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA Line', 'Return Material Authorization Line', 'Detail information about the returned goods', 1, 'D', 'M_RMALine_ID', 333, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2413, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52009, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 1, 'D', 'M_RMA_ID', 319, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2412, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52010, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA Line', 'Return Material Authorization Line', 'Detail information about the returned goods', 0, 'D', 'M_RMALine_ID', 320, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2413, NULL, 'N', 'N', NULL);
+
+
+-- Field addition
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Create Order From RMA', 'Creates an order based on the RMA document', NULL, 'Y', 628, 52006, NULL, 'Y', '@Processed@=''Y'' & @C_Order_ID@=0 & @DocStatus@=''CO''', 1, 'N', 160, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Amount', 'Amount', 'Amount', 'Y', 629, 52001, NULL, 'Y', NULL, 22, 'N', 100, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52002, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Charge', 'Additional document charges', 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', 'Y', 629, 52002, NULL, 'Y', NULL, 22, 'N', 80, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52003, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Delivered Quantity', 'Delivered Quantity', 'The Delivered Quantity indicates the quantity of a product that has been delivered.', 'Y', 629, 52005, NULL, 'N', NULL, 22, 'N', 0, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52004, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Line Amount', 'Line Extended Amount (Quantity * Actual Price) without Freight and Charges', 'Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.', 'Y', 629, 52003, NULL, 'Y', NULL, 22, 'Y', 110, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52005, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Line No', 'Unique line for this document', 'Indicates the unique line for a document. It will also control the display order of the lines within a document.', 'Y', 629, 52004, NULL, 'Y', NULL, 22, 'N', 40, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD(ad_field_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, help, iscentrallymaintained, ad_tab_id, ad_column_id, ad_fieldgroup_id, isdisplayed, displaylogic, displaylength, isreadonly, seqno, sortno, issameline, isheading, isfieldonly, isencrypted, entitytype, obscuretype, ad_reference_id, ismandatory)
+ VALUES(52007, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Sales Transaction', 'This is a Sales Transaction', 'The Sales Transaction checkbox indicates if this item is a Sales Transaction.', 'Y', 628, 52000, NULL, 'N', NULL, 1, 'N', NULL, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+-- Update Field
+
+UPDATE AD_FIELD SET SeqNo=(SeqNo + 10) WHERE AD_Tab_ID=296 AND SeqNo > 40;
+
+INSERT INTO AD_FIELD
+(ad_field_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, help, iscentrallymaintained, ad_tab_id, ad_column_id, ad_fieldgroup_id, isdisplayed, displaylogic, displaylength, isreadonly, seqno, sortno, issameline, isheading, isfieldonly, isencrypted, entitytype, obscuretype, ad_reference_id, ismandatory)
+ VALUES(52006, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 'Y', 296, 52009, NULL, 'Y', '@M_RMA_ID@!0', 26, 'Y', 50, 0, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+
+-- Garden World RMA Fix
+
+INSERT INTO AD_SEQUENCE(ad_sequence_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, vformat, isautosequence, incrementno, startno, currentnext, currentnextsys, isaudited, istableid, prefix, suffix, startnewyear)
+ VALUES(52000, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, 'Vendor Return Material', NULL, NULL, 'Y', 1, 990000, 990000, 900, 'N', 'N', NULL, NULL, 'N');
+
+INSERT INTO AD_SEQUENCE(ad_sequence_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, vformat, isautosequence, incrementno, startno, currentnext, currentnextsys, isaudited, istableid, prefix, suffix, startnewyear)
+ VALUES(52001, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, 'MM Vendor Return', 'MM Vendor Return', NULL, 'Y', 1, 590000, 590000, 59000, 'N', 'N', NULL, NULL, 'N');
+
+INSERT INTO C_DOCTYPE(c_doctype_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, printname, description, docbasetype, issotrx, docsubtypeso, hasproforma, c_doctypeproforma_id, c_doctypeshipment_id, c_doctypeinvoice_id, isdocnocontrolled, docnosequence_id, gl_category_id, hascharges, documentnote, isdefault, documentcopies, ad_printformat_id, isdefaultcounterdoc, isshipconfirm, ispickqaconfirm, isintransit, issplitwhendifference, c_doctypedifference_id, iscreatecounter, isindexed)
+ VALUES(151, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'MM Vendor Return', 'Vendor Return Material', NULL, 'MMS', 'Y', NULL, 'N', NULL, NULL, NULL, 'Y', 52001, 111, 'N', NULL, 'Y', 1, NULL, 'N', 'N', 'N', 'N', 'N', NULL, 'Y', 'Y');
+
+INSERT INTO C_DOCTYPE(c_doctype_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, printname, description, docbasetype, issotrx, docsubtypeso, hasproforma, c_doctypeproforma_id, c_doctypeshipment_id, c_doctypeinvoice_id, isdocnocontrolled, docnosequence_id, gl_category_id, hascharges, documentnote, isdefault, documentcopies, ad_printformat_id, isdefaultcounterdoc, isshipconfirm, ispickqaconfirm, isintransit, issplitwhendifference, c_doctypedifference_id, iscreatecounter, isindexed)
+ VALUES(150, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Vendor Return Material', 'Vendor Return Material Authorization', NULL, 'POO', 'N', 'RM', 'N', NULL, 151, 124, 'Y', 52000, 111, 'N', NULL, 'N', 1, NULL, 'N', 'N', 'N', 'N', 'N', NULL, 'Y', 'Y');
+
+-- Message Addition
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'OrderOrRMA', 'Either Order or RMA can be process on this document.', NULL, 'E', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'VendorRMA', 'Vendor RMA', NULL, 'I', 'D');
+
+-- Misc AD Updates
+
+UPDATE AD_COLUMN SET ColumnName='InOut_ID' WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Element_ID=52000 WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Reference_Value_ID=337 WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Val_Rule_ID=52000 WHERE AD_Column_ID=10842;
+
+UPDATE AD_TAB SET WhereClause='MovementType IN (''C+'', ''V+'')' WHERE AD_Tab_ID=296;
+
+UPDATE AD_TAB SET WhereClause='MovementType IN (''C-'', ''V-'')' WHERE AD_Tab_ID=257;
+
+UPDATE AD_COLUMN SET IsMandatory='N' WHERE AD_Column_ID=10829;
+
+UPDATE AD_COLUMN SET AD_Val_Rule_ID=52001 WHERE AD_Column_ID=10829;
+
+UPDATE AD_FIELD SET SeqNo=60, IsSameLine='N' WHERE AD_Field_ID=9310;
+
+UPDATE AD_FIELD SET SeqNo=20, IsSameLine='Y' WHERE AD_Field_ID=9311;
+
+UPDATE AD_FIELD SET SeqNo=70, IsSameLine='N' WHERE AD_Field_ID=9312;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=9313;
+
+UPDATE AD_FIELD SET SeqNo=30, IsSameLine='N' WHERE AD_Field_ID=9314;
+
+UPDATE AD_FIELD SET SeqNo=50, IsSameLine='N' WHERE AD_Field_ID=9315;
+
+UPDATE AD_FIELD SET SeqNo=90, IsSameLine='N' WHERE AD_Field_ID=9316;
+
+UPDATE AD_FIELD SET SeqNo=10, IsSameLine='N' WHERE AD_Field_ID=9317;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=10401;
+
+UPDATE AD_FIELD SET SeqNo=100, IsSameLine='Y' WHERE AD_Field_ID=52001;
+
+UPDATE AD_FIELD SET SeqNo=80, IsSameLine='Y' WHERE AD_Field_ID=52002;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=52003;
+
+UPDATE AD_FIELD SET SeqNo=110, IsSameLine='N' WHERE AD_Field_ID=52004;
+
+UPDATE AD_FIELD SET SeqNo=40, IsSameLine='Y' WHERE AD_Field_ID=52005;
+
+UPDATE AD_TAB SET IsSingleRow='Y' WHERE AD_Tab_ID=628;
+
+UPDATE AD_TAB SET IsSingleRow='Y' WHERE AD_Tab_ID=629;
+
+UPDATE C_DOCTYPE SET IsActive='Y' WHERE C_DocType_ID=149;
+
+
+UPDATE AD_COLUMN SET Callout='org.adempiere.model.CalloutRMA.docType' WHERE AD_Column_ID=12118;
+
+UPDATE AD_COLUMN SET ReadOnlyLogic='@IsSOTrx@=''N''' WHERE AD_Column_ID=52006;
+
+UPDATE AD_FIELD SET DisplayLogic='@Processed@=''Y'' & @C_Order_ID@=0 & @DocStatus@=''CO'' & @IsSOTrx@=''Y'''
+WHERE AD_Field_ID=52000;
+
+UPDATE AD_REF_TABLE SET WhereClause='C_DocType.DocBaseType IN (''SOO'', ''POO'') AND C_DocType.DocSubTypeSO=''RM'' AND C_DocType.AD_Client_ID=@#AD_Client_ID@'
+WHERE AD_Reference_ID=321;
+
+UPDATE AD_VAL_RULE SET Code='M_InOutLine.M_InOut_ID=@InOut_ID@ AND NOT EXISTS (SELECT * FROM M_RMALine rl WHERE rl.M_InOutLine_ID=M_InOutLine.M_InOutLine_ID AND rl.M_RMA_ID=@M_RMA_ID@)'
+WHERE AD_Val_Rule_ID=52001;
+
+UPDATE C_DOCTYPE SET NAME='MM Returns', IsSOTrx='N' WHERE C_DocType_ID=149;
+
+COMMIT;
+
+
+-- NOTE: Don't forget to run the three processes:
+-- 1 - Add missing translations
+-- 2 - Synchronize terminology
+-- 3 - Check sequences
diff --git a/migration/320-330/020_RMA_Oracle_ddl.sql b/migration/320-330/020_RMA_Oracle_ddl.sql
new file mode 100644
index 0000000000..3c2370c991
--- /dev/null
+++ b/migration/320-330/020_RMA_Oracle_ddl.sql
@@ -0,0 +1,38 @@
+-- Oracle Changes
+
+ALTER TABLE C_Invoice ADD M_RMA_ID NUMBER(10, 0) DEFAULT NULL;
+
+ALTER TABLE C_InvoiceLine ADD M_RMALine_ID NUMBER(10,0) DEFAULT NULL;
+
+ALTER TABLE M_InOut ADD M_RMA_ID NUMBER(10,0) DEFAULT NULL;
+
+ALTER TABLE M_InOutLine ADD M_RMALine_ID NUMBER(10,0) DEFAULT NULL;
+
+ALTER TABLE M_RMA ADD IsSOTrx CHAR(1) DEFAULT 'Y' CHECK (IsSOTrx IN ('Y', 'N')) NOT NULL;
+
+ALTER TABLE M_RMA RENAME COLUMN M_InOut_ID TO InOut_ID;
+
+ALTER TABLE M_RMA ADD GenerateTo CHAR(1) DEFAULT NULL;
+
+ALTER TABLE M_RMALine ADD Amt NUMBER(22,2);
+
+ALTER TABLE M_RMALine ADD C_Charge_ID NUMBER(10,0);
+
+ALTER TABLE M_RMALine ADD Line NUMBER(10,0) DEFAULT 0 NOT NULL;
+
+ALTER TABLE M_RMALine ADD LineNetAmt NUMBER(22,2);
+
+ALTER TABLE M_RMALine ADD QtyDelivered NUMBER(22,2);
+
+ALTER TABLE M_RMALine MODIFY M_InOutLine_ID NUMBER(10,0) NULL;
+
+
+-- Constraints
+
+ALTER TABLE C_Invoice ADD CONSTRAINT mrma_cinvoice FOREIGN KEY (M_RMA_ID) REFERENCES M_RMA (M_RMA_ID);
+
+ALTER TABLE C_InvoiceLine ADD CONSTRAINT mrmaline_cinvoiceline FOREIGN KEY (M_RMALine_ID) REFERENCES M_RMALine (M_RMALine_ID);
+
+ALTER TABLE M_InOut ADD CONSTRAINT mrma_minout FOREIGN KEY (M_RMA_ID) REFERENCES M_RMA (M_RMA_ID);
+
+ALTER TABLE M_InOutLine ADD CONSTRAINT mrmaline_minoutline FOREIGN KEY (M_RMALine_ID) REFERENCES M_RMALine (M_RMALine_ID);
diff --git a/migration/320-330/021_BF_1754751.sql b/migration/320-330/021_BF_1754751.sql
new file mode 100644
index 0000000000..e06382e60e
--- /dev/null
+++ b/migration/320-330/021_BF_1754751.sql
@@ -0,0 +1,5 @@
+UPDATE AD_WINDOW
+ SET windowtype = 'M'
+ WHERE ad_window_id = 319 AND windowtype = 'T';
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/022_BF_1746900.sql b/migration/320-330/022_BF_1746900.sql
new file mode 100644
index 0000000000..4082be6879
--- /dev/null
+++ b/migration/320-330/022_BF_1746900.sql
@@ -0,0 +1,33 @@
+-- Update help for "C_AcctSchema_Default_Copy" process
+ UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.AcctSchemaDefaultCopy',
+ help = 'Either add missing accounts - or copy and overwrite all default accounts. If you copy and overwrite the current default values, you may have to repeat previous updates (e.g. set the bank account asset accounts, ...). If no Accounting Schema is selected all Accounting Schemas will be updated / inserted.'
+ WHERE AD_Process_ID=108;
+
+-- Update Accounting Schema parameter for "C_AcctSchema_Default_Copy" process
+UPDATE AD_PROCESS_PARA
+ SET ismandatory = 'Y'
+ WHERE ad_process_para_id= 669;
+
+-- Update help for "M_Product_Category_Acct_Copy" process
+UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.ProductCategoryAcctCopy',
+ help = 'If you copy and overwrite the current default values, you may have to repeat previous updates (e.g. set the revenue account, ...). If no Accounting Schema is selected all Accounting Schemas will be updated / inserted for products of this category.'
+ WHERE AD_Process_ID=140;
+
+-- Update help for "M_Product_Category_Acct_Copy" process (SPANISH translation)
+UPDATE AD_PROCESS_TRL
+ SET help ='El proceso de copiar cuentas tomará las cuentas definidas para una categoría de producto y las copiará a cualquier producto que que haga referencia a esta categoría. Si una cuenta existe a nivel de producto sera sobreescrita. Si no selecciona un Esquema Contable serán actualizados para todos los que estén definidos.'
+ WHERE AD_Process_ID=140
+ AND AD_LANGUAGE LIKE 'es_%';
+
+-- Update Accounting Schema parameter for "M_Product_Category_Acct_Copy" process.
+UPDATE AD_PROCESS_PARA
+ SET ismandatory = 'Y'
+ WHERE AD_Process_Para_ID=668;
+
+ UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.BPGroupAcctCopy'
+ WHERE AD_Process_ID=112;
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/023_Reverse_BF_1740254.sql b/migration/320-330/023_Reverse_BF_1740254.sql
new file mode 100644
index 0000000000..5afa97b044
--- /dev/null
+++ b/migration/320-330/023_Reverse_BF_1740254.sql
@@ -0,0 +1,12 @@
+--
+-- [ 1740254 ] PriceList Version is empty in Product-Price tab
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1740254&group_id=176962&atid=879332
+--
+-- Column M_ProductPrice.M_PriceList_Version_ID:
+
+-- Original File 012_BF_1740254.sql was deleted - the original file put the IsParent='N'
+-- restoring past value from IsParent because somebody could apply this patch into their system
+
+UPDATE AD_COLUMN SET IsParent='Y' WHERE AD_Column_ID=2760;
+
+COMMIT;
diff --git a/migration/320-330/024_BF_1564496.sql b/migration/320-330/024_BF_1564496.sql
new file mode 100644
index 0000000000..078ef2d58d
--- /dev/null
+++ b/migration/320-330/024_BF_1564496.sql
@@ -0,0 +1,5 @@
+UPDATE AD_COLUMN
+ SET callout = 'org.compiere.model.CalloutMovement.qty'
+ WHERE ad_column_id = 3594;
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/025_Reverse_BF_1739541.sql b/migration/320-330/025_Reverse_BF_1739541.sql
new file mode 100644
index 0000000000..dc555ee727
--- /dev/null
+++ b/migration/320-330/025_Reverse_BF_1739541.sql
@@ -0,0 +1,11 @@
+--
+-- [ 1739541 ] Organization in Window "Role" problem
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1739541&group_id=176962&atid=879332
+--
+-- Original File 011_BF_1739541.sql was deleted - the original file put the IsParent='N'
+-- restoring past value from IsParent because somebody could apply this patch into their system
+--
+-- Column AD_Role_OrgAccess.AD_Org_ID:
+UPDATE AD_Column SET IsParent='Y' WHERE AD_Column_ID=5508 AND IsParent='N';
+--
+COMMIT;
diff --git a/migration/320-330/026_BF_1759181.sql b/migration/320-330/026_BF_1759181.sql
new file mode 100644
index 0000000000..19ea38ff0c
--- /dev/null
+++ b/migration/320-330/026_BF_1759181.sql
@@ -0,0 +1,10 @@
+/*
+ Fix bug in Application Dictionary
+ [ 1759181 ] AD_Color.ColorType is defined as Color and must be List
+*/
+
+UPDATE AD_COLUMN
+ SET ad_reference_id = 17
+ WHERE ad_column_id = 6232 AND ad_reference_id = 27;
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/001_add_brazilian_states.sql b/migration/320-330/postgresql/001_add_brazilian_states.sql
new file mode 100644
index 0000000000..d5efbfc9b2
--- /dev/null
+++ b/migration/320-330/postgresql/001_add_brazilian_states.sql
@@ -0,0 +1,43 @@
+--Enable Brazil in country Table
+UPDATE c_country SET hasregion = 'Y', regionname = 'Estado' WHERE c_country_id = 139;
+
+COMMIT;
+
+--Add Brazilian States
+INSERT INTO c_region VALUES (441, 0, 0, 'Y', '2007-04-30 16:40:42', 0, '2007-04-30 16:40:42', 0, 'AC', 'Acre', 139, 'N');
+INSERT INTO c_region VALUES (442, 0, 0, 'Y', '2007-04-30 16:40:57', 0, '2007-04-30 16:40:57', 0, 'AL', 'Alagoas', 139, 'N');
+INSERT INTO c_region VALUES (443, 0, 0, 'Y', '2007-04-30 16:41:06', 0, '2007-04-30 16:41:06', 0, 'AP', 'Amapá', 139, 'N');
+INSERT INTO c_region VALUES (444, 0, 0, 'Y', '2007-04-30 16:41:19', 0, '2007-04-30 16:41:19', 0, 'AM', 'Amazonas', 139, 'N');
+INSERT INTO c_region VALUES (445, 0, 0, 'Y', '2007-04-30 16:41:29', 0, '2007-04-30 16:41:29', 0, 'BA', 'Bahia', 139, 'N');
+INSERT INTO c_region VALUES (446, 0, 0, 'Y', '2007-04-30 16:41:49', 0, '2007-04-30 16:41:49', 0, 'CE', 'Ceará°', 139, 'N');
+INSERT INTO c_region VALUES (447, 0, 0, 'Y', '2007-04-30 16:42:04', 0, '2007-04-30 16:42:04', 0, 'DF', 'Distrito Federal', 139, 'N');
+INSERT INTO c_region VALUES (448, 0, 0, 'Y', '2007-04-30 16:42:19', 0, '2007-04-30 16:42:19', 0, 'ES', 'EspÃrito Santo', 139, 'N');
+INSERT INTO c_region VALUES (449, 0, 0, 'Y', '2007-04-30 16:42:34', 0, '2007-04-30 16:42:34', 0, 'GO', 'Goiás', 139, 'N');
+INSERT INTO c_region VALUES (450, 0, 0, 'Y', '2007-04-30 16:42:40', 0, '2007-04-30 16:42:40', 0, 'MA', 'Maranhão', 139, 'N');
+INSERT INTO c_region VALUES (451, 0, 0, 'Y', '2007-04-30 16:42:49', 0, '2007-04-30 16:42:49', 0, 'MT', 'Mato Grosso', 139, 'N');
+INSERT INTO c_region VALUES (452, 0, 0, 'Y', '2007-04-30 16:43:00', 0, '2007-04-30 16:43:00', 0, 'MS', 'Mato Grosso do Sul', 139, 'N');
+INSERT INTO c_region VALUES (453, 0, 0, 'Y', '2007-04-30 16:43:11', 0, '2007-04-30 16:43:11', 0, 'MG', 'Minas Gerais', 139, 'N');
+INSERT INTO c_region VALUES (454, 0, 0, 'Y', '2007-04-30 16:43:21', 0, '2007-04-30 16:43:21', 0, 'PA', 'Pará', 139, 'N');
+INSERT INTO c_region VALUES (455, 0, 0, 'Y', '2007-04-30 16:43:31', 0, '2007-04-30 16:43:31', 0, 'PB', 'ParaÃba', 139, 'N');
+INSERT INTO c_region VALUES (456, 0, 0, 'Y', '2007-04-30 16:43:40', 0, '2007-04-30 16:43:40', 0, 'PR', 'Paraná', 139, 'N');
+INSERT INTO c_region VALUES (457, 0, 0, 'Y', '2007-04-30 16:43:53', 0, '2007-04-30 16:43:53', 0, 'PE', 'Pernambuco', 139, 'N');
+INSERT INTO c_region VALUES (458, 0, 0, 'Y', '2007-04-30 16:44:03', 0, '2007-04-30 16:44:03', 0, 'PI', 'PiauÃ', 139, 'N');
+INSERT INTO c_region VALUES (459, 0, 0, 'Y', '2007-04-30 16:44:30', 0, '2007-04-30 16:44:30', 0, 'RJ', 'Rio de Janeiro', 139, 'N');
+INSERT INTO c_region VALUES (460, 0, 0, 'Y', '2007-04-30 16:44:43', 0, '2007-04-30 16:44:43', 0, 'RN', 'Rio Grande do Norte', 139, 'N');
+INSERT INTO c_region VALUES (461, 0, 0, 'Y', '2007-04-30 16:44:59', 0, '2007-04-30 16:44:59', 0, 'RS', 'Rio Grande do Sul', 139, 'N');
+INSERT INTO c_region VALUES (462, 0, 0, 'Y', '2007-04-30 16:45:07', 0, '2007-04-30 16:45:07', 0, 'RO', 'Rondônia', 139, 'N');
+INSERT INTO c_region VALUES (463, 0, 0, 'Y', '2007-04-30 16:45:20', 0, '2007-04-30 16:45:20', 0, 'RR', 'Roraima', 139, 'N');
+INSERT INTO c_region VALUES (464, 0, 0, 'Y', '2007-04-30 16:45:30', 0, '2007-04-30 16:45:30', 0, 'SC', 'Santa Catarina', 139, 'N');
+INSERT INTO c_region VALUES (465, 0, 0, 'Y', '2007-04-30 16:45:40', 0, '2007-04-30 16:45:40', 0, 'SP', 'Sõo Paulo', 139, 'N');
+INSERT INTO c_region VALUES (466, 0, 0, 'Y', '2007-04-30 16:45:53', 0, '2007-04-30 16:45:53', 0, 'SE', 'Sergipe', 139, 'N');
+INSERT INTO c_region VALUES (467, 0, 0, 'Y', '2007-04-30 16:46:03', 0, '2007-04-30 16:46:03', 0, 'TO', 'Tocantins', 139, 'N');
+
+COMMIT;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (c_region_id) + 1
+ FROM C_REGION
+ WHERE c_region_id < 1000000)
+ WHERE NAME = 'C_Region';
+
+COMMIT;
diff --git a/migration/320-330/postgresql/002_add_feature_1714090.sql b/migration/320-330/postgresql/002_add_feature_1714090.sql
new file mode 100644
index 0000000000..aba71211f7
--- /dev/null
+++ b/migration/320-330/postgresql/002_add_feature_1714090.sql
@@ -0,0 +1,31 @@
+-- Feature Request
+-- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335
+
+INSERT INTO AD_PROCESS_PARA
+ (ad_process_para_id, ad_client_id, ad_org_id, isactive, created,
+ createdby, updated, updatedby,
+ NAME, description,
+ HELP,
+ ad_process_id, seqno, ad_reference_id, ad_reference_value_id,
+ ad_val_rule_id, columnname, iscentrallymaintained, fieldlength,
+ ismandatory, isrange, ad_element_id, entitytype
+ )
+ VALUES (50019, 0, 0, 'Y', TO_TIMESTAMP ('2007-03-03', 'YYYY-MM-DD'),
+ 100, TO_TIMESTAMP ('2007-03-03', 'YYYY-MM-DD'), 100,
+ 'Shipment Date', 'Date printed on shipment',
+ 'The Shipment Date indicates the date printed on the shipment.',
+ 118, 15, 15, NULL,
+ NULL, 'MovementDate', 'N', 0,
+ 'Y', 'N', 1037, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1
+ FROM AD_PROCESS_PARA
+ WHERE ad_process_para_id < 1000000)
+ WHERE NAME = 'AD_Process_Para';
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/003_make_feature_1714090_optional.sql b/migration/320-330/postgresql/003_make_feature_1714090_optional.sql
new file mode 100644
index 0000000000..b424a9a280
--- /dev/null
+++ b/migration/320-330/postgresql/003_make_feature_1714090_optional.sql
@@ -0,0 +1,8 @@
+UPDATE AD_PROCESS_PARA
+ SET defaultvalue = NULL,
+ ismandatory = 'N',
+ updated = TO_TIMESTAMP ('2007-05-07 20:55:59', 'YYYY-MM-DD HH24:MI:SS'),
+ updatedby = 100
+ WHERE ad_process_para_id = 50019;
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/005_2pack_enhancements_message.sql b/migration/320-330/postgresql/005_2pack_enhancements_message.sql
new file mode 100644
index 0000000000..5360e733db
--- /dev/null
+++ b/migration/320-330/postgresql/005_2pack_enhancements_message.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_PACKAGE_EXP_DETAIL ADD ad_message_id NUMERIC(10,0);
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, seqno, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50213, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/14/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_TIMESTAMP ('05/14/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Message', 'System Message',
+ 'Information and Error messages', 0, 'D', 'AD_Message_ID',
+ 50006, 19, 22, 'N', 'N',
+ 'N', 'Y', 'N', 0, 'N',
+ 'N', 'N', 1752, 'N',
+ 'N'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylogic, displaylength, isreadonly, seqno, issameline,
+ isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50183, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/14/2007 19:51:35', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('05/14/2007 19:52:28', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Message', 'System Message', 'Information and Error messages',
+ 'Y', 50006, 50213, 'Y',
+ '@Type@=''MSG''', 22, 'N', 246, 'N',
+ 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_REF_LIST
+ (ad_ref_list_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ VALUE, NAME, ad_reference_id, entitytype
+ )
+ VALUES (50043, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'MSG', 'Message', 50004, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM AD_COLUMN
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM AD_FIELD
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_ref_list_id) + 1
+ FROM AD_REF_LIST
+ WHERE ad_ref_list_id < 1000000)
+ WHERE NAME = 'AD_Ref_List';
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/007_add_StoreArchiveOnFilesystem.sql b/migration/320-330/postgresql/007_add_StoreArchiveOnFilesystem.sql
new file mode 100644
index 0000000000..3b97fe8ded
--- /dev/null
+++ b/migration/320-330/postgresql/007_add_StoreArchiveOnFilesystem.sql
@@ -0,0 +1,248 @@
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50071, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'StoreArchiveOnFileSystem', 'D', 'Store Archive On File System',
+ 'Store Archive On File System'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, callout, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50214, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Store Archive On File System', 'Store Archive On File System', 1,
+ 'D', 'StoreArchiveOnFileSystem', 112, 20,
+ 1, 'N', 'N', 'Y', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50071, 'org.compiere.model.CalloutClient.storeArchiveOnFileSystem', 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50184, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Store Archive On File System', 'Store Archive On File System', 'Y', 250, 145,
+ 50214, 'Y', 1, 'N',
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+
+
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50072, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'WindowsArchivePath', 'D', 'Windows Archive Path',
+ 'Windows Archive Path'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50215, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Windows Archive Path', 'Windows Archive Path - If you change this value make sure to copy the archive entries to the new path!',
+ 'Path of the adempiere archive entries in the file system. If you change this value make sure to copy the archive entries to the new path!', 1,
+ 'D', 'WindowsArchivePath', 112, 10,
+ 255, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50072, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype, displaylogic
+ )
+ VALUES (50185, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Windows Archive Path', 'Windows Archive Path',
+ 'If you change this value make sure to copy the archive entries to the new path!',
+ 'Y', 260, 145,
+ 50215, 'Y', 1, 'N',
+ 'N', 'N', 'N', 'N', 'D','@StoreArchiveOnFileSystem@=''Y'''
+ );
+
+
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50073, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'UnixArchivePath', 'D', 'Unix Archive Path',
+ 'Unix Archive Path'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50216, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Unix Archive Path', 'Unix Archive Path - If you change this value make sure to copy the archive entries to the new path!',
+ 'Path of the adempiere archive entries in the file system. If you change this value make sure to copy the archive entries to the new path!', 1,
+ 'D', 'UnixArchivePath', 112, 10,
+ 255, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50073, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype, displaylogic
+ )
+ VALUES (50186, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Unix Archive Path', 'Unix Archive Path',
+ 'If you change this value make sure to copy the archive entries to the new path!',
+ 'Y', 270 ,145,
+ 50216, 'Y', 1, 'N',
+ 'Y', 'N', 'N', 'N', 'D','@StoreArchiveOnFileSystem@=''Y'''
+ );
+
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50015, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'StoreArchiveWarning',
+ 'If you change the archive storage method, the old archive entries are no longer available to your client.','I'
+ );
+
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50016, 0, 0, 'Y',
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'ArchivePathWarning','Make sure to copy the archive entries to the new path!','I'
+ );
+
+INSERT INTO ad_message_trl
+ (ad_message_id, ad_language, ad_client_id, ad_org_id, isactive,
+ created, createdby, updated, updatedby, msgtext, msgtip,
+ istranslated)
+ SELECT m.ad_message_id, lang.ad_language, m.ad_client_id, m.ad_org_id, 'Y',
+ m.created, m.createdby, m.updated, m.updatedby, m.msgtext, m.msgtip,
+ 'N'
+ FROM ad_message m, ad_language lang
+ WHERE m.ad_message_id in (50015, 50016)
+ AND lang.issystemlanguage = 'Y'
+ AND lang.isbaselanguage = 'N'
+ AND NOT EXISTS (
+ SELECT *
+ FROM ad_message_trl m2
+ WHERE m2.ad_message_id = m.ad_message_id
+ AND m2.ad_language = lang.ad_language);
+
+COMMIT ;
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+ UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_message_id) + 1
+ FROM ad_message
+ WHERE ad_message_id < 1000000)
+ WHERE NAME = 'AD_Message';
+
+
+ALTER TABLE ad_client ADD StoreArchiveOnFilesystem CHAR(1) DEFAULT 'N' NOT NULL;
+ALTER TABLE ad_client ADD WindowsArchivePath VARCHAR(255);
+ALTER TABLE ad_client ADD UnixArchivePath VARCHAR(255);
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/008_2pack_enhancements_printformat.sql b/migration/320-330/postgresql/008_2pack_enhancements_printformat.sql
new file mode 100644
index 0000000000..64bdc847f9
--- /dev/null
+++ b/migration/320-330/postgresql/008_2pack_enhancements_printformat.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_PACKAGE_EXP_DETAIL ADD ad_printformat_id NUMERIC(10,0);
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, seqno, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50217, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/25/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_TIMESTAMP ('05/25/2007 19:48:41', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Print Format', 'Data Print Format',
+ 'The print format determines how data is rendered for print.', 0, 'D', 'AD_PrintFormat_ID',
+ 50006, 19, 22, 'N', 'N',
+ 'N', 'Y', 'N', 0, 'N',
+ 'N', 'N', 1790, 'N',
+ 'N'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylogic, displaylength, isreadonly, seqno, issameline,
+ isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50187, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/25/2007 19:51:35', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('05/25/2007 19:52:28', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PrintFormat', 'Print Format', 'Print Format',
+ 'Y', 50006, 50217, 'Y',
+ '@Type@=''PFT''', 22, 'N', 246, 'N',
+ 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_REF_LIST
+ (ad_ref_list_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ VALUE, NAME, ad_reference_id, entitytype
+ )
+ VALUES (50044, 0, 0, 'Y',
+ TO_TIMESTAMP ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('05/14/2007 19:54:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PFT', 'PrintFormat', 50004, 'D'
+ );
+
+COMMIT ;
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM AD_COLUMN
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM AD_FIELD
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+UPDATE AD_SEQUENCE
+ SET currentnextsys = (SELECT MAX (ad_ref_list_id) + 1
+ FROM AD_REF_LIST
+ WHERE ad_ref_list_id < 1000000)
+ WHERE NAME = 'AD_Ref_List';
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/009_add_MandatoryLogic.sql b/migration/320-330/postgresql/009_add_MandatoryLogic.sql
new file mode 100644
index 0000000000..106027595c
--- /dev/null
+++ b/migration/320-330/postgresql/009_add_MandatoryLogic.sql
@@ -0,0 +1,162 @@
+INSERT INTO ad_element
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (50074, 0, 0, 'Y',
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'MandatoryLogic', 'D', 'Mandatory Logic',
+ 'Mandatory Logic'
+ );
+
+
+INSERT INTO ad_column
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ help, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (50218, 0, 0, 'Y',
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Mandatory Logic', 'Logic to determine if field is mandatory (applies only when field is not mandatory in general)',
+ 'Logic to determine if field is mandatory (applies only when field is not mandatory in general).
+ format := {expression} [{logic} {expression}]
+ expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+ logic := {|}|{&}
+ context := any global or window context
+ value := strings or numbers
+ logic operators := AND or OR with the previous result from left to right
+ operand := eq{=}, gt{>}, le{<}, not{~^!}
+ Examples:
+ @AD_Table_ID@=14 | @Language@!GERGER
+ @PriceLimit@>10 | @PriceList@>@PriceActual@
+ @Name@>J
+ Strings may be in single quotes (optional)', 1,
+ 'D', 'MandatoryLogic', 101, 14,
+ 2000, 'N', 'N', 'N', 'Y',
+ 'N', 0, 'N', 'N',
+ 'N', 50074, 'N',
+ 'N'
+ );
+
+INSERT INTO ad_field
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ help,
+ iscentrallymaintained, seqno, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (50188, 0, 0, 'Y',
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Mandatory Logic', 'Logic to determine if field is mandatory (applies only when field is not mandatory in general)',
+ 'Logic to determine if field is mandatory (applies only when field is not mandatory in general).
+ format := {expression} [{logic} {expression}]
+ expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+ logic := {|}|{&}
+ context := any global or window context
+ value := strings or numbers
+ logic operators := AND or OR with the previous result from left to right
+ operand := eq{=}, gt{>}, le{<}, not{~^!}
+ Examples:
+ @AD_Table_ID@=14 | @Language@!GERGER
+ @PriceLimit@>10 | @PriceList@>@PriceActual@
+ @Name@>J
+ Strings may be in single quotes (optional)',
+ 'Y', 275 ,101,
+ 50218, 'Y', 60, 'N',
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+
+
+ALTER TABLE ad_column ADD MandatoryLogic character varying(2000);
+
+
+
+DROP VIEW IF EXISTS AD_FIELD_V;
+ CREATE OR REPLACE VIEW AD_FIELD_V AS
+ SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
+ f.Name, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
+ f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
+ f.IsEncrypted AS IsEncryptedField, f.ObscureType,
+ c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent,
+ COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
+ c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID,
+ c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
+ c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
+ c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn,
+ c.IsSelectionColumn,
+ tbl.TableName, c.ValueMin, c.ValueMax,
+ fg.Name AS FieldGroup, vr.Code AS ValidationCode
+FROM AD_Field f
+ INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID)
+ LEFT OUTER JOIN AD_FieldGroup fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
+ LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID)
+ INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
+ INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID)
+ LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID)
+WHERE f.IsActive = 'Y'
+ AND c.IsActive = 'Y';
+
+ DROP VIEW IF EXISTS AD_FIELD_VT;
+ CREATE OR REPLACE VIEW AD_FIELD_VT AS
+ SELECT trl.AD_Language, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
+ trl.Name, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
+ f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
+ f.IsEncrypted AS IsEncryptedField, f.ObscureType,
+ c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent,
+ COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
+ c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID,
+ c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
+ c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
+ c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn,
+ tbl.TableName, c.ValueMin, c.ValueMax,
+ fgt.Name AS FieldGroup, vr.Code AS ValidationCode
+ FROM AD_Field f
+ INNER JOIN AD_Field_Trl trl ON (f.AD_Field_ID = trl.AD_Field_ID)
+ INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID)
+ LEFT OUTER JOIN AD_FieldGroup_Trl fgt ON
+ (f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_Language=fgt.AD_Language)
+ LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID)
+ INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
+ INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID)
+ LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID)
+ WHERE f.IsActive = 'Y'
+ AND c.IsActive = 'Y';
+
+
+COMMIT;
diff --git a/migration/320-330/postgresql/010_add_printpreview_button.sql b/migration/320-330/postgresql/010_add_printpreview_button.sql
new file mode 100644
index 0000000000..a7a3da3cce
--- /dev/null
+++ b/migration/320-330/postgresql/010_add_printpreview_button.sql
@@ -0,0 +1,21 @@
+INSERT INTO ad_message
+ (ad_message_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ value, msgtext, msgtype
+ )
+ VALUES (50017, 0, 0, 'Y',
+ TO_TIMESTAMP ('06/12/2007 18:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_TIMESTAMP ('06/12/2007 18:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PrintPreview','Print preview','I'
+ );
+
+COMMIT ;
+
+ UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_message_id) + 1
+ FROM ad_message
+ WHERE ad_message_id < 1000000)
+ WHERE NAME = 'AD_Message';
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/013_fix_istranslated.sql b/migration/320-330/postgresql/013_fix_istranslated.sql
new file mode 100644
index 0000000000..baf461ad51
--- /dev/null
+++ b/migration/320-330/postgresql/013_fix_istranslated.sql
@@ -0,0 +1,9 @@
+UPDATE AD_COLUMN
+ SET istranslated = 'N'
+ WHERE ad_column_id = 7604;
+
+UPDATE AD_COLUMN
+ SET istranslated = 'Y'
+ WHERE ad_column_id = 6256;
+
+COMMIT;
diff --git a/migration/320-330/postgresql/014_postcode_lookup.sql b/migration/320-330/postgresql/014_postcode_lookup.sql
new file mode 100644
index 0000000000..3325190f2b
--- /dev/null
+++ b/migration/320-330/postgresql/014_postcode_lookup.sql
@@ -0,0 +1,62 @@
+---
+-- Feature 1741222 - Add Post code lookup infrastructure
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335
+--
+
+--- Modify C_COUNTRY Table
+ALTER TABLE C_COUNTRY ADD
+ IsPostcodeLookup CHAR(1) DEFAULT 'N' NOT NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupClassname VARCHAR(255) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupClientID VARCHAR(50) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupPassword VARCHAR(50) DEFAULT NULL NULL;
+ALTER TABLE C_COUNTRY ADD
+ LookupUrl VARCHAR(100) DEFAULT NULL NULL;
+
+-- Add Postcode Constraint
+ALTER TABLE C_COUNTRY ADD CHECK (IsPostcodeLookup IN ('Y','N'));
+
+-- Insert Element Definitions
+
+INSERT INTO ad_element VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:22', 100, 'IsPostcodeLookup', 'D', 'IsPostcodeLookup', 'IsPostcodeLookup', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:09:54', 100, 'LookupClassName', 'D', 'LookupClassName', 'LookupClassName', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:06', 100, 'LookupClientID', 'D', 'LookupClientID', 'LookupClientID', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', 100, '2007-06-19 23:10:19', 100, 'LookupUrl', 'D', 'LookupUrl', 'LookupUrl', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', 100, '2007-06-22 02:04:31', 100, 'LookupPassword', 'D', 'LookupPassword', 'LookupPassword', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- Insert Column Definitions
+INSERT INTO ad_column VALUES (51000, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:14:47', 100, 100, 'IsPostcodeLookup', NULL, NULL, 0, 'D', 'IsPostcodeLookup', 170, 20, NULL, NULL, 1, 'N', 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51000, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column VALUES (51001, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClassName', NULL, NULL, 0, 'D', 'LookupClassName', 170, 10, NULL, NULL, 255, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51001, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column VALUES (51002, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupClientID', NULL, NULL, 0, 'D', 'LookupClientID', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51002, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column VALUES (51003, 0, 0, 'Y', '2007-06-19 22:43:07', '2007-06-19 23:04:48', 100, 100, 'LookupUrl', NULL, NULL, 0, 'D', 'LookupUrl', 170, 10, NULL, NULL, 100, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51003, NULL, 'N', 'N', NULL, NULL);
+INSERT INTO ad_column VALUES (51004, 0, 0, 'Y', '2007-06-22 02:03:37', '2007-06-22 02:05:17', 100, 100, 'LookupPassword', NULL, NULL, 0, 'D', 'LookupPassword', 170, 10, NULL, NULL, 50, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 51004, NULL, 'N', 'N', NULL, NULL);
+
+-- Insert Field Definitions
+INSERT INTO ad_field VALUES (51000, 0, 0, 'Y', '2007-06-19 23:17:05', 100, '2007-06-19 23:17:05', 100, 'IsPostcodeLookup', NULL, NULL, 'Y', 135, 51000, NULL, 'Y', NULL, 1, 'N', 220, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field VALUES (51001, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:31', 100, 'LookupClassName', NULL, NULL, 'Y', 135, 51001, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 255, 'N', 260, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field VALUES (51002, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:17', 100, 'LookupClientID', NULL, NULL, 'Y', 135, 51002, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 240, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field VALUES (51003, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-20 09:10:12', 100, 'LookupUrl', NULL, NULL, 'Y', 135, 51003, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 100, 'N', 230, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+INSERT INTO ad_field VALUES (51004, 0, 0, 'Y', '2007-06-19 23:17:06', 100, '2007-06-22 02:07:11', 100, 'LookupPassword', NULL, NULL, 'Y', 135, 51004, NULL, 'Y', '@IsPostcodeLookup@ = ''Y''', 50, 'N', 250, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+-- Update Sequences
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_element_id) + 1
+ FROM ad_element
+ WHERE ad_element_id < 1000000)
+ WHERE NAME = 'AD_Element';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_column_id) + 1
+ FROM ad_column
+ WHERE ad_column_id < 1000000)
+ WHERE NAME = 'AD_Column';
+
+UPDATE ad_sequence
+ SET currentnextsys = (SELECT MAX (ad_field_id) + 1
+ FROM ad_field
+ WHERE ad_field_id < 1000000)
+ WHERE NAME = 'AD_Field';
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/015_postcode_lookup2.sql b/migration/320-330/postgresql/015_postcode_lookup2.sql
new file mode 100644
index 0000000000..05337bc230
--- /dev/null
+++ b/migration/320-330/postgresql/015_postcode_lookup2.sql
@@ -0,0 +1,24 @@
+
+---
+-- FEATURE: 1741222 - Add Post code lookup infrastructure
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1741222&group_id=176962&atid=879335
+-- Update additional fields per Carlos request
+
+-- Update Element Definitions
+UPDATE ad_element SET description = 'Does this country have a post code web service', help = 'Enable the IsPostcodeLookup if you wish to configure a post code lookup web service' WHERE ad_element_id = 51000;
+UPDATE ad_element SET description = 'The class name of the postcode lookup plugin', help = 'Enter the class name of the post code lookup plugin for your postcode web service provider' WHERE ad_element_id = 51001;
+UPDATE ad_element SET description = 'The ClientID or Login submitted to the Lookup URL', help ='Enter the ClientID or Login for your account provided by the post code web service provider' WHERE ad_element_id = 51002;
+UPDATE ad_element SET description = 'The password submitted to the Lookup URL', help = 'Enter the password for your account provided by the post code web service provider' WHERE ad_element_id = 51004;
+UPDATE ad_element SET description = 'The URL of the web service that the plugin connects to in order to retrieve postcode data', help = 'Enter the URL of the web service that the plugin connects to in order to retrieve postcode data' WHERE ad_element_id = 51003;
+
+-- Update Column Definitions
+UPDATE ad_column SET description = 'Does this country have a post code web service', help = 'Enable the IsPostcodeLookup if you wish to configure a post code lookup web service' WHERE ad_column_id = 51000;
+UPDATE ad_column SET description = 'The class name of the postcode lookup plugin', help = 'Enter the class name of the post code lookup plugin for your postcode web service provider' WHERE ad_column_id = 51001;
+UPDATE ad_column SET description = 'The ClientID or Login submitted to the Lookup URL', help = 'Enter the ClientID or Login for your account provided by the post code web service provider' WHERE ad_column_id = 51002;
+UPDATE ad_column SET description = 'The password submitted to the Lookup URL', help = 'Enter the password for your account provided by the post code web service provider' WHERE ad_column_id = 51004;
+UPDATE ad_column SET description = 'The URL of the web service that the plugin connects to in order to retrieve postcode data', help = 'Enter the URL of the web service that the plugin connects to in order to retrieve postcode data' WHERE ad_column_id = 51003;
+
+-- Update Field Definitions
+UPDATE ad_field SET seqno = 225 WHERE ad_field_id = 51000;
+
+COMMIT;
diff --git a/migration/320-330/postgresql/016_new_dashboard.sql b/migration/320-330/postgresql/016_new_dashboard.sql
new file mode 100644
index 0000000000..8a98842c82
--- /dev/null
+++ b/migration/320-330/postgresql/016_new_dashboard.sql
@@ -0,0 +1,726 @@
+-- create new table
+
+CREATE TABLE PA_DASHBOARDCONTENT
+(
+ pa_dashboardcontent_id NUMERIC(10) NOT NULL,
+ ad_client_id NUMERIC(10) NOT NULL,
+ ad_org_id NUMERIC(10) NOT NULL,
+ created TIMESTAMP NOT NULL,
+ createdby NUMERIC(10) NOT NULL,
+ updated TIMESTAMP NOT NULL,
+ updatedby NUMERIC(10) NOT NULL,
+ isactive CHAR(1) NOT NULL,
+ NAME VARCHAR(120) NOT NULL,
+ ad_window_id NUMERIC(10),
+ description VARCHAR(255),
+ html TEXT,
+ line NUMERIC,
+ pa_goal_id NUMERIC(10),
+ CHECK (isactive IN ('Y','N')),
+ CONSTRAINT pa_dashboardcontent_key
+ PRIMARY KEY
+ (pa_dashboardcontent_id)
+);
+
+-- dictionary additions
+
+-- new table
+
+INSERT INTO AD_TABLE
+ (ad_table_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, tablename, isview, accesslevel, entitytype,
+ issecurityenabled, isdeleteable, ishighvolume, importtable,
+ ischangelog, replicationtype
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content', 'PA_DashboardContent', 'N', '1', 'D',
+ 'N', 'Y', 'N', 'N',
+ 'N', 'L'
+ );
+
+-- new sequence
+
+INSERT INTO AD_SEQUENCE
+ (ad_sequence_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description, isautosequence, incrementno,
+ startno, currentnext, currentnextsys, isaudited, istableid,
+ startnewyear
+ )
+ VALUES (50015, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:22:49', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PA_DashboardContent', 'Table PA_DashboardContent', 'Y', 1,
+ 1000000, 1000000, 50000, 'N', 'Y',
+ 'N'
+ );
+
+-- new elements
+
+INSERT INTO AD_ELEMENT
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME, printname
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'HTML', 'D', 'HTML', 'HTML'
+ );
+
+INSERT INTO AD_ELEMENT
+ (ad_element_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ columnname, entitytype, NAME,
+ printname
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'PA_DashboardContent_ID', 'D', 'PA_DashboardContent_ID',
+ 'PA_DashboardContent_ID'
+ );
+
+-- new columns
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, seqno, istranslated, isencrypted,
+ isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Name', 'Alphanumeric identifier of the entity',
+ 'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',
+ 0, 'D', 'Name', 50010, 10,
+ 120, 'N', 'N', 'Y', 'Y',
+ 'Y', 1, 'N', 'N',
+ 'N', 469, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:53', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:53', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Organization', 'Organizational entity within client',
+ 'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',
+ 0, 'D', 'AD_Org_ID', 50010, 19,
+ 10, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 113, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION,
+ entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:54', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:54', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Window', 'Data entry or display window',
+ 'The Window field identifies a unique Window in the system.', 0,
+ 'D', 'AD_Window_ID', 50010, 19,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 143, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51008, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:55', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:55', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Created', 'Date this record was created',
+ 'The Created field indicates the date that this record was created.',
+ 0, 'D', 'Created', 50010, 16,
+ 7, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 245, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ ad_reference_value_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51009, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:57', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:57', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Created By', 'User who created this records',
+ 'The Created By field indicates the user who created this record.',
+ 0, 'D', 'CreatedBy', 50010, 18,
+ 110, 10, 'N', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 246, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP, VERSION, entitytype,
+ columnname, ad_table_id, ad_reference_id, fieldlength, iskey,
+ isparent, ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:22:59', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:22:59', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Description', 'Optional short description of the record',
+ 'A description is limited to 255 characters.', 0, 'D',
+ 'Description', 50010, 10, 255, 'N',
+ 'N', 'N', 'Y', 'N', 'N',
+ 'N', 'N', 275, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ ad_reference_value_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51011, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:00', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Updated By', 'User who updated this records',
+ 'The Updated By field indicates the user who updated this record.',
+ 0, 'D', 'UpdatedBy', 50010, 18,
+ 110, 10, 'N', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 608, 'Y',
+ 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, VERSION, entitytype, columnname, ad_table_id,
+ ad_reference_id, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51012, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'HTML', 0, 'D', 'HTML', 50010,
+ 36, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 51005, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51013, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:03', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:03', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Active', 'The record is active in the system',
+ 'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons FOR de-activating AND NOT DELETING records:
+(1) THE SYSTEM requires THE RECORD FOR AUDIT purposes.
+(2) THE RECORD IS referenced BY other records. E.g., you cannot DELETE a Business Partner, IF there are invoices FOR this partner RECORD existing. You de-ACTIVATE THE Business Partner AND prevent that this RECORD IS used FOR future entries.',
+ 0, 'D', 'IsActive', 50010, 20,
+ 1, 'N', 'N', 'Y', 'Y',
+ 'N', 'N', 'N', 'N',
+ 348, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51014, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:04', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:04', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Line No', 'Unique line for this document',
+ 'Indicates the unique line for a document. It will also control the display order of the lines within a document.',
+ 0, 'D', 'Line', 50010, 22,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 439, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51015, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:05', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:05', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Goal', 'Performance Goal',
+ 'The Performance Goal indicates what this users performance will be measured against.',
+ 0, 'D', 'PA_Goal_ID', 50010, 19,
+ 22, 'N', 'N', 'N', 'Y',
+ 'N', 'N', 'N', 'N',
+ 1594, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51016, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:06', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:06', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Updated', 'Date this record was updated',
+ 'The Updated field indicates the date that this record was updated.',
+ 0, 'D', 'Updated', 50010, 16,
+ 7, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 607, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, description,
+ HELP,
+ VERSION, entitytype, columnname, ad_table_id, ad_reference_id,
+ fieldlength, iskey, isparent, ismandatory, isupdateable,
+ isidentifier, istranslated, isencrypted, isselectioncolumn,
+ ad_element_id, issyncdatabase, isalwaysupdateable
+ )
+ VALUES (51017, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'Client', 'Client/Tenant for this installation.',
+ 'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',
+ 0, 'D', 'AD_Client_ID', 50010, 19,
+ 10, 'N', 'N', 'Y', 'N',
+ 'N', 'N', 'N', 'N',
+ 102, 'Y', 'N'
+ );
+
+INSERT INTO AD_COLUMN
+ (ad_column_id, ad_client_id, ad_org_id, isactive,
+ created,
+ updated, createdby,
+ updatedby, NAME, VERSION, entitytype, columnname,
+ ad_table_id, ad_reference_id, fieldlength, iskey, isparent,
+ ismandatory, isupdateable, isidentifier, istranslated,
+ isencrypted, isselectioncolumn, ad_element_id, issyncdatabase,
+ isalwaysupdateable
+ )
+ VALUES (51018, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'),
+ TO_DATE ('07/09/2007 14:23:07', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 100, 'PA_DashboardContent_ID', 0, 'D', 'PA_DashboardContent_ID',
+ 50010, 13, 10, 'Y', 'N',
+ 'Y', 'N', 'N', 'N',
+ 'N', 'N', 51006, 'Y',
+ 'N'
+ );
+
+-- new window
+
+INSERT INTO AD_WINDOW
+ (ad_window_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, windowtype, issotrx, entitytype, processing, isdefault,
+ isbetafunctionality
+ )
+ VALUES (50007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:12', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content Edit', 'M', 'Y', 'D', 'N', 'N',
+ 'N'
+ );
+
+-- new menu
+
+INSERT INTO AD_MENU
+ (ad_menu_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated,
+ NAME, updatedby, issummary, issotrx, isreadonly, action,
+ ad_window_id, entitytype
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'),
+ 'Dashboard Content Edit', 100, 'N', 'N', 'N', 'W',
+ 50007, 'D'
+ );
+
+-- new menu in tree
+
+INSERT INTO AD_TREENODEMM
+ (ad_tree_id, node_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ parent_id, seqno
+ )
+ VALUES (10, 50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:35', 'MM/DD/YYYY HH24:MI:SS'), 0,
+ TO_DATE ('07/09/2007 14:23:35', 'MM/DD/YYYY HH24:MI:SS'), 0,
+ 175, 0
+ );
+
+-- access to new window
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 0, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 102, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 103, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+INSERT INTO AD_WINDOW_ACCESS
+ (ad_window_id, ad_role_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ isreadwrite
+ )
+ VALUES (50007, 50001, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Y'
+ );
+
+-- new tab
+
+INSERT INTO AD_TAB
+ (ad_tab_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, ad_table_id, ad_window_id, seqno, tablevel, issinglerow,
+ isinfotab, istranslationtab, isreadonly, hastree, processing,
+ issorttab, entitytype, isinsertrecord, isadvancedtab
+ )
+ VALUES (50010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:08', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:15', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Edit', 50010, 50007, 10, 0, 'Y',
+ 'N', 'N', 'N', 'N', 'N',
+ 'N', 'D', 'Y', 'N'
+ );
+
+-- new fields
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51005, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:09', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:17', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Client', 'Client/Tenant for this installation.',
+ 'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',
+ 'Y', 50010, 51017, 'Y',
+ 10, 'N', 10, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51006, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:18', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Organization', 'Organizational entity within client',
+ 'An organization is a unit of your client or legal entity - examples are store department. You can share data between organizations.',
+ 'Y', 50010, 51006, 'Y',
+ 10, 'N', 20, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51007, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:20', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Name', 'Alphanumeric identifier of the entity',
+ 'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',
+ 'Y', 50010, 51005, 'Y',
+ 120, 'N', 30, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51008, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:22', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Active', 'The record is active in the system',
+ 'There are two methods of making records unavailable in the system: One is to delete the record the other is to de-activate the record. A de-activated record is not available for selection but available for reports.
+There are two reasons FOR de-activating AND NOT DELETING records:
+(1) THE SYSTEM requires THE RECORD FOR AUDIT purposes.
+(2) THE RECORD IS referenced BY other records. E.g. you cannot DELETE a Business Partner IF there are invoices FOR this partner RECORD existing. You de-ACTIVATE THE Business Partner AND prevent that this RECORD IS used FOR future entries.',
+ 'Y', 50010, 51013, 'Y',
+ 1, 'N', 40, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51009, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:10', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:23', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Line No', 'Unique line for this document',
+ 'Indicates the unique line for a document. It will also control the display order of the lines within a document.',
+ 'Y', 50010, 51014, 'Y',
+ 22, 'N', 50, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP, iscentrallymaintained, ad_tab_id,
+ ad_column_id, isdisplayed, displaylength, isreadonly, seqno,
+ sortno, issameline, isheading, isfieldonly, isencrypted,
+ entitytype
+ )
+ VALUES (51010, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:24', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Description', 'Optional short description of the record',
+ 'A description is limited to 255 characters.', 'Y', 50010,
+ 51010, 'Y', 255, 'N', 60,
+ 0, 'N', 'N', 'N', 'N',
+ 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, iscentrallymaintained, ad_tab_id, ad_column_id,
+ isdisplayed, displaylength, isreadonly, seqno, sortno,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51011, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:26', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'HTML', 'Y', 50010, 51012,
+ 'Y', 0, 'N', 70, 0,
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51012, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:27', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Goal', 'Performance Goal',
+ 'The Performance Goal indicates what this users performance will be measured against.',
+ 'Y', 50010, 51015, 'Y',
+ 22, 'N', 80, 0, 'N', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, description,
+ HELP,
+ iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
+ displaylength, isreadonly, seqno, sortno, issameline, isheading,
+ isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51013, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:29', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Window', 'Data entry or display window',
+ 'The Window field identifies a unique Window in the system.',
+ 'Y', 50010, 51007, 'Y',
+ 22, 'N', 90, 0, 'Y', 'N',
+ 'N', 'N', 'D'
+ );
+
+INSERT INTO AD_FIELD
+ (ad_field_id, ad_client_id, ad_org_id, isactive,
+ created, createdby,
+ updated, updatedby,
+ NAME, iscentrallymaintained, ad_tab_id, ad_column_id,
+ isdisplayed, displaylength, isreadonly, seqno, sortno,
+ issameline, isheading, isfieldonly, isencrypted, entitytype
+ )
+ VALUES (51014, 0, 0, 'Y',
+ TO_DATE ('07/09/2007 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ TO_DATE ('07/09/2007 14:23:30', 'MM/DD/YYYY HH24:MI:SS'), 100,
+ 'Dashboard Content', 'Y', 50010, 51018,
+ 'N', 10, 'N', 0, 0,
+ 'N', 'N', 'N', 'N', 'D'
+ );
+
+-- assign window to new table
+
+UPDATE AD_TABLE
+ SET ad_window_id = 50007
+ WHERE ad_table_id = 50010;
+
+
+-- NOTE: Don't forget to run the three processes:
+-- 1 - Add missing translations
+-- 2 - Synchronize terminology
+-- 3 - Check sequences
+COMMIT ;
diff --git a/migration/320-330/postgresql/017_update_non_encrypted.sql b/migration/320-330/postgresql/017_update_non_encrypted.sql
new file mode 100644
index 0000000000..af3e589ccb
--- /dev/null
+++ b/migration/320-330/postgresql/017_update_non_encrypted.sql
@@ -0,0 +1,17 @@
+-- Please review before apply
+-- if you have any of this columns REALLY encrypted you must not apply this patch:
+-- AD_USER.EMailUserPW
+-- AD_USER.Password
+-- C_PAYMENTPROCESSOR.Password
+-- C_PAYMENTPROCESSOR.ProxyPassword
+
+-- defining columns non encrypted by default as discussed here
+-- [ 1722235 ] ENCRYPTION FOR PASSWORD wrongly MANAGED
+-- https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1722235&group_id=176962
+
+UPDATE AD_COLUMN
+ SET isencrypted = 'N',
+ updated = TO_DATE ('07/10/2007 00:00:01', 'MM/DD/YYYY HH24:MI:SS')
+ WHERE ad_column_id IN (417, 5059, 5065, 7794);
+
+COMMIT ;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/018_version330.sql b/migration/320-330/postgresql/018_version330.sql
new file mode 100644
index 0000000000..04578883ee
--- /dev/null
+++ b/migration/320-330/postgresql/018_version330.sql
@@ -0,0 +1,6 @@
+UPDATE AD_SYSTEM
+ SET releaseno = '330',
+ VERSION = '2007-07-13'
+ WHERE ad_system_id = 0 AND ad_client_id = 0;
+
+COMMIT ;
diff --git a/migration/320-330/postgresql/019_RMA_dml.sql b/migration/320-330/postgresql/019_RMA_dml.sql
new file mode 100644
index 0000000000..3663ffb8fd
--- /dev/null
+++ b/migration/320-330/postgresql/019_RMA_dml.sql
@@ -0,0 +1,287 @@
+-- Element change
+
+INSERT INTO AD_ELEMENT
+ (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY,COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP)
+VALUES
+ (52000,0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'InOut_ID', 'D', 'Shipment/Receipt', 'Shipment/Receipt', 'MaterialShipment Document', 'The Material Shipment / Receipt ', 'Receipt', 'Receipt', 'Material Receipt Document', 'The Material Shipment / Receipt ');
+
+
+-- Rule
+
+INSERT INTO AD_VAL_RULE
+ (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOutShipment/Receipt', NULL, 'S', 'M_InOut.MovementType IN (''C-'', ''V+'') AND M_InOut.DocStatus IN (''CO'', ''CL'')', 'D');
+
+INSERT INTO AD_VAL_RULE
+ (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOutShipment/Receipt (RMA)', NULL, 'S', 'M_InOutLine.M_InOut_ID=@InOut_ID@', 'D');
+
+
+-- Processes
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52000, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_RMA_CreateOrder', 'Create Order From RMA', 'Creates an order based on this RMA Document. The RMA should be correct and completed.', 'Generate Order from RMA will create an order based on this RMA document.', '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.RMACreateOrder', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52000, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52001, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'M_InOut_GenerateRMA (Manual)', 'Generate Shipments for Vendor RMA', 'Generate Shipments from open vendor RMA based on selection.', NULL, '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.InOutGenerateRMA', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52001, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+
+INSERT INTO AD_PROCESS
+ (AD_PROCESS_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, HELP, ACCESSLEVEL, ENTITYTYPE, PROCEDURENAME, ISREPORT, ISDIRECTPRINT, AD_REPORTVIEW_ID, CLASSNAME, STATISTIC_COUNT,STATISTIC_SECONDS, AD_PRINTFORMAT_ID, WORKFLOWVALUE, AD_WORKFLOW_ID, ISBETAFUNCTIONALITY, ISSERVERPROCESS, SHOWHELP, JASPERREPORT)
+VALUES
+ (52002, 0,0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'C_Invoice_GenerateRMA (Manual)', 'Generate Invoices for Vendor RMA', 'Generate Invoices from open vendor RMA based on selection.', NULL, '3', 'D', NULL, 'N', 'N', NULL, 'org.adempiere.process.InvoiceGenerateRMA', 0, 0, NULL, NULL, NULL, 'N', 'N', 'Y', NULL);
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 0, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 102, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+INSERT INTO AD_PROCESS_ACCESS
+ (AD_PROCESS_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE)
+VALUES
+ (52002, 103, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Y');
+
+
+-- Column Addition
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Sales Transaction', 'This is a Sales Transaction', 'The Sales Transaction checkbox indicates if this item is a Sales Transaction.', 1, 'D', 'IsSOTrx', 661, 20, NULL, NULL, 1, '@IsSOTrx@', 'N', 'N', 'Y', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 1106, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Amount', 'Amount', 'Amount', 1, 'D', 'Amt', 660, 12, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', '@M_InOutLine_ID@!0', 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 160, NULL, 'N', 'N', NULL);
+
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52002, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Charge', 'Additional document charges', 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', 1, 'D', 'C_Charge_ID', 660, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 968, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52003, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Line Amount', 'Line Extended Amount (Quantity * Actual Price) without Freight and Charges','Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.', 1, 'D', 'LineNetAmt', 660, 12, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 441, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52004, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Line No', 'Unique line for this document', 'Indicates the unique line for a document. It will also control the display order of the lines within a document.', 1, 'D', 'Line', 660, 11, NULL, NULL, 22, '@SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_RMALine WHERE M_RMA_ID=@M_RMA_ID@', 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 439, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52005, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Delivered Quantity', 'Delivered Quantity', 'The Delivered Quantity indicates the quantity of a product that has been delivered.', 1, 'D', 'QtyDelivered', 660, 29, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 528, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52006, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'Generate To', 'Generate To', NULL, 0, 'D', 'GenerateTo', 661, 28, NULL, NULL, 1, NULL, 'N','N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 1491, 52000, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52007, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 1, 'D', 'M_RMA_ID', 318, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2412, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52008, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA Line', 'Return Material Authorization Line', 'Detail information about the returned goods', 1, 'D', 'M_RMALine_ID', 333, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2413, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52009, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 1, 'D', 'M_RMA_ID', 319, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2412, NULL, 'N', 'N', NULL);
+
+INSERT INTO AD_COLUMN
+ (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, ISSYNCDATABASE, ISALWAYSUPDATEABLE, COLUMNSQL)
+VALUES
+ (52010, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 100, 'RMA Line', 'Return Material Authorization Line', 'Detail information about the returned goods', 0, 'D', 'M_RMALine_ID', 320, 19, NULL, NULL, 22, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 2413, NULL, 'N', 'N', NULL);
+
+
+-- Field addition
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Create Order From RMA', 'Creates an order based on the RMA document', NULL, 'Y', 628, 52006, NULL, 'Y', '@Processed@=''Y'' & @C_Order_ID@=0 & @DocStatus@=''CO''', 1, 'N', 160, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Amount', 'Amount', 'Amount', 'Y', 629, 52001, NULL, 'Y', NULL, 22, 'N', 100, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52002, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Charge', 'Additional document charges', 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', 'Y', 629, 52002, NULL, 'Y', NULL, 22, 'N', 80, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52003, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Delivered Quantity', 'Delivered Quantity', 'The Delivered Quantity indicates the quantity of a product that has been delivered.', 'Y', 629, 52005, NULL, 'N', NULL, 22, 'N', 0, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52004, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Line Amount', 'Line Extended Amount (Quantity * Actual Price) without Freight and Charges', 'Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.', 'Y', 629, 52003, NULL, 'Y', NULL, 22, 'Y', 110, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD
+ (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, OBSCURETYPE, AD_REFERENCE_ID, ISMANDATORY)
+VALUES
+ (52005, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Line No', 'Unique line for this document', 'Indicates the unique line for a document. It will also control the display order of the lines within a document.', 'Y', 629, 52004, NULL, 'Y', NULL, 22, 'N', 40, NULL, 'Y', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+INSERT INTO AD_FIELD(ad_field_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, help, iscentrallymaintained, ad_tab_id, ad_column_id, ad_fieldgroup_id, isdisplayed, displaylogic, displaylength, isreadonly, seqno, sortno, issameline, isheading, isfieldonly, isencrypted, entitytype, obscuretype, ad_reference_id, ismandatory)
+ VALUES(52007, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Sales Transaction', 'This is a Sales Transaction', 'The Sales Transaction checkbox indicates if this item is a Sales Transaction.', 'Y', 628, 52000, NULL, 'N', NULL, 1, 'N', NULL, NULL, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+-- Update Field
+
+UPDATE AD_FIELD SET SeqNo=(SeqNo + 10) WHERE AD_Tab_ID=296 AND SeqNo > 40;
+
+INSERT INTO AD_FIELD
+(ad_field_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, help, iscentrallymaintained, ad_tab_id, ad_column_id, ad_fieldgroup_id, isdisplayed, displaylogic, displaylength, isreadonly, seqno, sortno, issameline, isheading, isfieldonly, isencrypted, entitytype, obscuretype, ad_reference_id, ismandatory)
+ VALUES(52006, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'RMA', 'Return Material Authorization', 'A Return Material Authorization may be required to accept returns and to create Credit Memos', 'Y', 296, 52009, NULL, 'Y', '@M_RMA_ID@!0', 26, 'Y', 50, 0, 'N', 'N', 'N', 'N', 'D', NULL, NULL, NULL);
+
+
+-- Garden World RMA Fix
+
+INSERT INTO AD_SEQUENCE(ad_sequence_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, vformat, isautosequence, incrementno, startno, currentnext, currentnextsys, isaudited, istableid, prefix, suffix, startnewyear)
+ VALUES(52000, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, 'Vendor Return Material', NULL, NULL, 'Y', 1, 990000, 990000, 900, 'N', 'N', NULL, NULL, 'N');
+
+INSERT INTO AD_SEQUENCE(ad_sequence_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, description, vformat, isautosequence, incrementno, startno, currentnext, currentnextsys, isaudited, istableid, prefix, suffix, startnewyear)
+ VALUES(52001, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 0, 'MM Vendor Return', 'MM Vendor Return', NULL, 'Y', 1, 590000, 590000, 59000, 'N', 'N', NULL, NULL, 'N');
+
+INSERT INTO C_DOCTYPE(c_doctype_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, printname, description, docbasetype, issotrx, docsubtypeso, hasproforma, c_doctypeproforma_id, c_doctypeshipment_id, c_doctypeinvoice_id, isdocnocontrolled, docnosequence_id, gl_category_id, hascharges, documentnote, isdefault, documentcopies, ad_printformat_id, isdefaultcounterdoc, isshipconfirm, ispickqaconfirm, isintransit, issplitwhendifference, c_doctypedifference_id, iscreatecounter, isindexed)
+ VALUES(151, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'MM Vendor Return', 'Vendor Return Material', NULL, 'MMS', 'Y', NULL, 'N', NULL, NULL, NULL, 'Y', 52001, 111, 'N', NULL, 'Y', 1, NULL, 'N', 'N', 'N', 'N', 'N', NULL, 'Y', 'Y');
+
+INSERT INTO C_DOCTYPE(c_doctype_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, NAME, printname, description, docbasetype, issotrx, docsubtypeso, hasproforma, c_doctypeproforma_id, c_doctypeshipment_id, c_doctypeinvoice_id, isdocnocontrolled, docnosequence_id, gl_category_id, hascharges, documentnote, isdefault, documentcopies, ad_printformat_id, isdefaultcounterdoc, isshipconfirm, ispickqaconfirm, isintransit, issplitwhendifference, c_doctypedifference_id, iscreatecounter, isindexed)
+ VALUES(150, 11, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'Vendor Return Material', 'Vendor Return Material Authorization', NULL, 'POO', 'N', 'RM', 'N', NULL, 151, 124, 'Y', 52000, 111, 'N', NULL, 'N', 1, NULL, 'N', 'N', 'N', 'N', 'N', NULL, 'Y', 'Y');
+
+-- Message Addition
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52000, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'OrderOrRMA', 'Either Order or RMA can be process on this document.', NULL, 'E', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52001, 0, 0, 'Y', TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, TO_DATE('07/05/2007 17:00:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 'VendorRMA', 'Vendor RMA', NULL, 'I', 'D');
+
+-- Misc AD Updates
+
+UPDATE AD_COLUMN SET ColumnName='InOut_ID' WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Element_ID=52000 WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Reference_Value_ID=337 WHERE AD_Column_ID=10842;
+
+UPDATE AD_COLUMN SET AD_Val_Rule_ID=52000 WHERE AD_Column_ID=10842;
+
+UPDATE AD_TAB SET WhereClause='MovementType IN (''C+'', ''V+'')' WHERE AD_Tab_ID=296;
+
+UPDATE AD_TAB SET WhereClause='MovementType IN (''C-'', ''V-'')' WHERE AD_Tab_ID=257;
+
+UPDATE AD_COLUMN SET IsMandatory='N' WHERE AD_Column_ID=10829;
+
+UPDATE AD_COLUMN SET AD_Val_Rule_ID=52001 WHERE AD_Column_ID=10829;
+
+UPDATE AD_FIELD SET SeqNo=60, IsSameLine='N' WHERE AD_Field_ID=9310;
+
+UPDATE AD_FIELD SET SeqNo=20, IsSameLine='Y' WHERE AD_Field_ID=9311;
+
+UPDATE AD_FIELD SET SeqNo=70, IsSameLine='N' WHERE AD_Field_ID=9312;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=9313;
+
+UPDATE AD_FIELD SET SeqNo=30, IsSameLine='N' WHERE AD_Field_ID=9314;
+
+UPDATE AD_FIELD SET SeqNo=50, IsSameLine='N' WHERE AD_Field_ID=9315;
+
+UPDATE AD_FIELD SET SeqNo=90, IsSameLine='N' WHERE AD_Field_ID=9316;
+
+UPDATE AD_FIELD SET SeqNo=10, IsSameLine='N' WHERE AD_Field_ID=9317;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=10401;
+
+UPDATE AD_FIELD SET SeqNo=100, IsSameLine='Y' WHERE AD_Field_ID=52001;
+
+UPDATE AD_FIELD SET SeqNo=80, IsSameLine='Y' WHERE AD_Field_ID=52002;
+
+UPDATE AD_FIELD SET SeqNo=0, IsSameLine='N' WHERE AD_Field_ID=52003;
+
+UPDATE AD_FIELD SET SeqNo=110, IsSameLine='N' WHERE AD_Field_ID=52004;
+
+UPDATE AD_FIELD SET SeqNo=40, IsSameLine='Y' WHERE AD_Field_ID=52005;
+
+UPDATE AD_TAB SET IsSingleRow='Y' WHERE AD_Tab_ID=628;
+
+UPDATE AD_TAB SET IsSingleRow='Y' WHERE AD_Tab_ID=629;
+
+UPDATE C_DOCTYPE SET IsActive='Y' WHERE C_DocType_ID=149;
+
+
+UPDATE AD_COLUMN SET Callout='org.adempiere.model.CalloutRMA.docType' WHERE AD_Column_ID=12118;
+
+UPDATE AD_COLUMN SET ReadOnlyLogic='@IsSOTrx@=''N''' WHERE AD_Column_ID=52006;
+
+UPDATE AD_FIELD SET DisplayLogic='@Processed@=''Y'' & @C_Order_ID@=0 & @DocStatus@=''CO'' & @IsSOTrx@=''Y'''
+WHERE AD_Field_ID=52000;
+
+UPDATE AD_REF_TABLE SET WhereClause='C_DocType.DocBaseType IN (''SOO'', ''POO'') AND C_DocType.DocSubTypeSO=''RM'' AND C_DocType.AD_Client_ID=@#AD_Client_ID@'
+WHERE AD_Reference_ID=321;
+
+UPDATE AD_VAL_RULE SET Code='M_InOutLine.M_InOut_ID=@InOut_ID@ AND NOT EXISTS (SELECT * FROM M_RMALine rl WHERE rl.M_InOutLine_ID=M_InOutLine.M_InOutLine_ID AND rl.M_RMA_ID=@M_RMA_ID@)'
+WHERE AD_Val_Rule_ID=52001;
+
+UPDATE C_DOCTYPE SET NAME='MM Returns', IsSOTrx='N' WHERE C_DocType_ID=149;
+
+COMMIT;
+
+
+-- NOTE: Don't forget to run the three processes:
+-- 1 - Add missing translations
+-- 2 - Synchronize terminology
+-- 3 - Check sequences
diff --git a/migration/320-330/postgresql/020_RMA_Postgresql_ddl.sql b/migration/320-330/postgresql/020_RMA_Postgresql_ddl.sql
new file mode 100644
index 0000000000..98ecdece27
--- /dev/null
+++ b/migration/320-330/postgresql/020_RMA_Postgresql_ddl.sql
@@ -0,0 +1,40 @@
+-- POSTGRESQL Changes
+
+ALTER TABLE C_Invoice ADD M_RMA_ID NUMERIC(10) DEFAULT NULL;
+
+ALTER TABLE C_InvoiceLine ADD M_RMALine_ID NUMERIC(10,0) DEFAULT NULL;
+
+ALTER TABLE M_InOut ADD M_RMA_ID NUMERIC(10,0) DEFAULT NULL;
+
+ALTER TABLE M_InOutLine ADD M_RMALine_ID NUMERIC(10,0) DEFAULT NULL;
+
+ALTER TABLE M_RMA ADD IsSOTrx CHAR(1) DEFAULT 'Y' CHECK (IsSOTrx IN ('Y', 'N')) NOT NULL;
+
+ALTER TABLE M_RMA RENAME M_InOut_ID TO InOut_ID;
+
+ALTER TABLE M_RMA ADD GenerateTo CHAR(1) DEFAULT NULL;
+
+ALTER TABLE M_RMALine ADD Amt NUMERIC;
+
+ALTER TABLE M_RMALine ADD C_Charge_ID NUMERIC(10,0);
+
+ALTER TABLE M_RMALine ADD Line NUMERIC(10,0) DEFAULT 0 NOT NULL;
+
+ALTER TABLE M_RMALine ADD LineNetAmt NUMERIC;
+
+ALTER TABLE M_RMALine ADD QtyDelivered NUMERIC;
+
+ALTER TABLE M_RMALine ALTER COLUMN M_InOutLine_ID DROP DEFAULT;
+
+ALTER TABLE M_RMALine ALTER COLUMN M_InOutLine_ID DROP NOT NULL;
+
+
+-- Constraints
+
+ALTER TABLE C_Invoice ADD CONSTRAINT mrma_cinvoice FOREIGN KEY (M_RMA_ID) REFERENCES M_RMA (M_RMA_ID);
+
+ALTER TABLE C_InvoiceLine ADD CONSTRAINT mrmaline_cinvoiceline FOREIGN KEY (M_RMALine_ID) REFERENCES M_RMALine (M_RMALine_ID);
+
+ALTER TABLE M_InOut ADD CONSTRAINT mrma_minout FOREIGN KEY (M_RMA_ID) REFERENCES M_RMA (M_RMA_ID);
+
+ALTER TABLE M_InOutLine ADD CONSTRAINT mrmaline_minoutline FOREIGN KEY (M_RMALine_ID) REFERENCES M_RMALine (M_RMALine_ID);
diff --git a/migration/320-330/postgresql/021_BF_1754751.sql b/migration/320-330/postgresql/021_BF_1754751.sql
new file mode 100644
index 0000000000..e06382e60e
--- /dev/null
+++ b/migration/320-330/postgresql/021_BF_1754751.sql
@@ -0,0 +1,5 @@
+UPDATE AD_WINDOW
+ SET windowtype = 'M'
+ WHERE ad_window_id = 319 AND windowtype = 'T';
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/022_BF_1746900.sql b/migration/320-330/postgresql/022_BF_1746900.sql
new file mode 100644
index 0000000000..8d9db43dd0
--- /dev/null
+++ b/migration/320-330/postgresql/022_BF_1746900.sql
@@ -0,0 +1,33 @@
+-- Update help for "C_AcctSchema_Default_Copy" process
+ UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.AcctSchemaDefaultCopy',
+ help = 'Either add missing accounts - or copy and overwrite all default accounts. If you copy and overwrite the current default values, you may have to repeat previous updates (e.g. set the bank account asset accounts, ...). If no Accounting Schema is selected all Accounting Schemas will be updated / inserted.'
+ WHERE AD_Process_ID=108;
+
+-- Update Accounting Schema parameter for "C_AcctSchema_Default_Copy" process
+UPDATE AD_PROCESS_PARA
+ SET ismandatory = 'Y'
+ WHERE ad_process_para_id= 669;
+
+-- Update help for "M_Product_Category_Acct_Copy" process
+UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.ProductCategoryAcctCopy',
+ help = 'If you copy and overwrite the current default values, you may have to repeat previous updates (e.g. set the revenue account, ...). If no Accounting Schema is selected all Accounting Schemas will be updated / inserted for products of this category.'
+ WHERE AD_Process_ID=140;
+
+-- Update help for "M_Product_Category_Acct_Copy" process (SPANISH translation)
+UPDATE AD_PROCESS_TRL
+ SET help ='El proceso de copiar cuentas tomará las cuentas definidas para una categorÃa de producto y las copiará a cualquier producto que que haga referencia a esta categorÃa. Si una cuenta existe a nivel de producto sera sobreescrita. Si no selecciona un Esquema Contable serán actualizados para todos los que estén definidos.'
+ WHERE AD_Process_ID=140
+ AND AD_LANGUAGE LIKE 'es_%';
+
+-- Update Accounting Schema parameter for "M_Product_Category_Acct_Copy" process.
+UPDATE AD_PROCESS_PARA
+ SET ismandatory = 'Y'
+ WHERE AD_Process_Para_ID=668;
+
+ UPDATE AD_PROCESS
+ SET classname = 'org.compiere.process.BPGroupAcctCopy'
+ WHERE AD_Process_ID=112;
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/023_Reverse_BF_1740254.sql b/migration/320-330/postgresql/023_Reverse_BF_1740254.sql
new file mode 100644
index 0000000000..5afa97b044
--- /dev/null
+++ b/migration/320-330/postgresql/023_Reverse_BF_1740254.sql
@@ -0,0 +1,12 @@
+--
+-- [ 1740254 ] PriceList Version is empty in Product-Price tab
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1740254&group_id=176962&atid=879332
+--
+-- Column M_ProductPrice.M_PriceList_Version_ID:
+
+-- Original File 012_BF_1740254.sql was deleted - the original file put the IsParent='N'
+-- restoring past value from IsParent because somebody could apply this patch into their system
+
+UPDATE AD_COLUMN SET IsParent='Y' WHERE AD_Column_ID=2760;
+
+COMMIT;
diff --git a/migration/320-330/postgresql/024_BF_1564496.sql b/migration/320-330/postgresql/024_BF_1564496.sql
new file mode 100644
index 0000000000..078ef2d58d
--- /dev/null
+++ b/migration/320-330/postgresql/024_BF_1564496.sql
@@ -0,0 +1,5 @@
+UPDATE AD_COLUMN
+ SET callout = 'org.compiere.model.CalloutMovement.qty'
+ WHERE ad_column_id = 3594;
+
+COMMIT;
\ No newline at end of file
diff --git a/migration/320-330/postgresql/025_Reverse_BF_1739541.sql b/migration/320-330/postgresql/025_Reverse_BF_1739541.sql
new file mode 100644
index 0000000000..dc555ee727
--- /dev/null
+++ b/migration/320-330/postgresql/025_Reverse_BF_1739541.sql
@@ -0,0 +1,11 @@
+--
+-- [ 1739541 ] Organization in Window "Role" problem
+-- http://sourceforge.net/tracker/index.php?func=detail&aid=1739541&group_id=176962&atid=879332
+--
+-- Original File 011_BF_1739541.sql was deleted - the original file put the IsParent='N'
+-- restoring past value from IsParent because somebody could apply this patch into their system
+--
+-- Column AD_Role_OrgAccess.AD_Org_ID:
+UPDATE AD_Column SET IsParent='Y' WHERE AD_Column_ID=5508 AND IsParent='N';
+--
+COMMIT;
diff --git a/migration/320-330/postgresql/026_BF_1759181.sql b/migration/320-330/postgresql/026_BF_1759181.sql
new file mode 100644
index 0000000000..19ea38ff0c
--- /dev/null
+++ b/migration/320-330/postgresql/026_BF_1759181.sql
@@ -0,0 +1,10 @@
+/*
+ Fix bug in Application Dictionary
+ [ 1759181 ] AD_Color.ColorType is defined as Color and must be List
+*/
+
+UPDATE AD_COLUMN
+ SET ad_reference_id = 17
+ WHERE ad_column_id = 6232 AND ad_reference_id = 27;
+
+COMMIT;
\ No newline at end of file