REVERTING REVISION of [ FR 2432892 ] Re-org of migration directory

This commit is contained in:
Redhuan D. Oon 2008-12-17 12:49:10 +00:00
parent d1628c791e
commit ac339a5499
24 changed files with 18184 additions and 0 deletions

View File

@ -0,0 +1,19 @@
UPDATE w_store
SET webparam1 = 'ADempiere120x60.gif'
WHERE w_store_id = 11;
UPDATE w_store_trl
SET webparam1 = 'ADempiere120x60.gif'
WHERE w_store_id = 11;
COMMIT ;
UPDATE m_product
SET descriptionurl = 'http://www.adempiere.com/partner/index.html'
WHERE descriptionurl = 'http://www.compiere.org/partner/index.html';
UPDATE m_product
SET imageurl = 'http://www.adempiere.org/product/icons/C32.gif'
WHERE imageurl = 'http://www.compiere.org/product/icons/C32.gif';
COMMIT ;

View File

@ -0,0 +1,44 @@
UPDATE AD_Process
SET Classname='org.compiere.process.AD_PrintPaper_Default',
ProcedureName=NULL
WHERE value = 'AD_PrintPaper_Default';
UPDATE AD_Process
SET Classname='org.compiere.process.C_AcctSchema_Default_Copy',
ProcedureName=NULL
WHERE value like 'C_AcctSchema_Default_Copy';
UPDATE AD_Process
SET Classname='org.compiere.process.C_BP_Group_Acct_Copy',
ProcedureName=NULL
WHERE value = 'C_BP_Group_Acct_Copy';
UPDATE AD_Process
SET Classname='org.compiere.process.M_Product_BOM_Check',
ProcedureName=NULL
WHERE value = 'M_Product_BOM';
UPDATE AD_Process
SET Classname='org.compiere.process.M_Product_Category_Acct_Copy',
ProcedureName=NULL
where value = 'M_Product_Category_Acct_Copy';
UPDATE AD_Process
SET Classname='org.compiere.process.M_Product_CostingUpdate',
ProcedureName=NULL
WHERE value = 'M_Product_CostingUpdate';
UPDATE AD_Process
SET Classname='org.compiere.process.M_Production_Run',
ProcedureName=NULL
WHERE value like 'M_Production';
UPDATE AD_Process
SET Classname='org.compiere.process.T_InventoryValue_Create',
ProcedureName=NULL
WHERE value = 'RV_T_InventoryValue';
UPDATE AD_Process
SET Classname='org.compiere.process.M_PriceList_Create',
ProcedureName=NULL
WHERE value = 'M_PriceList Create';

View File

@ -0,0 +1,3 @@
UPDATE ad_message
SET VALUE = 'AdempiereSys'
WHERE VALUE = 'CompiereSys';

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
Written by Karsten Thiemann, kthiemann@adempiere.org
Feel free to change everything you want, but you are using it at your own risk!
Preparations
1. Make a database backup! Don't complain if something goes wrong,
just reapply your backup and report the error to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962
You can use RUN_DBExport.bat in the Compiere2/utils folder.
2. Read and follow the INSTRUCTIONS in the migration-3.1.0-3.1.1.sql file.
You have to set some DEFAULT VALUES for some new columns. But it's
done easily.
Migration of Compiere database
1. This script only migrates the database from Adempiere3.1.0 (Compiere253b)
to Adempiere3.1.1 (253d)!
2. It's only tested with Oracle - but it may work with other databases
as well because it is just sql. If you try it with a different database
(successful or not) then please report it to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962
3. Apply the migration-3.1.0-3.1.1.sql via any SQL tool.
BUT MAKE SHURE THAT YOU HAVE FOLLOWED THE INSTRUCTIONS IN THERE FIRST!
I use the Oracle SQL Developer (it's free but you have to register), you
can find it here:
http://www.oracle.com/technology/products/database/sql_developer/index.html
Of course you can also use Toad or even just SQLPlus:
(from the folder with the migration*.sql)
sqlplus compiere@COMPIERE_DB_NAME @migration-3.1.0-3.1.1.sql
but sqlplus is not commended because it has some line length limitations that
can causes errors with long insert statements.
Installation of Adempiere 3.1.1
1. Rename (backup) your Adempiere folder (e.g. from Adempiere to _Adempiere)
2. Follow the installation instructions :)
3. Start Adempiere and login as System Administrator (SuperUser, System -> role System Administrator)
Run System Admin -> Sequence Check (you may have to run it more than once)
4. If you use additional languages: login with the standard english language as System Administrator,
open General Rules -> System Rules -> Language, select your language and push
'Language Maintenance' button. Choose 'add missing translation' and run the process.
5. Start Adempiere.
6. Try to find new Windows (search for Issue). You got it? Welcome to 253b!
7. Test the installation and PLEASE REPORT ERRORS to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962

View File

@ -0,0 +1,3 @@
UPDATE ad_sequence
SET currentnextsys = 50000
WHERE istableid = 'Y' AND currentnextsys < 50000;

View File

@ -0,0 +1,75 @@
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE, msgtext, msgtype,
entitytype
)
VALUES (50000, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'CloseAllWindows', 'Close All Windows', 'I',
'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE, msgtext, msgtype,
entitytype
)
VALUES (50001, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'CloseOtherWindows', 'Close Other Windows', 'I',
'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE,
msgtext, msgtype, entitytype
)
VALUES (50002, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'ValidateConnectionOnStartup',
'Validate Connection on Startup', 'I', 'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE,
msgtext, msgtype, entitytype
)
VALUES (50003, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'SingleInstancePerWindow',
'Single Instance per Window', 'I', 'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE, msgtext,
msgtype, entitytype
)
VALUES (50004, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'OpenWindowMaximized', 'Open Window Maximized',
'I', 'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE, msgtext,
msgtype, entitytype
)
VALUES (50005, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'DeleteSelection', 'Delete Selected Items',
'I', 'D'
);
INSERT INTO ad_message
(ad_message_id, ad_client_id, ad_org_id, isactive, created,
createdby, updated, updatedby, VALUE, msgtext,
msgtype, entitytype
)
VALUES (50006, 0, 0, 'Y', SYSDATE,
0, SYSDATE, 0, 'SaveParentFirst', 'Save Parent Tab First',
'I', 'D'
);
UPDATE ad_sequence
SET currentnextsys = 50007
WHERE NAME = 'AD_Message';
COMMIT ;

View File

@ -0,0 +1,257 @@
CREATE TABLE ad_package_imp_backup
(
ad_package_imp_backup_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
ad_package_imp_id NUMBER(10) NOT NULL,
ad_package_imp_detail_id NUMBER(10) NOT NULL,
ad_table_id NUMBER(10),
ad_column_id NUMBER(10),
ad_reference_id NUMBER(10),
ad_package_imp_bck_dir NVARCHAR2(255),
ad_package_imp_org_dir NVARCHAR2(255),
colvalue NVARCHAR2(2000),
uninstall CHAR(1 BYTE)
);
CREATE TABLE ad_package_imp
(
ad_package_imp_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
NAME NVARCHAR2(60) NOT NULL,
pk_status NVARCHAR2(22),
releaseno NVARCHAR2(20),
pk_version NVARCHAR2(20),
VERSION NVARCHAR2(20),
description NVARCHAR2(1000) NOT NULL,
email NVARCHAR2(60),
processed CHAR(1 BYTE) DEFAULT 'N',
processing CHAR(1 BYTE) DEFAULT 'N' NOT NULL,
creator NVARCHAR2(60),
creatorcontact NVARCHAR2(255),
createddate NVARCHAR2(25),
updateddate NVARCHAR2(25),
uninstall CHAR(1 BYTE)
);
CREATE TABLE ad_package_imp_inst
(
ad_package_imp_inst_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10),
ad_org_id NUMBER(10),
isactive CHAR(1 BYTE) DEFAULT 'Y',
created DATE DEFAULT SYSDATE,
createdby NUMBER(10),
updated DATE DEFAULT SYSDATE,
updatedby NUMBER(10),
NAME NVARCHAR2(240),
pk_status NVARCHAR2(44),
releaseno NVARCHAR2(40),
pk_version NVARCHAR2(40),
VERSION NVARCHAR2(40),
description NVARCHAR2(2000),
email NVARCHAR2(120),
processed CHAR(1 BYTE) DEFAULT 'N',
processing CHAR(1 BYTE) DEFAULT 'N',
creator NVARCHAR2(120),
creatorcontact NVARCHAR2(510),
createddate NVARCHAR2(50),
updateddate NVARCHAR2(50),
uninstall CHAR(1 BYTE)
);
CREATE TABLE ad_package_imp_detail
(
ad_package_imp_detail_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
NAME NVARCHAR2(60),
ad_package_imp_id NUMBER(10) NOT NULL,
ad_original_id NUMBER(10) NOT NULL,
ad_backup_id NUMBER(10),
action NVARCHAR2(20),
success NVARCHAR2(20),
TYPE NVARCHAR2(60),
tablename NVARCHAR2(60),
ad_table_id NUMBER(10),
uninstall CHAR(1 BYTE)
);
CREATE TABLE ad_package_exp
(
ad_package_exp_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
ad_package_type NVARCHAR2(1),
email NVARCHAR2(30) NOT NULL,
instructions NVARCHAR2(1000) NOT NULL,
pk_name NVARCHAR2(60) NOT NULL,
processed CHAR(1 BYTE),
releaseno NVARCHAR2(20) NOT NULL,
VERSION NVARCHAR2(20) NOT NULL,
username NVARCHAR2(30) NOT NULL,
processing CHAR(1 BYTE) NOT NULL,
pk_version NVARCHAR2(20) NOT NULL,
file_directory NVARCHAR2(255) NOT NULL,
description NVARCHAR2(1000) NOT NULL
);
CREATE TABLE ad_package_exp_detail
(
ad_package_exp_detail_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER NOT NULL,
ad_form_id NUMBER(10),
ad_impformat_id NUMBER(10),
ad_menu_id NUMBER(10),
ad_process_id NUMBER(10),
ad_role_id NUMBER(10),
ad_window_id NUMBER(10),
ad_workflow_id NUMBER(10),
file_directory NVARCHAR2(255),
filename NVARCHAR2(255),
destination_filename NVARCHAR2(255),
destination_directory NVARCHAR2(255),
description NVARCHAR2(1000) NOT NULL,
dbtype NVARCHAR2(22),
TYPE NVARCHAR2(10) NOT NULL,
target_directory NVARCHAR2(255),
sqlstatement NVARCHAR2(2000),
releaseno NVARCHAR2(20),
processing CHAR(1 BYTE) NOT NULL,
processed CHAR(1 BYTE),
pk_name NVARCHAR2(60) NOT NULL,
name2 NVARCHAR2(60),
line NUMBER,
ad_workbench_id NUMBER(10),
ad_table_id NUMBER(10),
ad_reportview_id NUMBER(10),
ad_package_exp_id NUMBER(10) NOT NULL,
ad_package_code_new NVARCHAR2(2000),
ad_package_code_old NVARCHAR2(2000)
);
CREATE TABLE ad_package_exp_common
(
ad_package_exp_common_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
ad_form_id NUMBER(10),
ad_impformat_id NUMBER(10),
ad_reportview_id NUMBER(10),
ad_table_id NUMBER(10),
ad_workbench_id NUMBER(10),
dbtype NVARCHAR2(22),
processed CHAR(1 BYTE),
pk_name NVARCHAR2(60),
name2 NVARCHAR2(60),
line NUMBER,
file_directory NVARCHAR2(255),
filename NVARCHAR2(255),
destination_directory NVARCHAR2(255),
description NVARCHAR2(1000),
TYPE NVARCHAR2(10),
target_directory NVARCHAR2(255),
sqlstatement NVARCHAR2(255),
processing CHAR(1 BYTE),
ad_workflow_id NUMBER(10),
ad_window_id NUMBER(10),
ad_role_id NUMBER(10),
ad_process_id NUMBER(10),
ad_menu_id NUMBER(10)
);
CREATE TABLE ad_package_imp_proc
(
ad_package_imp_proc_id NUMBER(10) NOT NULL,
ad_client_id NUMBER(10) NOT NULL,
ad_org_id NUMBER(10) NOT NULL,
isactive CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
created DATE DEFAULT SYSDATE NOT NULL,
createdby NUMBER(10) NOT NULL,
updated DATE DEFAULT SYSDATE NOT NULL,
updatedby NUMBER(10) NOT NULL,
ad_override_dict CHAR(1 BYTE),
ad_package_dir NVARCHAR2(255),
ad_package_source NVARCHAR2(255),
ad_package_source_type NVARCHAR2(10) NOT NULL,
processing CHAR(1 BYTE)
);
ALTER TABLE ad_package_imp_backup ADD (
PRIMARY KEY
(ad_package_imp_backup_id));
ALTER TABLE ad_package_imp ADD (
PRIMARY KEY
(ad_package_imp_id));
ALTER TABLE ad_package_imp_inst ADD (
PRIMARY KEY
(ad_package_imp_inst_id));
ALTER TABLE ad_package_imp_detail ADD (
PRIMARY KEY
(ad_package_imp_detail_id));
ALTER TABLE ad_package_exp ADD (
PRIMARY KEY
(ad_package_exp_id));
ALTER TABLE ad_package_exp_detail ADD (
PRIMARY KEY
(ad_package_exp_detail_id));
ALTER TABLE ad_package_exp_common ADD (
PRIMARY KEY
(ad_package_exp_common_id));
ALTER TABLE ad_package_imp_proc ADD (
PRIMARY KEY
(ad_package_imp_proc_id));

View File

@ -0,0 +1,3 @@
UPDATE ad_system
SET releaseno = '312'
WHERE ad_system_id = 0;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
Written by Karsten Thiemann, kthiemann@adempiere.org
Feel free to change everything you want, but you are using it at your own risk!
Preparations
1. Make a database backup! Don't complain if something goes wrong,
just reapply your backup and report the error to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962
You can use RUN_DBExport.bat in the Adempiere/utils folder.
2. Read and follow the INSTRUCTIONS in the migration-311-312.sql file.
You have to set some DEFAULT VALUES for some new columns. But it's
done easily.
Migration of Adempiere database
1. This script only migrates the database from Adempiere3.1.1 (Compiere253d)
to Adempiere3.1.2 (260a)!
2. It's only tested with Oracle - but it may work with other databases
as well because it is just sql. If you try it with a different database
(successful or not) then please report it to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962
3. Apply the migration-311-312.sql via any SQL tool.
BUT MAKE SHURE THAT YOU HAVE FOLLOWED THE INSTRUCTIONS IN THERE FIRST!
I use the Oracle SQL Developer (it's free but you have to register), you
can find it here:
http://www.oracle.com/technology/products/database/sql_developer/index.html
Of course you can also use Toad or even just SQLPlus:
(from the folder with the migration*.sql)
sqlplus compiere@COMPIERE_DB_NAME @migration-311-312.sql
Installation of Adempiere 3.1.2
1. Rename (backup) your Adempiere folder (e.g. from Adempiere to _Adempiere)
2. Follow the installation instructions :)
3. Start Adempiere and login as System Administrator (SuperUser, System -> role System Administrator)
Run System Admin -> Sequence Check (you may have to run it more than once)
4. If you use additional languages: login with the standard english language as System Administrator,
open General Rules -> System Rules -> Language, select your language and push
'Language Maintenance' button. Choose 'add missing translation' and run the process.
5. Start Adempiere.
6. Try to find new Windows.
7. Test the installation and PLEASE REPORT ERRORS to the Adempiere forums
at: http://sourceforge.net/forum/?group_id=176962

View File

@ -0,0 +1,10 @@
-- globalqss: bug [ 1618570 ] ORA-00936 in Project window
-- wrong value in AD_Tab.WhereClause -> old value
-->> C_ProjectPhase_ID > 0 AND AND COALESCE(C_ProjectTask_ID,0)=0
UPDATE ad_tab
SET whereclause =
'C_ProjectPhase_ID > 0 AND COALESCE(C_ProjectTask_ID,0)=0'
WHERE ad_tab_id = 799;
COMMIT;

View File

@ -0,0 +1,25 @@
-- globalqss - fix entitytype for 2pack dictionary, wrongly was created as type U, must be D
update ad_column set entitytype='D' where ad_column_id between 50001 and 50179;
update ad_element set entitytype='D' where ad_element_id between 50001 and 50036;
update ad_field set entitytype='D' where ad_field_id between 50001 and 50153;
update ad_menu set entitytype='D' where ad_menu_id between 50001 and 50007;
update ad_process set entitytype='D' where ad_process_id between 50002 and 50010;
update ad_process_para set entitytype='D' where ad_process_para_id between 50001 and 50004;
update ad_ref_list set entitytype='D' where ad_ref_list_id between 50001 and 50035;
update ad_reference set entitytype='D' where ad_reference_id between 50001 and 50005;
update ad_tab set entitytype='D' where ad_tab_id between 50001 and 50008;
update ad_table set entitytype='D' where ad_table_id between 50001 and 50008;
update ad_window set entitytype='D' where ad_window_id between 50001 and 50005;
commit;

View File

@ -0,0 +1,105 @@
INSERT INTO ad_element
(ad_element_id, ad_client_id, ad_org_id, isactive,
created, createdby,
updated, updatedby,
columnname, entitytype, NAME, printname
)
VALUES (50038, 0, 0, 'Y',
TO_DATE ('12/19/2006 03:57:24', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 03:57:24', 'MM/DD/YYYY HH24:MI:SS'), 0,
'ShowHelp', 'D', 'Show Help', 'Show Help'
);
INSERT INTO ad_reference
(ad_reference_id, ad_client_id, ad_org_id, isactive,
created, createdby,
updated, updatedby,
NAME, validationtype, entitytype
)
VALUES (50007, 0, 0, 'Y',
TO_DATE ('12/19/2006 04:00:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 04:00:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
'ShowHelp List', 'L', '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 (50037, 0, 0, 'N',
TO_DATE ('12/19/2006 04:01:20', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 04:01:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
'A', 'Ask user (for future use)', 50007, '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 (50038, 0, 0, 'Y',
TO_DATE ('12/19/2006 04:02:01', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 04:02:01', 'MM/DD/YYYY HH24:MI:SS'), 0,
'N', 'Don''t show help', 50007, '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 (50039, 0, 0, 'Y',
TO_DATE ('12/19/2006 04:02:25', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 04:02:25', 'MM/DD/YYYY HH24:MI:SS'), 0,
'Y', 'Show Help', 50007, 'D'
);
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,
ad_reference_value_id, fieldlength, defaultvalue, iskey,
isparent, ismandatory, isupdateable, isidentifier, seqno,
istranslated, isencrypted, isselectioncolumn, ad_element_id,
issyncdatabase, isalwaysupdateable
)
VALUES (50181, 0, 0, 'Y',
TO_DATE ('12/19/2006 04:03:24', 'MM/DD/YYYY HH24:MI:SS'),
TO_DATE ('12/19/2006 04:04:52', 'MM/DD/YYYY HH24:MI:SS'), 0, 0,
'Show Help', 'To show or hide help for reports / processes', 0,
'D', 'ShowHelp', 284, 17,
50007, 1, 'Y', 'N',
'N', 'N', 'Y', 'N', 0,
'N', 'N', 'N', 50038,
'N', 'N'
);
INSERT INTO ad_field
(ad_field_id, ad_client_id, ad_org_id, isactive,
created, createdby,
updated, updatedby,
NAME, description,
iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
displaylength, isreadonly, seqno, issameline, isheading,
isfieldonly, isencrypted, entitytype
)
VALUES (50155, 0, 0, 'Y',
TO_DATE ('12/19/2006 04:05:56', 'MM/DD/YYYY HH24:MI:SS'), 0,
TO_DATE ('12/19/2006 04:08:45', 'MM/DD/YYYY HH24:MI:SS'), 0,
'Show Help', 'To show or hide help for reports / processes',
'Y', 245, 50181, 'Y',
1, 'N', 185, 'N', 'N',
'N', 'N', 'D'
);
COMMIT ;
ALTER TABLE ad_process ADD showhelp CHAR(1) DEFAULT 'Y';
-- run the sequence check after this

View File

@ -0,0 +1,31 @@
DROP TABLE t_selection;
CREATE TABLE t_selection
(
ad_pinstance_id NUMBER(10) NOT NULL,
t_selection_id NUMBER(10) NOT NULL
);
CREATE UNIQUE INDEX t_selection_key ON t_selection
(ad_pinstance_id, t_selection_id);
ALTER TABLE t_selection ADD (
CONSTRAINT t_selection_key
PRIMARY KEY (ad_pinstance_id, t_selection_id));
DROP TABLE t_selection2;
CREATE TABLE t_selection2
(
ad_pinstance_id NUMBER(10) NOT NULL,
query_id NUMBER NOT NULL,
t_selection_id NUMBER(10) NOT NULL
);
CREATE UNIQUE INDEX t_selection2_key ON t_selection2
(ad_pinstance_id, query_id, t_selection_id);
ALTER TABLE t_selection2 ADD (
CONSTRAINT t_selection2_key
PRIMARY KEY (ad_pinstance_id, query_id, t_selection_id));

View File

@ -0,0 +1,381 @@
CREATE OR REPLACE PROCEDURE M_PriceList_Create
(
PInstance_ID IN NUMBER
)
AS
/*************************************************************************
* 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-2003 Jorg Janke, ComPiere, Inc. All Rights Reserved.
*************************************************************************
* $Id: M_PriceList_Create.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
***
* Title: Create Pricelist
* Description:
* Create PriceList by copying purchase prices (M_Product_PO)
* and applying product category discounts (M_CategoryDiscount)
* Carlos Ruiz - globalqss - Make T_Selection tables permanent
************************************************************************/
-- Logistice
ResultStr VARCHAR2(2000);
Message VARCHAR2(2000) := '';
NoRate EXCEPTION;
-- Parameter
CURSOR Cur_Parameter (PInstance NUMBER) IS
SELECT i.Record_ID, p.ParameterName, p.P_String, p.P_Number, p.P_Date
FROM AD_PInstance i, AD_PInstance_Para p
WHERE i.AD_PInstance_ID=PInstance
AND i.AD_PInstance_ID=p.AD_PInstance_ID(+)
ORDER BY p.SeqNo;
-- Parameter Variables
p_PriceList_Version_ID NUMBER;
p_DeleteOld CHAR(1) := 'N';
--
v_Currency_ID NUMBER;
v_Client_ID NUMBER;
v_Org_ID NUMBER;
v_UpdatedBy NUMBER;
v_StdPrecision NUMBER;
v_DiscountSchema_ID NUMBER;
v_PriceList_Version_Base_ID NUMBER;
--
v_NextNo NUMBER := 0;
-- Get PL Parameter
CURSOR Cur_DiscountLine (DiscountSchema_ID NUMBER) IS
SELECT *
FROM M_DiscountSchemaLine
WHERE M_DiscountSchema_ID=DiscountSchema_ID
AND IsActive='Y'
ORDER BY SeqNo;
BEGIN
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing');
ResultStr := 'PInstanceNotFound';
UPDATE AD_PInstance
SET Created = SysDate,
IsProcessing = 'Y'
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
-- Get Parameters
ResultStr := 'ReadingParameters';
FOR p IN Cur_Parameter (PInstance_ID) LOOP
p_PriceList_Version_ID := p.Record_ID;
IF (p.ParameterName = 'DeleteOld') THEN
p_DeleteOld := p.P_String;
DBMS_OUTPUT.PUT_LINE(' DeleteOld=' || p_DeleteOld);
ELSE
DBMS_OUTPUT.PUT_LINE('*** Unknown Parameter=' || p.ParameterName);
END IF;
END LOOP; -- Get Parameter
DBMS_OUTPUT.PUT_LINE(' PriceList_Version_ID=' || p_PriceList_Version_ID);
-- Checking Prerequisites
-- -- PO Prices must exists
ResultStr := 'CorrectingProductPO';
DBMS_OUTPUT.PUT_LINE(ResultStr);
UPDATE M_Product_PO
SET PriceList = 0
WHERE PriceList IS NULL;
UPDATE M_Product_PO
SET PriceLastPO = 0
WHERE PriceLastPO IS NULL;
UPDATE M_Product_PO
SET PricePO = PriceLastPO
WHERE (PricePO IS NULL OR PricePO = 0) AND PriceLastPO <> 0;
UPDATE M_Product_PO
SET PricePO = 0
WHERE PricePO IS NULL;
-- Set default current vendor
UPDATE M_Product_PO p
SET IsCurrentVendor = 'Y'
WHERE IsCurrentVendor = 'N'
AND NOT EXISTS
(SELECT pp.M_Product_ID FROM M_Product_PO pp
WHERE pp.M_Product_ID=p.M_Product_ID
GROUP BY pp.M_Product_ID HAVING COUNT(*) > 1);
COMMIT;
/**
* Make sure that we have only one active product
*/
ResultStr := 'CorrectingDuplicates';
DBMS_OUTPUT.PUT_LINE(ResultStr);
DECLARE
-- All duplicate products
CURSOR Cur_Duplicates IS
SELECT DISTINCT M_Product_ID
FROM M_Product_PO po
WHERE IsCurrentVendor='Y' AND IsActive='Y'
AND EXISTS ( SELECT M_Product_ID FROM M_Product_PO x
WHERE x.M_Product_ID=po.M_Product_ID
GROUP BY M_Product_ID HAVING COUNT(*) > 1 )
ORDER BY 1;
-- All vendors of Product - expensive first
CURSOR Cur_Vendors (Product_ID NUMBER) IS
SELECT M_Product_ID, C_BPartner_ID
FROM M_Product_PO
WHERE IsCurrentVendor='Y' AND IsActive='Y'
AND M_Product_ID=Product_ID
ORDER BY PriceList DESC;
--
Product_ID NUMBER;
BPartner_ID NUMBER;
BEGIN
FOR dupl IN Cur_Duplicates LOOP
OPEN Cur_Vendors (dupl.M_Product_ID);
FETCH Cur_Vendors INTO Product_ID, BPartner_ID; -- Leave First
LOOP
FETCH Cur_Vendors INTO Product_ID, BPartner_ID; -- Get Record ID
EXIT WHEN Cur_Vendors%NOTFOUND;
--
DBMS_OUTPUT.PUT_LINE(' Record: ' || Product_ID || ' / ' || BPartner_ID);
UPDATE M_Product_PO
SET IsCurrentVendor='N'
WHERE M_Product_ID=Product_ID AND C_BPartner_ID=BPartner_ID;
END LOOP;
CLOSE Cur_Vendors;
END LOOP;
COMMIT;
END;
/** Delete Old Data */
ResultStr := 'DeletingOld';
IF (p_DeleteOld = 'Y') THEN
DELETE M_ProductPrice
WHERE M_PriceList_Version_ID = p_PriceList_Version_ID;
Message := '@Deleted@=' || SQL%ROWCOUNT || ' - ';
DBMS_OUTPUT.PUT_LINE(Message);
END IF;
-- Get PriceList Info
ResultStr := 'GetPLInfo';
DBMS_OUTPUT.PUT_LINE(ResultStr);
SELECT p.C_Currency_ID, c.StdPrecision,
v.AD_Client_ID, v.AD_Org_ID, v.UpdatedBy,
v.M_DiscountSchema_ID, M_PriceList_Version_Base_ID
INTO v_Currency_ID, v_StdPrecision,
v_Client_ID, v_Org_ID, v_UpdatedBy,
v_DiscountSchema_ID, v_PriceList_Version_Base_ID
FROM M_PriceList p, M_PriceList_Version v, C_Currency c
WHERE p.M_PriceList_ID=v.M_PriceList_ID
AND p.C_Currency_ID=c.C_Currency_ID
AND v.M_PriceList_Version_ID=p_PriceList_Version_ID;
/**
* For All Discount Lines in Sequence
*/
FOR dl IN Cur_DiscountLine (v_DiscountSchema_ID) LOOP
ResultStr := 'Parameter Seq=' || dl.SeqNo;
-- DBMS_OUTPUT.PUT_LINE(ResultStr);
-- Clear Temporary Table
DELETE FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID;
-- -----------------------------------
-- Create Selection in temporary table
-- -----------------------------------
IF (v_PriceList_Version_Base_ID IS NULL) THEN
-- Create Selection from M_Product_PO
INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID)
SELECT DISTINCT PInstance_ID, po.M_Product_ID
FROM M_Product p, M_Product_PO po
WHERE p.M_Product_ID=po.M_Product_ID
AND (p.AD_Client_ID=v_Client_ID OR p.AD_Client_ID=0)
AND p.IsActive='Y' AND po.IsActive='Y' AND po.IsCurrentVendor='Y'
-- Optional Restrictions
AND (dl.M_Product_Category_ID IS NULL OR p.M_Product_Category_ID=dl.M_Product_Category_ID)
AND (dl.C_BPartner_ID IS NULL OR po.C_BPartner_ID=dl.C_BPartner_ID)
AND (dl.M_Product_ID IS NULL OR p.M_Product_ID=dl.M_Product_ID);
ELSE
-- Create Selection from existing PriceList
INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID)
SELECT DISTINCT PInstance_ID, p.M_Product_ID
FROM M_Product p, M_ProductPrice pp
WHERE p.M_Product_ID=pp.M_Product_ID
AND pp.M_PriceList_Version_ID=v_PriceList_Version_Base_ID
AND p.IsActive='Y' AND pp.IsActive='Y'
-- Optional Restrictions
AND (dl.M_Product_Category_ID IS NULL OR p.M_Product_Category_ID=dl.M_Product_Category_ID)
AND (dl.C_BPartner_ID IS NULL OR EXISTS
(SELECT * FROM M_Product_PO po WHERE po.M_Product_ID=p.M_Product_ID AND po.C_BPartner_ID=dl.C_BPartner_ID))
AND (dl.M_Product_ID IS NULL OR p.M_Product_ID=dl.M_Product_ID);
END IF;
Message := Message || '@Selected@=' || SQL%ROWCOUNT;
-- DBMS_OUTPUT.PUT_LINE(Message);
-- Delete Prices in Selection, so that we can insert
IF (v_PriceList_Version_Base_ID IS NULL
OR v_PriceList_Version_Base_ID <> p_PriceList_Version_ID) THEN
ResultStr := ResultStr || ', Delete';
DELETE M_ProductPrice pp
WHERE pp.M_PriceList_Version_ID = p_PriceList_Version_ID
AND EXISTS (SELECT * FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID
AND s.AD_PInstance_ID = PInstance_ID);
Message := ', @Deleted@=' || SQL%ROWCOUNT;
END IF;
-- --------------------
-- Copy (Insert) Prices
-- --------------------
IF (v_PriceList_Version_Base_ID = p_PriceList_Version_ID) THEN
-- We have Prices already
NULL;
ELSIF (v_PriceList_Version_Base_ID IS NULL) THEN
-- Copy and Convert from Product_PO
ResultStr := ResultStr || ',Copy_PO';
INSERT INTO M_ProductPrice
(M_PriceList_Version_ID, M_Product_ID,
AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,
PriceList, PriceStd, PriceLimit)
SELECT
p_PriceList_Version_ID, po.M_Product_ID,
v_Client_ID, v_Org_ID, 'Y', SysDate, v_UpdatedBy, SysDate, v_UpdatedBy,
-- Price List
COALESCE(currencyConvert(po.PriceList,
po.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0),
-- Price Std
COALESCE(currencyConvert(po.PriceList,
po.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0),
-- Price Limit
COALESCE(currencyConvert(po.PricePO,
po.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0)
FROM M_Product_PO po
WHERE EXISTS (SELECT * FROM T_Selection s WHERE po.M_Product_ID=s.T_Selection_ID
AND s.AD_PInstance_ID = PInstance_ID)
AND po.IsCurrentVendor='Y' AND po.IsActive='Y';
ELSE
-- Copy and Convert from other PriceList_Version
ResultStr := ResultStr || ',Copy_PL';
INSERT INTO M_ProductPrice
(M_PriceList_Version_ID, M_Product_ID,
AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,
PriceList, PriceStd, PriceLimit)
SELECT
p_PriceList_Version_ID, pp.M_Product_ID,
v_Client_ID, v_Org_ID, 'Y', SysDate, v_UpdatedBy, SysDate, v_UpdatedBy,
-- Price List
COALESCE(currencyConvert(pp.PriceList,
pl.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0),
-- Price Std
COALESCE(currencyConvert(pp.PriceStd,
pl.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0),
-- Price Limit
COALESCE(currencyConvert(pp.PriceLimit,
pl.C_Currency_ID, v_Currency_ID, dl.ConversionDate, dl.C_ConversionType_ID, v_Client_ID, v_Org_ID),0)
FROM M_ProductPrice pp
INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID=plv.M_PriceList_Version_ID)
INNER JOIN M_PriceList pl ON (plv.M_PriceList_ID=pl.M_PriceList_ID)
WHERE pp.M_PriceList_Version_ID=v_PriceList_Version_Base_ID
AND EXISTS (SELECT * FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID
AND s.AD_PInstance_ID = PInstance_ID)
AND pp.IsActive='Y';
END IF;
Message := Message || ', @Inserted@=' || SQL%ROWCOUNT;
-- -----------
-- Calculation
-- -----------
ResultStr := ResultStr || ',Calc';
UPDATE M_ProductPrice p
SET PriceList = (DECODE(dl.List_Base, 'S', PriceStd, 'X', PriceLimit, PriceList)
+ dl.List_AddAmt) * (1 - dl.List_Discount/100),
PriceStd = (DECODE(dl.Std_Base, 'L', PriceList, 'X', PriceLimit, PriceStd)
+ dl.Std_AddAmt) * (1 - dl.Std_Discount/100),
PriceLimit = (DECODE(dl.Limit_Base, 'L', PriceList, 'S', PriceStd, PriceLimit)
+ dl.Limit_AddAmt) * (1 - dl.Limit_Discount/100)
WHERE M_PriceList_Version_ID=p_PriceList_Version_ID
AND EXISTS (SELECT * FROM T_Selection s
WHERE s.T_Selection_ID=p.M_Product_ID
AND s.AD_PInstance_ID = PInstance_ID);
-- --------
-- Rounding (AD_Reference_ID=155)
-- --------
ResultStr := ResultStr || ',Round';
UPDATE M_ProductPrice p
SET PriceList = DECODE(dl.List_Rounding,
'N', PriceList,
'0', ROUND(PriceList, 0), -- Even .00
'D', ROUND(PriceList, 1), -- Dime .10
'T', ROUND(PriceList, -1), -- Ten 10.00
'5', ROUND(PriceList*20,0)/20, -- Nickle .05
'Q', ROUND(PriceList*4,0)/4, -- Quarter .25
ROUND(PriceList, v_StdPrecision)),-- Currency
PriceStd = DECODE(dl.Std_Rounding,
'N', PriceStd,
'0', ROUND(PriceStd, 0), -- Even .00
'D', ROUND(PriceStd, 1), -- Dime .10
'T', ROUND(PriceStd, -1), -- Ten 10.00
'5', ROUND(PriceStd*20,0)/20, -- Nickle .05
'Q', ROUND(PriceStd*4,0)/4, -- Quarter .25
ROUND(PriceStd, v_StdPrecision)), -- Currency
PriceLimit = DECODE(dl.Limit_Rounding,
'N', PriceLimit,
'0', ROUND(PriceLimit, 0), -- Even .00
'D', ROUND(PriceLimit, 1), -- Dime .10
'T', ROUND(PriceLimit, -1), -- Ten 10.00
'5', ROUND(PriceLimit*20,0)/20, -- Nickle .05
'Q', ROUND(PriceLimit*4,0)/4, -- Quarter .25
ROUND(PriceLimit, v_StdPrecision))-- Currency
WHERE M_PriceList_Version_ID=p_PriceList_Version_ID
AND EXISTS (SELECT * FROM T_Selection s
WHERE s.T_Selection_ID=p.M_Product_ID
AND s.AD_PInstance_ID = PInstance_ID);
Message := Message || ', @Updated@=' || SQL%ROWCOUNT;
-- Fixed Price overwrite
ResultStr := ResultStr || ',Fix';
UPDATE M_ProductPrice p
SET PriceList = DECODE(dl.List_Base, 'F', dl.List_Fixed, PriceList),
PriceStd = DECODE(dl.Std_Base, 'F', dl.Std_Fixed, PriceStd),
PriceLimit = DECODE(dl.Limit_Base, 'F', dl.Limit_Fixed, PriceLimit)
WHERE M_PriceList_Version_ID=p_PriceList_Version_ID
AND EXISTS (SELECT * FROM T_Selection s
WHERE s.T_Selection_ID=p.M_Product_ID
AND s.AD_PInstance_ID = PInstance_ID);
-- Log Info
INSERT INTO AD_PInstance_Log (AD_PInstance_ID, Log_ID, P_ID, P_NUMBER, P_MSG)
VALUES (PInstance_ID, v_NextNo, null, dl.SeqNo, Message);
--
v_NextNo := v_NextNo + 1;
Message := '';
END LOOP; -- For all DiscountLines
-- Delete Temporary Selection
DELETE FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID;
<<FINISH_PROCESS>>
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE(Message);
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished');
UPDATE AD_PInstance
SET Updated = SysDate,
IsProcessing = 'N',
Result = 1, -- success
ErrorMsg = Message
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
RETURN;
EXCEPTION
WHEN OTHERS THEN
ResultStr := ResultStr || ':' || SQLERRM || ' ' || Message;
DBMS_OUTPUT.PUT_LINE(ResultStr);
UPDATE AD_PInstance
SET Updated = SysDate,
IsProcessing = 'N',
Result = 0, -- failure
ErrorMsg = ResultStr
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
RETURN;
END M_PriceList_Create;
/

View File

@ -0,0 +1,148 @@
CREATE OR REPLACE PROCEDURE M_Product_BOM_Check
(
PInstance_ID IN 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: M_Product_BOM_Check.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
***
* Title: Check BOM Structure (free of cycles)
* Description:
* Tree cannot contain BOMs which are already referenced
************************************************************************/
AS
-- Logistice
ResultStr VARCHAR2(2000);
Message VARCHAR2(2000);
Record_ID NUMBER;
-- Parameter
CURSOR Cur_Parameter (PInstance NUMBER) IS
SELECT i.Record_ID, p.ParameterName, p.P_String, p.P_Number, p.P_Date
FROM AD_PInstance i, AD_PInstance_Para p
WHERE i.AD_PInstance_ID=PInstance
AND i.AD_PInstance_ID=p.AD_PInstance_ID(+)
ORDER BY p.SeqNo;
-- Variables
Verified CHAR(1) := 'Y';
IsBOM CHAR(1);
CountNo NUMBER;
BEGIN
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || PInstance_ID);
ResultStr := 'PInstanceNotFound';
UPDATE AD_PInstance
SET Created = SysDate,
IsProcessing = 'Y'
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
-- Get Parameters
ResultStr := 'ReadingParameters';
FOR p IN Cur_Parameter (PInstance_ID) LOOP
Record_ID := p.Record_ID;
END LOOP; -- Get Parameter
DBMS_OUTPUT.PUT_LINE(' Record_ID=' || Record_ID);
-- Record ID is M_Product_ID of product to be tested
SELECT IsBOM
INTO IsBOM
FROM M_Product
WHERE M_Product_ID=Record_ID;
-- No BOM - should not happen, but no problem
IF (IsBOM = 'N') THEN
GOTO FINISH_PROCESS;
-- Did not find product
ELSIF (IsBOM <> 'Y') THEN
RETURN;
END IF;
-- Checking BOM Structure
ResultStr := 'InsertingRoot';
-- Table to put all BOMs - duplicate will cause exception
DELETE FROM T_Selection2 WHERE Query_ID = 0 AND AD_PInstance_ID = PInstance_ID;
INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID) VALUES (PInstance_ID, 0, Record_ID);
-- Table of root modes
DELETE FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID;
INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID) VALUES (PInstance_ID, Record_ID);
LOOP
-- How many do we have?
SELECT COUNT(*)
INTO CountNo
FROM T_Selection
WHERE AD_PInstance_ID = PInstance_ID;
-- Nothing to do
EXIT WHEN (CountNo = 0);
-- Insert BOM Nodes into "All" table
INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID)
SELECT PInstance_ID, 0, p.M_Product_ID
FROM M_Product p
WHERE IsBOM='Y'
AND EXISTS (SELECT * FROM M_Product_BOM b WHERE p.M_Product_ID=b.M_ProductBOM_ID
AND b.M_Product_ID IN (SELECT T_Selection_ID FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID));
-- Insert BOM Nodes into temporary table
DELETE FROM T_Selection2 WHERE Query_ID = 1 AND AD_PInstance_ID = PInstance_ID;
INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID)
SELECT PInstance_ID, 1, p.M_Product_ID
FROM M_Product p
WHERE IsBOM='Y'
AND EXISTS (SELECT * FROM M_Product_BOM b WHERE p.M_Product_ID=b.M_ProductBOM_ID
AND b.M_Product_ID IN (SELECT T_Selection_ID FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID));
-- Copy into root table
DELETE FROM T_Selection WHERE AD_PInstance_ID = PInstance_ID;
INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID)
SELECT PInstance_ID, T_Selection_ID
FROM T_Selection2
WHERE Query_ID = 1 AND AD_PInstance_ID = PInstance_ID;
END LOOP;
<<FINISH_PROCESS>>
-- OK
Message := 'OK';
UPDATE M_Product
SET IsVerified = 'Y'
WHERE M_Product_ID=Record_ID;
-- Update AD_PInstance
DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || Message);
UPDATE AD_PInstance
SET Updated = SysDate,
IsProcessing = 'N',
Result = 1, -- success
ErrorMsg = Message
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
RETURN;
EXCEPTION
WHEN OTHERS THEN
ResultStr := ResultStr || ': ' || SQLERRM || ' - ' || Message;
DBMS_OUTPUT.PUT_LINE(ResultStr);
UPDATE AD_PInstance
SET Updated = SysDate,
IsProcessing = 'N',
Result = 0, -- failure
ErrorMsg = ResultStr
WHERE AD_PInstance_ID=PInstance_ID;
COMMIT;
--
UPDATE M_Product
SET IsVerified = 'N'
WHERE M_Product_ID=Record_ID;
COMMIT;
--
RETURN;
END M_Product_BOM_Check;
/

View File

@ -0,0 +1,19 @@
delete from ad_process_para_trl
where ad_process_para_id in
( select ad_process_para_id
from ad_process_para
where columnname = 'IsRecreate'
and ad_process_id =
( select ad_process_id
from ad_process
where value = 'Balance_Update' )
);
delete from ad_process_para
where columnname = 'IsRecreate'
and ad_process_id =
( select ad_process_id
from ad_process where value = 'Balance_Update' );
commit;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,749 @@
SET DEFINE OFF;
SET SQLBLANKLINES OFF;
UPDATE ad_element_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_element_id = 3093;
UPDATE ad_element_trl
SET description =
'El día que comenzó la implementación ó producción (se pone en ejecución) en Adempiere.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2488;
UPDATE ad_element_trl
SET description = 'Fecha en que vence el soporte a Adempiere'
WHERE ad_language = 'es_MX' AND ad_element_id = 2938;
UPDATE ad_element_trl
SET description =
'Número de las unidades de ayuda para la ayuda de Adempiere'
WHERE ad_language = 'es_MX' AND ad_element_id = 2124;
UPDATE ad_element_trl
SET description = 'Adempiere Solicita No de Documento '
WHERE ad_language = 'es_MX' AND ad_element_id = 2891;
UPDATE ad_element_trl
SET HELP =
'Patrón de la fecha en la notación Java. Ejemplos: dd.MM.yyyy - dd/MM/yyyy
Si el patrón para el lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2673;
UPDATE ad_element_trl
SET HELP =
'Si esta seleccionada, los números son impresos con un punto decimal "." - Si no con una coma decimal ",".
Los mil separadores son el contrario.
Si el patrón para su lenguaje no está correcto, cree por favor una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2674;
UPDATE ad_element_trl
SET HELP =
'Patrón de tiempo en notación Java. Ejemplos: "hh:mm:ss aaa z" - "HH:mm:ss"
Si el patrón del lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2676;
UPDATE ad_element_trl
SET HELP =
'el elemento contable definido por el usuario refiere a una tabla de Adempiere. Esto le permite emplear el contenido de cualquier tabla como una dimensión contable (ej Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_element_id = 2877;
UPDATE ad_element_trl
SET HELP =
'Un Elemento Contable definido por el Usuario refiere a una Tabla de Adempiere. Esto le permite emplear el contenido de cualquier Tabla como una Dimensión Contable (Ej. Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_element_id = 2878;
UPDATE ad_element_trl
SET HELP =
'Si Adempiere mantiene el estado de crédito, el estado "Credito Correcto" es movido a "Crédito en Verificación" empleando este valor como límite. De no definirlo, se empleará el 90%.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2883;
UPDATE ad_element_trl
SET HELP =
'Para automatizar el reporte de errores, emvie los errores a Adempiere. Solamente información (seguimiento de pila) es enviada (No datos o Información confidencial). Esto nos ayuda a responder rápidamente. Si usted tiene un contrato de soporte, le informaremos sobre las medidas correctivas. Hasta el momento, esta funcionalidad es experimental.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2886;
UPDATE ad_element_trl
SET HELP =
'Las ediciónes de sistema son creadas para acelerar la resolución de cualquier edición relacionada del sistema (errores potenciales). Si es habilitado, serán reportados automáticamente a Adempiere. No se transfiere información confidencial.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2887;
UPDATE ad_element_trl
SET HELP =
'Representación visual del Desempeño mediante colores. El esquema frrecuentemente tiene 3 niveles (ej. rojo-amarillo-verde). Adempiere soporta dos niveles (ej. rojo-verde) o cuatro noveles (ej. gris-bronce-plata-oro). Note que una Meta sin Medida es representada en Blanco. El porcentaje puede ser entre 0 y sin limite (ej. sobre 100%).'
WHERE ad_language = 'es_MX' AND ad_element_id = 2903;
UPDATE ad_element_trl
SET HELP =
'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).'
WHERE ad_language = 'es_MX' AND ad_element_id = 3052;
UPDATE ad_element_trl
SET HELP =
'If your appplication requires additional jar files, enter them here. The jar files must be located in the $ADEMPIERE_HOME/lib directory.'
WHERE ad_language = 'es_MX' AND ad_element_id = 3054;
UPDATE ad_element_trl
SET HELP =
'Adempiere permite crear automáticamente archivos de los documentos (ej. facturas) o de los informes. Usted define el material archivado con el espectador del archivo'
WHERE ad_language = 'es_MX' AND ad_element_id = 2672;
UPDATE ad_element_trl
SET HELP =
'Si su banco proporciona un número internacional de la cuenta bancaria, incorpórelo aquí detallamente ISO 13616 y http://www.ecbs.org. El número de cuenta tiene la longitud máxima de 22 caracteres (sin espacios). El IBAN se imprime a menudo con un espacio después de 4 caracteres. No incorpore los espacios a Adempiere.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2664;
UPDATE ad_element_trl
SET HELP =
'Usted puede restringir la capacidad de exportar datos de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2204;
UPDATE ad_element_trl
SET HELP =
'Usted puede comprar la ayuda comercial de Adempiere, Inc.
El honorario está por 10 usuarios internos. El número de las unidades de ayuda se exhibe aquí.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2124;
UPDATE ad_element_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_element_id = 1682;
UPDATE ad_element_trl
SET HELP =
'Adempiere permite definir condiciones de alerta en el sistema para estar informado.'
WHERE ad_language = 'es_MX' AND ad_element_id = 2087;
UPDATE ad_element_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_element_id = 3093;
UPDATE ad_field_trl
SET description =
'Name your Adempiere System installation, e.g. Joe Block, Inc.'
WHERE ad_language = 'es_MX' AND ad_field_id = 5899;
UPDATE ad_field_trl
SET description =
'Número de las unidades de ayuda para la ayuda de Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 6980;
UPDATE ad_field_trl
SET description =
'Los registros nos ayudan a mejorar servicio de la base de usuario de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 8330;
UPDATE ad_field_trl
SET description =
'El día que comenzó la implementación ó producción (se pone en ejecución) en Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 10221;
UPDATE ad_field_trl
SET description = 'Reportar Surtimiento a Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 12662;
UPDATE ad_field_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 13749;
UPDATE ad_field_trl
SET description = 'Fecha en que vence el soporte a Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 12870;
UPDATE ad_field_trl
SET description = 'Register your extension with Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 13507;
UPDATE ad_field_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 13715;
UPDATE ad_field_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 13723;
UPDATE ad_field_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_field_id = 13738;
UPDATE ad_field_trl
SET description = 'Adempiere Solicita No de Documento '
WHERE ad_language = 'es_MX' AND ad_field_id = 12664;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5121;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5123;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5124;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5125;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5127;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5128;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5129;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5808;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5809;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5810;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5811;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5812;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5813;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5814;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5815;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5816;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5817;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5821;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5823;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5824;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 5827;
UPDATE ad_field_trl
SET HELP =
'Adempiere permite definir condiciones de alerta en el sistema para estar informado.'
WHERE ad_language = 'es_MX' AND ad_field_id = 6858;
UPDATE ad_field_trl
SET HELP =
'Adempiere permite definir condiciones de alerta en el sistema para estar informado.'
WHERE ad_language = 'es_MX' AND ad_field_id = 6866;
UPDATE ad_field_trl
SET HELP =
'Usted puede comprar la ayuda comercial de Adempiere, Inc.
El honorario está por 10 usuarios internos. El número de las unidades de ayuda se exhibe aquí.'
WHERE ad_language = 'es_MX' AND ad_field_id = 6980;
UPDATE ad_field_trl
SET HELP =
'Adempiere permite definir condiciones de alerta en el sistema para estar informado.'
WHERE ad_language = 'es_MX' AND ad_field_id = 7002;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 7519;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 7521;
UPDATE ad_field_trl
SET HELP =
'Usted puede restringir la capacidad de exportar datos de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 8314;
UPDATE ad_field_trl
SET HELP =
'Usted puede restringir la capacidad de exportar datos de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 8319;
UPDATE ad_field_trl
SET HELP =
'Usted puede restringir la capacidad de exportar datos de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 8321;
UPDATE ad_field_trl
SET HELP =
'No pondremos los datos a disposición de terceros ni utilizaremos la información para propósitos estadísticos.
Nos ayudará, si usted permitirá publicar su uso en Adempiere. Nos pondremos en contacto directamente antes de que publiquemos cualquier información.'
WHERE ad_language = 'es_MX' AND ad_field_id = 8330;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8353;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8372;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8858;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8860;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8862;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8863;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 8879;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 10100;
UPDATE ad_field_trl
SET HELP =
'Si su banco proporciona un número internacional de la cuenta bancaria, incorpórelo aquí detallamente ISO 13616 y http://www.ecbs.org. El número de cuenta tiene la longitud máxima de 22 caracteres (sin espacios). El IBAN se imprime a menudo con un espacio después de 4 caracteres. No incorpore los espacios a Adempiere.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11017;
UPDATE ad_field_trl
SET HELP =
'Adempiere permite crear automáticamente archivos de los documentos (ej. facturas) o de los informes. Usted define el material archivado con el espectador del archivo'
WHERE ad_language = 'es_MX' AND ad_field_id = 11025;
UPDATE ad_field_trl
SET HELP =
'Patrón de la fecha en la notación Java. Ejemplos: dd.MM.yyyy - dd/MM/yyyy
Si el patrón para el lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11172;
UPDATE ad_field_trl
SET HELP =
'Si esta seleccionada, los números son impresos con un punto decimal "." - Si no con una coma decimal ",".
Los mil separadores son el contrario.
Si el patrón para su lenguaje no está correcto, cree por favor una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11173;
UPDATE ad_field_trl
SET HELP =
'Patrón de tiempo en notación Java. Ejemplos: "hh:mm:ss aaa z" - "HH:mm:ss"
Si el patrón del lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11175;
UPDATE ad_field_trl
SET HELP =
'Patrón de la fecha en la notación Java. Ejemplos: dd.MM.yyyy - dd/MM/yyyy
Si el patrón para el lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11180;
UPDATE ad_field_trl
SET HELP =
'Si esta seleccionada, los números son impresos con un punto decimal "." - Si no con una coma decimal ",".
Los mil separadores son el contrario.
Si el patrón para su lenguaje no está correcto, cree por favor una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11181;
UPDATE ad_field_trl
SET HELP =
'Patrón de tiempo en notación Java. Ejemplos: "hh:mm:ss aaa z" - "HH:mm:ss"
Si el patrón del lenguaje no es correcto, porfavor cree una petición en la ayuda de Adempiere con la información correcta.'
WHERE ad_language = 'es_MX' AND ad_field_id = 11183;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 12535;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 12570;
UPDATE ad_field_trl
SET HELP =
'el elemento contable definido por el usuario refiere a una tabla de Adempiere. Esto le permite emplear el contenido de cualquier tabla como una dimensión contable (ej Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12604;
UPDATE ad_field_trl
SET HELP =
'Un Elemento Contable definido por el Usuario refiere a una Tabla de Adempiere. Esto le permite emplear el contenido de cualquier Tabla como una Dimensión Contable (Ej. Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12605;
UPDATE ad_field_trl
SET HELP =
'el elemento contable definido por el usuario refiere a una tabla de Adempiere. Esto le permite emplear el contenido de cualquier tabla como una dimensión contable (ej Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12607;
UPDATE ad_field_trl
SET HELP =
'Un Elemento Contable definido por el Usuario refiere a una Tabla de Adempiere. Esto le permite emplear el contenido de cualquier Tabla como una Dimensión Contable (Ej. Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12608;
UPDATE ad_field_trl
SET HELP =
'el elemento contable definido por el usuario refiere a una tabla de Adempiere. Esto le permite emplear el contenido de cualquier tabla como una dimensión contable (ej Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12610;
UPDATE ad_field_trl
SET HELP =
'Un Elemento Contable definido por el Usuario refiere a una Tabla de Adempiere. Esto le permite emplear el contenido de cualquier Tabla como una Dimensión Contable (Ej. Actividad de Proyecto). Note que los Elementos de Usuario son opcionales y son llenados desde el contexto del Documento (ej. No Solicitado).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12611;
UPDATE ad_field_trl
SET HELP =
'Si Adempiere mantiene el estado de crédito, el estado "Credito Correcto" es movido a "Crédito en Verificación" empleando este valor como límite. De no definirlo, se empleará el 90%.'
WHERE ad_language = 'es_MX' AND ad_field_id = 12648;
UPDATE ad_field_trl
SET HELP =
'Para automatizar el reporte de errores, emvie los errores a Adempiere. Solamente información (seguimiento de pila) es enviada (No datos o Información confidencial). Esto nos ayuda a responder rápidamente. Si usted tiene un contrato de soporte, le informaremos sobre las medidas correctivas. Hasta el momento, esta funcionalidad es experimental.'
WHERE ad_language = 'es_MX' AND ad_field_id = 12653;
UPDATE ad_field_trl
SET HELP =
'Las ediciónes de sistema son creadas para acelerar la resolución de cualquier edición relacionada del sistema (errores potenciales). Si es habilitado, serán reportados automáticamente a Adempiere. No se transfiere información confidencial.'
WHERE ad_language = 'es_MX' AND ad_field_id = 12673;
UPDATE ad_field_trl
SET HELP =
'Representación visual del Desempeño mediante colores. El esquema frrecuentemente tiene 3 niveles (ej. rojo-amarillo-verde). Adempiere soporta dos niveles (ej. rojo-verde) o cuatro noveles (ej. gris-bronce-plata-oro). Note que una Meta sin Medida es representada en Blanco. El porcentaje puede ser entre 0 y sin limite (ej. sobre 100%).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12767;
UPDATE ad_field_trl
SET HELP =
'Representación visual del Desempeño mediante colores. El esquema frrecuentemente tiene 3 niveles (ej. rojo-amarillo-verde). Adempiere soporta dos niveles (ej. rojo-verde) o cuatro noveles (ej. gris-bronce-plata-oro). Note que una Meta sin Medida es representada en Blanco. El porcentaje puede ser entre 0 y sin limite (ej. sobre 100%).'
WHERE ad_language = 'es_MX' AND ad_field_id = 12774;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 12821;
UPDATE ad_field_trl
SET HELP =
'El proceso se conecta al servidor de Servicios de Soporte Adempiere y vsñifs el contrato de soporte. Para contratar soporte por favor ingrese a www.e-evolution.com.mx
'
WHERE ad_language = 'es_MX' AND ad_field_id = 12871;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 13020;
UPDATE ad_field_trl
SET HELP =
'If your appplication requires additional jar files, enter them here. The jar files must be located in the $ADEMPIERE_HOME/lib directory.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13498;
UPDATE ad_field_trl
SET HELP =
'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).'
WHERE ad_language = 'es_MX' AND ad_field_id = 13502;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 13503;
UPDATE ad_field_trl
SET HELP =
'You can register the four character extension with Adempiere. This makes sure that your extension can be automatically distributed and implemented. You will also be able to certify extensions. Contact Adempiere for details.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13507;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 13513;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 13575;
UPDATE ad_field_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_field_id = 13597;
UPDATE ad_field_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13715;
UPDATE ad_field_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13723;
UPDATE ad_field_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13738;
UPDATE ad_field_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_field_id = 13749;
UPDATE ad_menu_trl
SET description = 'Flujo de Trabajo Adempiere'
WHERE ad_language = 'es_MX' AND ad_menu_id = 501;
UPDATE ad_menu_trl
SET description = 'Mantenimiento del Servidor Adempiere'
WHERE ad_language = 'es_MX' AND ad_menu_id = 456;
UPDATE ad_menu_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_menu_id = 594;
UPDATE ad_menu_trl
SET description = 'Alterta Adempiere'
WHERE ad_language = 'es_MX' AND ad_menu_id = 379;
UPDATE ad_message_trl
SET msgtext =
'Descargados {0} for {1}
Versión = {2} - Lot = {3} - SerNo = {4}
Guarantee Date = {5,date,short}
Thank you for using Adempiere Customer Asset Management
'
WHERE ad_language = 'es_MX' AND ad_message_id = 747;
UPDATE ad_message_trl
SET msgtext = '© Jorg Janke - Adempiere; Inc. 1999-2002'
WHERE ad_language = 'es_MX' AND ad_message_id = 125;
UPDATE ad_message_trl
SET msgtip =
'Cree el archivo del seguimiento en el directorio de Adempiere ó en el directorio home del usuario'
WHERE ad_language = 'es_MX' AND ad_message_id = 813;
UPDATE ad_message_trl
SET msgtip = 'Ventana-Metal-Adempiere'
WHERE ad_language = 'es_MX' AND ad_message_id = 570;
UPDATE ad_message_trl
SET msgtip = 'http://www.adempiere.org'
WHERE ad_language = 'es_MX' AND ad_message_id = 125;
UPDATE ad_message_trl
SET msgtip =
'Name your Adempiere System installation, e.g. Joe Block, Inc.'
WHERE ad_language = 'es_MX' AND ad_message_id = 867;
UPDATE ad_message_trl
SET msgtip =
'Sign up for Adempiere Support - also supports the product development'
WHERE ad_language = 'es_MX' AND ad_message_id = 868;
UPDATE ad_process_para_trl
SET HELP =
'Los tipos de entidad "Diccionario"; "Adempiere"; y "Aplicación" podrían ser automáticamente sincronizados y las personalizaciones eliminadas ó sobreescritas'
WHERE ad_language = 'es_MX' AND ad_process_para_id = 630;
UPDATE ad_process_trl
SET description =
'Los registros nos ayudan a mejorar servicio de la base de usuario de Adempiere.'
WHERE ad_language = 'es_MX' AND ad_process_id = 250;
UPDATE ad_process_trl
SET description = 'Reportar Surtimiento a Adempiere'
WHERE ad_language = 'es_MX' AND ad_process_id = 339;
UPDATE ad_process_trl
SET description = 'Register your extension with Adempiere'
WHERE ad_language = 'es_MX' AND ad_process_id = 348;
UPDATE ad_process_trl
SET HELP =
'Para aumentar funcionamiento, Adempiere reasigna los datos usados. Este proceso despeja el cache local.'
WHERE ad_language = 'es_MX' AND ad_process_id = 205;
UPDATE ad_process_trl
SET HELP =
'No pondremos los datos a disposición de terceros ni utilizaremos la información para propósitos estadísticos.
Nos ayudará, si usted permitirá publicar su uso en Adempiere. Nos pondremos en contacto directamente antes de que publiquemos cualquier información.'
WHERE ad_language = 'es_MX' AND ad_process_id = 250;
UPDATE ad_process_trl
SET HELP =
'El proceso se conecta al servidor de Servicios de Soporte Adempiere y vsñifs el contrato de soporte. Para contratar soporte por favor ingrese a www.e-evolution.com.mx
'
WHERE ad_language = 'es_MX' AND ad_process_id = 342;
UPDATE ad_process_trl
SET HELP =
'You can register the four character extension with Adempiere. This makes sure that your extension can be automatically distributed and implemented. You will also be able to certify extensions. Contact Adempiere for details.'
WHERE ad_language = 'es_MX' AND ad_process_id = 348;
UPDATE ad_ref_list_trl
SET description = 'Aplicación Adempiere (sinchronizada)'
WHERE ad_language = 'es_MX' AND ad_ref_list_id = 488;
UPDATE ad_ref_list_trl
SET NAME = 'Adempiere'
WHERE ad_language = 'es_MX' AND ad_ref_list_id = 488;
UPDATE ad_tab_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_tab_id = 849;
UPDATE ad_tab_trl
SET description = 'Adempiere Alerta'
WHERE ad_language = 'es_MX' AND ad_tab_id = 504;
UPDATE ad_tab_trl
SET HELP =
'Representación Visual del desempeño mediante colores. Frecuentemente el esquema tiene tres niveles (ej. rojo - amarillo - verde). Adempiere soporta dos niveles (ej. rojo - verde) o cuatro niveles (ej. gris - bronce - plata - oro). Note que las medidasd sin límite son representadas en Blanco. Los porcentajes pueden ser entre 0 y sin límite (ej. superior a 100%).'
WHERE ad_language = 'es_MX' AND ad_tab_id = 779;
UPDATE ad_tab_trl
SET HELP =
'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).'
WHERE ad_language = 'es_MX' AND ad_tab_id = 831;
UPDATE ad_tab_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_tab_id = 849;
UPDATE ad_tab_trl
SET HELP =
'Adempiere Alerta permíte definir condiciones de sistema que usted desea ser alertado'
WHERE ad_language = 'es_MX' AND ad_tab_id = 504;
UPDATE ad_tab_trl
SET HELP =
'Antes de importar, Adempiere comprueba la unidad de la medida (por default si no es fijado), La categoria del producto (por default si no es fijado), El socio de negocio, la moneda (Por default la moneda de la contabilidad si no es fijada), El tipo de producto (solamente artículos y servicios), los únicos de UPC, llave y existencia de el No. de producto.<br>
Adempiere intenta para el mapa de los productos existentes, si el UPC, La llave y el vendedor del producto no siguen (en esta secuencia). Si el expediente importado podría ser emparejado, los valores del campo del producto serán sobreescritos solamente, si el campo correspondiente de la importación se define explícitamente. Ejemplo: la categoría del producto será sobreescrita solamente si está fijada explícitamente en la importación.'
WHERE ad_language = 'es_MX' AND ad_tab_id = 442;
UPDATE ad_tab_trl
SET HELP =
'Las versiones de sistema son creadas para apresurar la resolución de cualquier versión de sistema relacionaddo (errores potenciales). Si habilitó, automáticaamente son reportados a Adempiere. No sé transfiere información confidencial.'
WHERE ad_language = 'es_MX' AND ad_tab_id = 777;
UPDATE ad_wf_node_trl
SET HELP =
'Representación visual del desempeño mediante colores. El esquema frecuentemente tiene tres niveles (ej. rojo-amarillo-verde). Adempiere sporta dos niveles (ej. rojo-verde) o cuatro niveles (ej. gris-bronce-plata-oro). Note que las médidas sin límite son representadas en blanco. Los porcentajes pueden ser entre cero y sin límite (ej. superior a 100%).'
WHERE ad_language = 'es_MX' AND ad_wf_node_id = 147;
UPDATE ad_window_trl
SET description =
'LDAP Server to authenticate and authorize external systems based on Adempiere'
WHERE ad_language = 'es_MX' AND ad_window_id = 389;
UPDATE ad_window_trl
SET description = 'Alterta Adempiere'
WHERE ad_language = 'es_MX' AND ad_window_id = 276;
UPDATE ad_window_trl
SET HELP =
'Representación visual del desempeño mediante colores. El esquema frecuentemente tiene tres niveles (ej. rojo-amarillo-verde). Adempiere sporta dos niveles (ej. rojo-verde) o cuatro niveles (ej. gris-bronce-plata-oro). Note que las médidas sin límite son representadas en blanco. Los porcentajes pueden ser entre cero y sin límite (ej. superior a 100%).'
WHERE ad_language = 'es_MX' AND ad_window_id = 364;
UPDATE ad_window_trl
SET HELP =
'Las versiones de sistema son creados para acelerar la resolución de cualquier versión de sistema relacionado (errores potenciales). Si habilitó, son automáticamente reportados a Adempiere. No se transfieren datos o información confidencial.'
WHERE ad_language = 'es_MX' AND ad_window_id = 363;
UPDATE ad_window_trl
SET HELP =
'Las alarmas de Adempiere le permiten definen condiciones de sistema que usted desea ser alertado'
WHERE ad_language = 'es_MX' AND ad_window_id = 276;
UPDATE ad_window_trl
SET HELP =
'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).'
WHERE ad_language = 'es_MX' AND ad_window_id = 381;
UPDATE ad_window_trl
SET HELP =
'The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authentificate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.'
WHERE ad_language = 'es_MX' AND ad_window_id = 389;
UPDATE cm_container_trl
SET meta_keywords = 'GardenWorld, Adempiere'
WHERE ad_language = 'es_MX' AND cm_container_id = 101;
UPDATE cm_cstage_trl
SET meta_keywords = 'GardenWorld, Adempiere'
WHERE ad_language = 'es_MX' AND cm_cstage_id = 101;
COMMIT ;

View File

@ -0,0 +1,6 @@
UPDATE ad_system
SET releaseno = '313',
VERSION = '2006-12-27'
WHERE ad_system_id = 0 AND ad_client_id = 0;
COMMIT ;

View File

@ -0,0 +1,110 @@
CREATE OR REPLACE FUNCTION paymentTermDueDays
(
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_DueDays.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
***
* Title: Get Due Days
* Description:
* Returns the days due (positive) or the days till due (negative)
* Grace days are not considered!
* If record is not found it assumes due immediately
*
* Test: SELECT paymentTermDueDays(103, '01-DEC-2000', '15-DEC-2000') FROM DUAL
*
* Contributor(s): Carlos Ruiz - globalqss - match with SQLJ version
************************************************************************/
AS
Days NUMBER := 0;
DueDate DATE := NULL;
calDueDate DATE;
FixMonthOffset C_PaymentTerm.FixMonthOffset%TYPE;
MaxDayCut NUMBER;
MaxDay NUMBER;
v_PayDate DATE;
--
CURSOR Cur_PT IS
SELECT *
FROM C_PaymentTerm
WHERE C_PaymentTerm_ID = PaymentTerm_ID;
FirstDay DATE;
NoDays NUMBER;
BEGIN
IF PaymentTerm_ID = 0 OR DocDate IS NULL THEN
RETURN 0;
END IF;
v_PayDate := PayDate;
IF v_PayDate IS NULL THEN
v_PayDate := TRUNC(SYSDATE);
END IF;
FOR p IN Cur_PT LOOP -- for convineance only
-- DBMS_OUTPUT.PUT_LINE(p.Name || ' - Doc = ' || TO_CHAR(DocDate));
-- Due 15th of following month
IF (p.IsDueFixed = 'Y') THEN
-- DBMS_OUTPUT.PUT_LINE(p.Name || ' - Day = ' || p.FixMonthDay);
FirstDay := TRUNC(DocDate, 'MM');
NoDays := TRUNC(DocDate) - FirstDay;
DueDate := FirstDay + (p.FixMonthDay-1); -- starting on 1st
DueDate := ADD_MONTHS(DueDate, p.FixMonthOffset);
IF (NoDays > p.FixMonthCutoff) THEN
DueDate := ADD_MONTHS(DueDate, 1);
END IF;
calDueDate := TRUNC(DocDate);
MaxDayCut := TO_NUMBER (TO_CHAR (LAST_DAY (calDueDate), 'dd'));
IF p.FixMonthCutoff > MaxDayCut THEN
calDueDate := LAST_DAY(TRUNC(calDueDate));
ELSE
-- set day fixmonthcutoff on duedate
calDueDate := TO_DATE ( SUBSTR (TO_CHAR (TRUNC (calDueDate), 'yyyymmdd'), 1, 6)
|| LPAD (TO_CHAR (p.FixMonthCutoff), 2, '0'),
'yyyymmdd'
);
END IF;
FixMonthOffset := p.FixMonthOffset;
IF DocDate > calDueDate THEN
FixMonthOffset := FixMonthOffset + 1;
END IF;
calDueDate := ADD_MONTHS(calDueDate, FixMonthOffset);
MaxDay := TO_NUMBER (TO_CHAR (LAST_DAY (calDueDate), 'dd'));
IF (p.FixMonthDay > MaxDay) -- 32 -> 28
OR (p.FixMonthDay >= 30 AND MaxDay > p.FixMonthDay) THEN -- 30 -> 31
calDueDate := TO_DATE ( SUBSTR (TO_CHAR (TRUNC (calDueDate), 'yyyymmdd'), 1, 6)
|| LPAD (TO_CHAR (MaxDay), 2, '0'),
'yyyymmdd'
);
ELSE
calDueDate := TO_DATE ( SUBSTR (TO_CHAR (TRUNC (calDueDate), 'yyyymmdd'), 1, 6)
|| LPAD (TO_CHAR (p.FixMonthDay), 2, '0'),
'yyyymmdd'
);
END IF;
DueDate := calDueDate;
ELSE
-- DBMS_OUTPUT.PUT_LINE('Net = ' || p.NetDays);
DueDate := TRUNC(DocDate) + p.NetDays;
END IF;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE('Due = ' || TO_CHAR(DueDate) || ', Pay = ' || TO_CHAR(v_PayDate));
IF DueDate IS NULL THEN
RETURN 0;
END IF;
Days := TRUNC(v_PayDate) - DueDate;
RETURN Days;
END paymentTermDueDays;
/

View File

@ -0,0 +1,10 @@
UPDATE ad_entitytype
SET NAME = 'Appliactions'
WHERE entitytype = 'A';
UPDATE ad_entitytype
SET description =
'Application Dictionary Ownership ** System Maintained **'
WHERE entitytype = 'D';
COMMIT ;