Merge development (717d3f6bb6a2) into zk7 branch

This commit is contained in:
Carlos Ruiz 2014-06-03 18:28:40 -05:00
commit c69070876f
87 changed files with 4596 additions and 359 deletions

View File

@ -25,15 +25,16 @@ AS
v_GrandTotal NUMBER;
v_TotalLines NUMBER;
v_C_PaymentTerm_ID NUMBER(10);
v_C_Currency_ID NUMBER(10);
v_DocDate DATE;
v_PayDate DATE := SysDate;
v_IsPayScheduleValid CHAR(1);
BEGIN
SELECT ci.IsDiscountLineAmt, i.GrandTotal, i.TotalLines,
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid, C_Currency_ID
INTO v_IsDiscountLineAmt, v_GrandTotal, v_TotalLines,
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid, v_C_Currency_ID
FROM AD_ClientInfo ci, C_Invoice i
WHERE ci.AD_Client_ID=i.AD_Client_ID
AND i.C_Invoice_ID=p_C_Invoice_ID;
@ -64,11 +65,11 @@ BEGIN
END IF;
-- return discount amount
RETURN paymentTermDiscount (v_Amount, 0, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
RETURN paymentTermDiscount (v_Amount, v_C_Currency_ID, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
-- Most likely if invoice not found
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END invoiceDiscount;
/
/

View File

@ -35,7 +35,5 @@ BEGIN
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -9,5 +9,6 @@ BEGIN
return cast(datetime + cast(duration as interval) as date);
END;
$BODY$
LANGUAGE 'plpgsql'
LANGUAGE 'plpgsql' IMMUTABLE
;

View File

@ -20,5 +20,5 @@ BEGIN
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -48,4 +48,5 @@ BEGIN
RETURN currencyConvert (p_Amount, p_CurFrom_ID, v_CurTo_ID, p_ConvDate, null, p_Client_ID, p_Org_ID);
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -55,8 +55,5 @@ BEGIN
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -175,4 +175,5 @@ EXCEPTION WHEN OTHERS THEN
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -57,6 +57,5 @@ BEGIN
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
LANGUAGE 'plpgsql' STABLE;
ALTER FUNCTION currencyround(p_amount numeric, p_curto_id numeric, p_costing character varying) OWNER TO adempiere;

View File

@ -29,15 +29,16 @@ DECLARE
v_GrandTotal NUMERIC;
v_TotalLines NUMERIC;
v_C_PaymentTerm_ID NUMERIC(10);
v_C_Currency_ID NUMERIC(10);
v_DocDate timestamp with time zone;
v_PayDate timestamp with time zone := now();
v_IsPayScheduleValid CHAR(1);
BEGIN
SELECT ci.IsDiscountLineAmt, i.GrandTotal, i.TotalLines,
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid, C_Currency_ID
INTO v_IsDiscountLineAmt, v_GrandTotal, v_TotalLines,
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid, v_C_Currency_ID
FROM AD_ClientInfo ci, C_Invoice i
WHERE ci.AD_Client_ID=i.AD_Client_ID
AND i.C_Invoice_ID=p_C_Invoice_ID;
@ -69,7 +70,7 @@ BEGIN
END IF;
-- return discount amount
RETURN paymentTermDiscount (v_Amount, 0, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
RETURN paymentTermDiscount (v_Amount, v_C_Currency_ID, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
-- Most likely if invoice not found
EXCEPTION
@ -77,6 +78,5 @@ EXCEPTION
RETURN NULL;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -116,5 +116,6 @@ BEGIN
END;
$BODY$
LANGUAGE 'plpgsql'
LANGUAGE 'plpgsql' STABLE
;

View File

@ -132,7 +132,8 @@ BEGIN
RETURN v_TotalOpenAmt;
END;
$BODY$
LANGUAGE 'plpgsql' ;
LANGUAGE 'plpgsql' STABLE;
CREATE OR REPLACE FUNCTION InvoiceopenToDate
(
@ -233,4 +234,5 @@ BEGIN
RETURN v_TotalOpenAmt;
END;
$BODY$
LANGUAGE 'plpgsql' ;
LANGUAGE 'plpgsql' STABLE;

View File

@ -77,5 +77,5 @@ BEGIN
RETURN v_PaymentAmt * v_MultiplierAP;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -85,4 +85,5 @@ BEGIN
RETURN v_PaymentAmt * v_MultiplierAP;
END;
$BODY$
LANGUAGE 'plpgsql' ;
LANGUAGE 'plpgsql' STABLE;

View File

@ -80,5 +80,5 @@ BEGIN
RETURN Discount;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -45,5 +45,6 @@ BEGIN
RETURN DueDate;
END;
$BODY$
LANGUAGE 'plpgsql'
LANGUAGE 'plpgsql' STABLE
;

View File

@ -116,7 +116,5 @@ BEGIN
RETURN Days;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -74,6 +74,5 @@ BEGIN
RETURN v_AllocatedAmt;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -74,4 +74,5 @@ BEGIN
RETURN v_AvailableAmt;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -88,5 +88,5 @@ BEGIN
RETURN v_Name;
END;
$body$ LANGUAGE plpgsql;
$body$ LANGUAGE plpgsql STABLE;

View File

@ -30,11 +30,12 @@ BEGIN
duration = days || ' day';
return cast(date_trunc('day',datetime) + cast(duration as interval) as date);
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;
CREATE OR REPLACE FUNCTION subtractdays (day TIMESTAMP WITH TIME ZONE, days NUMERIC)
RETURNS DATE AS $$
BEGIN
RETURN addDays(day,(days * -1));
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -21,8 +21,6 @@
*/
/** Get Character at Position */
SET search_path = adempiere, pg_catalog;
CREATE OR REPLACE FUNCTION charAt (
IN VARCHAR, -- $1 the string
IN INTEGER -- $2 the position
@ -31,4 +29,5 @@ $$
BEGIN
RETURN SUBSTR($1, $2, 1);
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -25,4 +25,5 @@ RETURNS INTEGER AS $$
BEGIN
RETURN CAST(p_date1 AS DATE) - CAST(p_date2 as DATE);
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -47,4 +47,5 @@ BEGIN
RETURN v_DocumentNo;
END;
$BODY$
LANGUAGE 'plpgsql' ;
LANGUAGE 'plpgsql' STABLE;

View File

@ -73,4 +73,5 @@ BEGIN
datetime = date_trunc(datepart, $1);
RETURN cast(datetime as date) + offsetdays;
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -39,7 +39,6 @@ BEGIN
RETURN tmpvar;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100
LANGUAGE plpgsql STABLE
;

View File

@ -44,4 +44,5 @@ BEGIN
RETURN v_value;
END;
$BODY$
LANGUAGE 'plpgsql';
LANGUAGE 'plpgsql' STABLE;

View File

@ -63,4 +63,5 @@ begin
return v_nextDate::timestamp with time zone;
end;
$$
LANGUAGE plpgsql;
LANGUAGE plpgsql STABLE;

View File

@ -59,5 +59,6 @@ BEGIN
RETURN 0;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
LANGUAGE plpgsql STABLE
;

View File

@ -59,5 +59,6 @@ BEGIN
RETURN 0;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
LANGUAGE plpgsql STABLE
;

View File

@ -6,4 +6,5 @@ $$
BEGIN
RETURN ROUND($1, cast($2 as integer));
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -24,7 +24,7 @@ RETURNS TIMESTAMP WITH TIME ZONE AS $$
BEGIN
RETURN CAST(datetime AS DATE);
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;
CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITH TIME ZONE, format varchar)
RETURNS DATE AS $$
@ -43,11 +43,12 @@ BEGIN
RETURN CAST(datetime AS DATE);
END IF;
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;
CREATE OR REPLACE FUNCTION trunc(i INTERVAL)
RETURNS INTEGER AS $$
BEGIN
RETURN EXTRACT(DAY FROM i);
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE;

View File

@ -0,0 +1,43 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 22, 2014 6:03:29 PM MYT
-- 1003710 Performance issue - Change column reference from table to search
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:03:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55318
;
-- May 22, 2014 6:04:22 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:04:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=201503
;
-- May 22, 2014 6:04:56 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:04:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55303
;
-- May 22, 2014 6:06:00 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56355
;
-- May 22, 2014 6:08:12 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:08:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55322
;
-- May 22, 2014 6:08:58 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:08:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55323
;
-- May 22, 2014 6:09:41 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=52007
;
-- May 22, 2014 6:10:08 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:10:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55305
;
-- May 22, 2014 6:11:15 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2014-05-22 18:11:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=52008
;
SELECT register_migration_script('201405221012_Ticket_1003710.sql') FROM dual
;

View File

@ -0,0 +1,10 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 26, 2014 11:06:10 PM COT
-- IDEMPIERE-1967 Bank transfer process should allow for document number to be optional
UPDATE AD_Process_Para SET IsMandatory='N',Updated=TO_DATE('2014-05-26 22:47:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53251
;
SELECT register_migration_script('201405262306_IDEMPIERE-1967.sql') FROM dual
;

View File

@ -0,0 +1,40 @@
-- May 22, 2014 6:03:29 PM MYT
-- 1003710 Performance issue - Change column reference from table to search
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:03:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55318
;
-- May 22, 2014 6:04:22 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:04:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=201503
;
-- May 22, 2014 6:04:56 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:04:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55303
;
-- May 22, 2014 6:06:00 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56355
;
-- May 22, 2014 6:08:12 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:08:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55322
;
-- May 22, 2014 6:08:58 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:08:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55323
;
-- May 22, 2014 6:09:41 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=52007
;
-- May 22, 2014 6:10:08 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:10:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55305
;
-- May 22, 2014 6:11:15 PM MYT
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2014-05-22 18:11:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=52008
;
SELECT register_migration_script('201405221012_Ticket_1003710.sql') FROM dual
;

View File

@ -0,0 +1,7 @@
-- May 26, 2014 11:06:10 PM COT
-- IDEMPIERE-1967 Bank transfer process should allow for document number to be optional
UPDATE AD_Process_Para SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-05-26 22:47:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53251
;
SELECT register_migration_script('201405262306_IDEMPIERE-1967.sql') FROM dual
;

View File

@ -0,0 +1,276 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 26, 2014 10:31:26 PM ICT
-- IDEMPIERE-1334 Run one or more processes from Info Window
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Processing,DatabaseViewDrop,AD_Client_ID,Created) VALUES ('N','N','N','4',0,385,200129,'N','N','Y','D','L','399fcb47-f46c-4789-9e45-962cc5379c16','Y','Y','AD_InfoProcess','define process for info window','Info Process','Y',0,100,TO_DATE('2014-05-26 22:31:25','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,TO_DATE('2014-05-26 22:31:25','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:27 PM ICT
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID,Created) VALUES ('N',200000,'Y',1000000,'N','Y',200176,'Table AD_InfoProcess','AD_InfoProcess',1,'48700d65-3ba4-4888-8242-6af9a613206a',0,100,TO_DATE('2014-05-26 22:31:26','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0,TO_DATE('2014-05-26 22:31:26','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:28 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_InfoProcess_ID',202712,'Info Process','Info Process','ebfa3db8-e6b2-43aa-9eaa-e3dc1b2eb7f1',0,100,100,'Y',0,'D',TO_DATE('2014-05-26 22:31:27','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-05-26 22:31:27','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:28 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211241,'Y','N','N','N',10,'N','Y','N','Y','e3154b48-b2ac-4ad2-ba43-92744e8c6a4c','N','AD_InfoProcess_ID','Info Process','N',TO_DATE('2014-05-26 22:31:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202712,13,200129)
;
-- May 26, 2014 10:31:28 PM ICT
CREATE TABLE AD_InfoProcess (AD_InfoProcess_ID NUMBER(10) NOT NULL, CONSTRAINT AD_InfoProcess_Key PRIMARY KEY (AD_InfoProcess_ID))
;
-- May 26, 2014 10:31:29 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_InfoProcess_UU',202713,'AD_InfoProcess_UU','AD_InfoProcess_UU','dde8ccd5-449b-4b9b-84a2-720e77eff87b',0,100,100,'Y',0,'D',TO_DATE('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:30 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211242,'Y','N','N','N',36,'N','N','N','Y','8f961362-5939-48a4-8c8d-8d8b5d86a83e','N','AD_InfoProcess_UU','AD_InfoProcess_UU','N',TO_DATE('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202713,10,200129)
;
-- May 26, 2014 10:31:30 PM ICT
ALTER TABLE AD_InfoProcess ADD AD_InfoProcess_UU VARCHAR2(36) NOT NULL
;
-- May 26, 2014 10:31:30 PM ICT
ALTER TABLE AD_InfoProcess ADD CONSTRAINT AD_InfoProcess_UU_idx UNIQUE (AD_InfoProcess_UU)
;
-- May 26, 2014 10:31:31 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211243,'Y','N','N','N',10,'N','N','N','Y','e8fa9743-e852-4fb3-a8ba-aba7190f5d26','N','AD_Client_ID','Client/Tenant for this installation.','@#AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_DATE('2014-05-26 22:31:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADClient_ADInfoProcess','N',102,19,200129,129)
;
-- May 26, 2014 10:31:31 PM ICT
ALTER TABLE AD_InfoProcess ADD AD_Client_ID NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:31 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211244,'Y','N','N','N',10,'N','N','N','Y','48046a19-4d3c-40e6-93f2-49858061c1ff','N','AD_Org_ID','Organizational entity within client','@#AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_DATE('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADOrg_ADInfoProcess','N',113,19,200129,104)
;
-- May 26, 2014 10:31:31 PM ICT
ALTER TABLE AD_InfoProcess ADD AD_Org_ID NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:32 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211245,'Y','N','N','N',1,'N','N','N','Y','0d5a6a7a-b436-4958-814a-18ecafbc8971','Y','IsActive','The record is active in the system','Y','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.','Active','N',TO_DATE('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',348,20,200129)
;
-- May 26, 2014 10:31:32 PM ICT
ALTER TABLE AD_InfoProcess ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- May 26, 2014 10:31:33 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211246,'Y','N','N','N',29,'N','N','N','Y','a8315f0c-3cbd-4092-bcc7-8e1f0bc4021c','N','Created','Date this record was created','SYSDATE','The Created field indicates the date that this record was created.','Created','N',TO_DATE('2014-05-26 22:31:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',245,16,200129)
;
-- May 26, 2014 10:31:33 PM ICT
ALTER TABLE AD_InfoProcess ADD Created DATE DEFAULT SYSDATE NOT NULL
;
-- May 26, 2014 10:31:34 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211247,'Y','N','N','N',10,'N','N','N','Y','f2e43604-537c-46a7-a08a-425589a290de','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_DATE('2014-05-26 22:31:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',246,18,110,200129)
;
-- May 26, 2014 10:31:34 PM ICT
ALTER TABLE AD_InfoProcess ADD CreatedBy NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:35 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211248,'Y','N','N','N',29,'N','N','N','Y','87143907-1038-4c5d-90f6-3114a6fc7edf','N','Updated','Date this record was updated','SYSDATE','The Updated field indicates the date that this record was updated.','Updated','N',TO_DATE('2014-05-26 22:31:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',607,16,200129)
;
-- May 26, 2014 10:31:35 PM ICT
ALTER TABLE AD_InfoProcess ADD Updated DATE DEFAULT SYSDATE NOT NULL
;
-- May 26, 2014 10:31:35 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211249,'Y','N','N','N',10,'N','N','N','Y','197f9f68-6340-45a8-9d75-9d027f8bcc75','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_DATE('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',608,18,110,200129)
;
-- May 26, 2014 10:31:35 PM ICT
ALTER TABLE AD_InfoProcess ADD UpdatedBy NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:36 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211250,'Y','N','Y','N',60,'Y','N','N','Y','cba0a7f1-a35e-4410-b53d-b47a0a81b8d5','Y','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.','Name','Y',TO_DATE('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',469,10,200129)
;
-- May 26, 2014 10:31:36 PM ICT
ALTER TABLE AD_InfoProcess ADD Name VARCHAR2(60) NOT NULL
;
-- May 26, 2014 10:31:37 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211251,'N','N','N','N',255,'Y','N','N','Y','da7faea4-1447-4912-975d-9916325f892c','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_DATE('2014-05-26 22:31:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',275,10,200129)
;
-- May 26, 2014 10:31:37 PM ICT
ALTER TABLE AD_InfoProcess ADD Description VARCHAR2(255) DEFAULT NULL
;
-- May 26, 2014 10:31:38 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211252,'N','N','N','N',120,'N','N','N','Y','54fdf7c3-564a-48ea-af3c-314efca2f0ed','Y','ImageURL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.','Image URL','Y',TO_DATE('2014-05-26 22:31:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',1720,10,200129)
;
-- May 26, 2014 10:31:38 PM ICT
ALTER TABLE AD_InfoProcess ADD ImageURL VARCHAR2(120) DEFAULT NULL
;
-- May 26, 2014 10:31:38 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211253,'Y','N','N','N',10,'N','N','N','Y','b9449134-fe06-4a9a-b1a6-54077974de21','Y','SeqNo','Method of ordering records; lowest number comes first','@SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_InfoProcess WHERE AD_InfoWindow_ID=@AD_InfoWindow_ID@','The Sequence indicates the order of records','Sequence','N',TO_DATE('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',566,11,200129)
;
-- May 26, 2014 10:31:38 PM ICT
ALTER TABLE AD_InfoProcess ADD SeqNo NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:39 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211254,'Y','N','N','N',10,'N','N','N','Y','be4dc8ea-58bf-4238-bff2-71099c2f36f9','Y','AD_Process_ID','Process or Report','The Process field identifies a unique Process or Report in the system.','Process','Y',TO_DATE('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADProcess_ADInfoProcess','N',117,19,200129)
;
-- May 26, 2014 10:31:39 PM ICT
ALTER TABLE AD_InfoProcess ADD AD_Process_ID NUMBER(10) NOT NULL
;
-- May 26, 2014 10:31:40 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211255,'N','N','N','Y',10,'N','N','N','Y','d9a775c3-dd5c-4e91-8416-60b78c33eb4e','N','AD_InfoWindow_ID','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.','Info Window','Y',TO_DATE('2014-05-26 22:31:39','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:39','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADInfoWindow_ADInfoProcess','C',3068,19,200129)
;
-- May 26, 2014 10:31:40 PM ICT
ALTER TABLE AD_InfoProcess ADD AD_InfoWindow_ID NUMBER(10) DEFAULT NULL
;
-- May 26, 2014 10:31:41 PM ICT
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (0,'Y',0,211256,'N','N','N',0,'N',2000,'N','N','N','Y','54387a92-4caa-4ab2-a765-51cf779a537c','Y','Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.','Comment/Help','Y',TO_DATE('2014-05-26 22:31:40','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:40','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',326,14,200129)
;
-- May 26, 2014 10:31:41 PM ICT
ALTER TABLE AD_InfoProcess ADD Help VARCHAR2(2000) DEFAULT NULL
;
-- May 26, 2014 10:31:41 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,Name,Description,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('LayoutType',202714,'Process info can display as button, list, menu','LayoutType','Layout type of info process','Layout Type','913eafda-0cdc-4c44-85f8-487d77a3787c',0,100,100,'Y',0,'D',TO_DATE('2014-05-26 22:31:41','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-05-26 22:31:41','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:42 PM ICT
INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,Description,ValidationType,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (200083,'AD_InfoProcess LayoutType','D','2171ebd2-e11a-4612-9885-128f155d65e8','N','Define layout type of info process button','L',0,100,TO_DATE('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),'Y',TO_DATE('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- May 26, 2014 10:31:43 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200185,200083,'Display as button','Button','6884dcd1-bc9a-4d16-9b2c-fe40968747f8','B',TO_DATE('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:44 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200186,200083,'Display as menu on a gear button','Menu','7b539591-296a-43ee-916c-c87c35acc84d','M',TO_DATE('2014-05-26 22:31:43','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2014-05-26 22:31:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:44 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200187,200083,'Display as list','List','ff0cba3e-e82c-4aa8-9f9b-bedf681b822d','L',TO_DATE('2014-05-26 22:31:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2014-05-26 22:31:44','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:45 PM ICT
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES (0,'Y',0,211257,'N','N','N',0,'N',1,'N','N','N','Y','a0e8f5b5-ac5f-44ba-a2c9-060dd3231c4e','Y','LayoutType','Layout type of info process','Process info can display as button, list, menu','LayoutType','Y',TO_DATE('2014-05-26 22:31:45','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-26 22:31:45','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202714,17,200083,200129)
;
-- May 26, 2014 10:31:45 PM ICT
ALTER TABLE AD_InfoProcess ADD LayoutType VARCHAR2(1) DEFAULT NULL
;
-- 28/05/2014 01:24:40 PM COT
UPDATE AD_Column SET IsMandatory='Y', DefaultValue='B',Updated=TO_DATE('2014-05-28 13:24:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=211257
;
-- 28/05/2014 01:24:44 PM COT
ALTER TABLE AD_InfoProcess MODIFY LayoutType VARCHAR2(10) DEFAULT 'B'
;
-- 28/05/2014 01:24:44 PM COT
ALTER TABLE AD_InfoProcess MODIFY LayoutType NOT NULL
;
-- May 26, 2014 10:31:48 PM ICT
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Table_ID,AD_Client_ID,TreeDisplayedOn) VALUES ('N','N','Y',385,60,'N','N','N','N','N','Y','N',1,'2a39f93a-2062-404a-8e28-19fc45982162','D','Process',200142,0,TO_DATE('2014-05-26 22:31:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2014-05-26 22:31:47','YYYY-MM-DD HH24:MI:SS'),100,'Y',200129,0,'B')
;
-- May 26, 2014 10:31:49 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,36,'N','N',0,'Y',203026,'N','AD_InfoProcess_UU','87361dd1-cfc0-412d-a344-e5f602650e32','N','N',100,0,100,TO_DATE('2014-05-26 22:31:48','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211242,'D',TO_DATE('2014-05-26 22:31:48','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:49 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',0,'Y',203027,'N','Info Process','8020c77c-816a-4be9-a38c-747aed3afcf2','N','N',100,0,100,TO_DATE('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211241,'D',TO_DATE('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:50 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',10,'Y',203028,'Y','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client/Tenant for this installation.','Client','a6fccb4a-2521-4369-a1bb-06602ae9c840','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211243,'D',TO_DATE('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:51 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',20,'Y',203029,'Y','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organizational entity within client','Organization','60f9d173-cefb-417c-8080-8bb16aebff7e','Y','N','Y',100,0,100,TO_DATE('2014-05-26 22:31:50','YYYY-MM-DD HH24:MI:SS'),'Y','N',4,'N',0,2,1,'N','N',211244,'D',TO_DATE('2014-05-26 22:31:50','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:51 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',30,'Y',203030,'Y','The Info window is used to search and select records as well as display information relevant to the selection.','Info and search/select Window','Info Window','ecc17f1a-a61e-4449-a35b-9915088cad60','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,1,'N',0,2,1,'N','N',211255,'D',TO_DATE('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:52 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,120,'N','N',40,'Y',203031,'N','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.','URL of image','Image URL','8a9c636e-677b-464c-a942-3e0e8f5ad3a4','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,4,'N',0,2,1,'N','N',211252,'D',TO_DATE('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:53 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,60,'N','N',50,'Y',203032,'N','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.','Alphanumeric identifier of the entity','Name','af4c42ad-5b90-474a-80f4-41341a08d3cf','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,5,1,'N','N',211250,'D',TO_DATE('2014-05-26 22:31:52','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:53 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,255,'N','N',60,'Y',203033,'N','A description is limited to 255 characters.','Optional short description of the record','Description','cc49a78e-2927-484e-990e-8c303be44b4c','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,5,1,'N','N',211251,'D',TO_DATE('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:54 PM ICT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',200142,0,'N','N',70,'Y',203034,'N','The Help field contains a hint, comment or help about the use of this item.','Comment or Hint','Comment/Help','4b9118d1-4cc9-47fe-beee-b24e4d1263cb','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80,1,'N',0,5,3,'N','N',211256,'D',TO_DATE('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:55 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',80,'Y',203035,'N','The Process field identifies a unique Process or Report in the system.','Process or Report','Process','2f7cb5e4-1af9-4912-b9dd-bbc8ccbae537','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:54','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,1,'N',0,2,1,'N','N',211254,'D',TO_DATE('2014-05-26 22:31:54','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:55 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',90,'Y',203036,'N','The Sequence indicates the order of records','Method of ordering records; lowest number comes first','Sequence','c5ee4976-735e-40f8-8cd4-4bacc36adcdf','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,4,'N',0,2,1,'N','N',211253,'D',TO_DATE('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:56 PM ICT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',200142,0,'N','N',100,'Y',203037,'N','Process info can display as button, list, menu','Layout type of info process','LayoutType','106b208d-b39b-4ab0-b839-7d0c95951bea','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'),'Y','Y',90,1,'N',0,2,1,'N','N',211257,'D',TO_DATE('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:57 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,1,'N','N',110,'Y',203038,'N','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.','The record is active in the system','Active','e45bfa22-f210-4a87-9b0c-b3ab2da35161','Y','N',100,0,100,TO_DATE('2014-05-26 22:31:56','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,5,'N',0,2,1,'N','N',211245,'D',TO_DATE('2014-05-26 22:31:56','YYYY-MM-DD HH24:MI:SS'))
;
-- migrate for anyone use red1 process in info panel start
INSERT INTO AD_InfoProcess
(ad_infoprocess_id, ad_infowindow_id, ad_client_id, ad_org_id, isactive,createdby, updatedby, seqno, name, ad_process_id, description, help, ad_infoprocess_uu)
(SELECT nextidfunc(200176,'N'), ad_infowindow_id, iw.ad_client_id, iw.ad_org_id, 'Y', 100, 100, 10, pr.name, iw.ad_process_id, pr.description, pr.help, generate_uuid()
FROM ad_infowindow iw INNER JOIN ad_process pr ON pr.ad_process_ID = iw.ad_process_ID
WHERE iw.ad_process_ID IS NOT NULL
);
-- May 23, 2014 4:01:30 PM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=202596
;
-- May 23, 2014 4:01:30 PM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=202596
;
-- May 23, 2014 4:01:51 PM ICT
UPDATE AD_Column SET IsActive='N' WHERE AD_Column_ID=210944
;
SELECT register_migration_script('201405261604_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,68 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 29, 2014 6:19:41 AM ICT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203032
;
-- May 29, 2014 6:19:41 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203032
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203033
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203033
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203034
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203034
;
-- May 29, 2014 6:20:37 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211251
;
-- May 29, 2014 6:20:37 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211251
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211256
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211256
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211250
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211250
;
ALTER TABLE ad_infoprocess DROP COLUMN name
;
ALTER TABLE ad_infoprocess DROP COLUMN description
;
ALTER TABLE ad_infoprocess DROP COLUMN help
;
-- May 29, 2014 6:21:41 AM ICT
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('M','Process Menu',200275,'D','c7cb8357-7a1f-46ab-9957-cda58431adfd','ProcessMenu','Y',TO_DATE('2014-05-29 06:21:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2014-05-29 06:21:35','YYYY-MM-DD HH24:MI:SS'))
;
SELECT register_migration_script('201405291604_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,35 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 29, 2014 6:00:45 PM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2014-05-29 18:00:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=211254
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203030
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=203036
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=203035
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=203037
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=203038
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203031
;
SELECT register_migration_script('201405291802_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,79 @@
CREATE OR REPLACE FUNCTION invoiceDiscount
(
p_C_Invoice_ID IN NUMBER,
p_PayDate IN DATE,
p_C_InvoicePaySchedule_ID IN NUMBER
)
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_Invoice_Discount.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
***
* Title: Calculate Payment Discount Amount
* Description:
* - Calculate discountable amount (i.e. with or without tax)
* - Calculate and return payment discount
************************************************************************/
AS
v_Amount NUMBER;
v_IsDiscountLineAmt CHAR(1);
v_GrandTotal NUMBER;
v_TotalLines NUMBER;
v_C_PaymentTerm_ID NUMBER(10);
v_C_Currency_ID NUMBER(10);
v_DocDate DATE;
v_PayDate DATE := SysDate;
v_IsPayScheduleValid CHAR(1);
BEGIN
SELECT ci.IsDiscountLineAmt, i.GrandTotal, i.TotalLines,
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid, C_Currency_ID
INTO v_IsDiscountLineAmt, v_GrandTotal, v_TotalLines,
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid, v_C_Currency_ID
FROM AD_ClientInfo ci, C_Invoice i
WHERE ci.AD_Client_ID=i.AD_Client_ID
AND i.C_Invoice_ID=p_C_Invoice_ID;
-- What Amount is the Discount Base?
IF (v_IsDiscountLineAmt = 'Y') THEN
v_Amount := v_TotalLines;
ELSE
v_Amount := v_GrandTotal;
END IF;
-- Anything to discount?
IF (v_Amount = 0) THEN
RETURN 0;
END IF;
IF (p_PayDate IS NOT NULL) THEN
v_PayDate := p_PayDate;
END IF;
-- Valid Payment Schedule
IF (v_IsPayScheduleValid='Y' AND p_C_InvoicePaySchedule_ID > 0) THEN
SELECT COALESCE(MAX(DiscountAmt),0)
INTO v_Amount
FROM C_InvoicePaySchedule
WHERE C_InvoicePaySchedule_ID=p_C_InvoicePaySchedule_ID
AND DiscountDate <= v_PayDate;
--
RETURN v_Amount;
END IF;
-- return discount amount
RETURN paymentTermDiscount (v_Amount, v_C_Currency_ID, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
-- Most likely if invoice not found
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END invoiceDiscount;
/
SELECT register_migration_script('201405301104_IDEMPIERE-1856.sql') FROM dual
;

View File

@ -0,0 +1,4 @@
-- just for postgresql
SELECT register_migration_script('201405301149_IDEMPIERE-1953.sql') FROM dual
;

View File

@ -0,0 +1,273 @@
-- May 26, 2014 10:31:26 PM ICT
-- IDEMPIERE-1334 Run one or more processes from Info Window
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Processing,DatabaseViewDrop,AD_Client_ID,Created) VALUES ('N','N','N','4',0,385,200129,'N','N','Y','D','L','399fcb47-f46c-4789-9e45-962cc5379c16','Y','Y','AD_InfoProcess','define process for info window','Info Process','Y',0,100,TO_TIMESTAMP('2014-05-26 22:31:25','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,TO_TIMESTAMP('2014-05-26 22:31:25','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:27 PM ICT
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID,Created) VALUES ('N',200000,'Y',1000000,'N','Y',200176,'Table AD_InfoProcess','AD_InfoProcess',1,'48700d65-3ba4-4888-8242-6af9a613206a',0,100,TO_TIMESTAMP('2014-05-26 22:31:26','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0,TO_TIMESTAMP('2014-05-26 22:31:26','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:28 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_InfoProcess_ID',202712,'Info Process','Info Process','ebfa3db8-e6b2-43aa-9eaa-e3dc1b2eb7f1',0,100,100,'Y',0,'D',TO_TIMESTAMP('2014-05-26 22:31:27','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-05-26 22:31:27','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:28 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211241,'Y','N','N','N',10,'N','Y','N','Y','e3154b48-b2ac-4ad2-ba43-92744e8c6a4c','N','AD_InfoProcess_ID','Info Process','N',TO_TIMESTAMP('2014-05-26 22:31:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202712,13,200129)
;
-- May 26, 2014 10:31:28 PM ICT
CREATE TABLE AD_InfoProcess (AD_InfoProcess_ID NUMERIC(10) NOT NULL, CONSTRAINT AD_InfoProcess_Key PRIMARY KEY (AD_InfoProcess_ID))
;
-- May 26, 2014 10:31:29 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_InfoProcess_UU',202713,'AD_InfoProcess_UU','AD_InfoProcess_UU','dde8ccd5-449b-4b9b-84a2-720e77eff87b',0,100,100,'Y',0,'D',TO_TIMESTAMP('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:30 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211242,'Y','N','N','N',36,'N','N','N','Y','8f961362-5939-48a4-8c8d-8d8b5d86a83e','N','AD_InfoProcess_UU','AD_InfoProcess_UU','N',TO_TIMESTAMP('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202713,10,200129)
;
-- May 26, 2014 10:31:30 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN AD_InfoProcess_UU VARCHAR(36) NOT NULL
;
-- May 26, 2014 10:31:30 PM ICT
ALTER TABLE AD_InfoProcess ADD CONSTRAINT AD_InfoProcess_UU_idx UNIQUE (AD_InfoProcess_UU)
;
-- May 26, 2014 10:31:31 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211243,'Y','N','N','N',10,'N','N','N','Y','e8fa9743-e852-4fb3-a8ba-aba7190f5d26','N','AD_Client_ID','Client/Tenant for this installation.','@#AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_TIMESTAMP('2014-05-26 22:31:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADClient_ADInfoProcess','N',102,19,200129,129)
;
-- May 26, 2014 10:31:31 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:31 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211244,'Y','N','N','N',10,'N','N','N','Y','48046a19-4d3c-40e6-93f2-49858061c1ff','N','AD_Org_ID','Organizational entity within client','@#AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_TIMESTAMP('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADOrg_ADInfoProcess','N',113,19,200129,104)
;
-- May 26, 2014 10:31:31 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:32 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211245,'Y','N','N','N',1,'N','N','N','Y','0d5a6a7a-b436-4958-814a-18ecafbc8971','Y','IsActive','The record is active in the system','Y','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.','Active','N',TO_TIMESTAMP('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',348,20,200129)
;
-- May 26, 2014 10:31:32 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- May 26, 2014 10:31:33 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211246,'Y','N','N','N',29,'N','N','N','Y','a8315f0c-3cbd-4092-bcc7-8e1f0bc4021c','N','Created','Date this record was created','SYSDATE','The Created field indicates the date that this record was created.','Created','N',TO_TIMESTAMP('2014-05-26 22:31:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',245,16,200129)
;
-- May 26, 2014 10:31:33 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL
;
-- May 26, 2014 10:31:34 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211247,'Y','N','N','N',10,'N','N','N','Y','f2e43604-537c-46a7-a08a-425589a290de','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_TIMESTAMP('2014-05-26 22:31:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',246,18,110,200129)
;
-- May 26, 2014 10:31:34 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN CreatedBy NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:35 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211248,'Y','N','N','N',29,'N','N','N','Y','87143907-1038-4c5d-90f6-3114a6fc7edf','N','Updated','Date this record was updated','SYSDATE','The Updated field indicates the date that this record was updated.','Updated','N',TO_TIMESTAMP('2014-05-26 22:31:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',607,16,200129)
;
-- May 26, 2014 10:31:35 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL
;
-- May 26, 2014 10:31:35 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211249,'Y','N','N','N',10,'N','N','N','Y','197f9f68-6340-45a8-9d75-9d027f8bcc75','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_TIMESTAMP('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',608,18,110,200129)
;
-- May 26, 2014 10:31:35 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:36 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211250,'Y','N','Y','N',60,'Y','N','N','Y','cba0a7f1-a35e-4410-b53d-b47a0a81b8d5','Y','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.','Name','Y',TO_TIMESTAMP('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',469,10,200129)
;
-- May 26, 2014 10:31:36 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN Name VARCHAR(60) NOT NULL
;
-- May 26, 2014 10:31:37 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211251,'N','N','N','N',255,'Y','N','N','Y','da7faea4-1447-4912-975d-9916325f892c','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_TIMESTAMP('2014-05-26 22:31:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',275,10,200129)
;
-- May 26, 2014 10:31:37 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN Description VARCHAR(255) DEFAULT NULL
;
-- May 26, 2014 10:31:38 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211252,'N','N','N','N',120,'N','N','N','Y','54fdf7c3-564a-48ea-af3c-314efca2f0ed','Y','ImageURL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.','Image URL','Y',TO_TIMESTAMP('2014-05-26 22:31:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',1720,10,200129)
;
-- May 26, 2014 10:31:38 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN ImageURL VARCHAR(120) DEFAULT NULL
;
-- May 26, 2014 10:31:38 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211253,'Y','N','N','N',10,'N','N','N','Y','b9449134-fe06-4a9a-b1a6-54077974de21','Y','SeqNo','Method of ordering records; lowest number comes first','@SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_InfoProcess WHERE AD_InfoWindow_ID=@AD_InfoWindow_ID@','The Sequence indicates the order of records','Sequence','N',TO_TIMESTAMP('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',566,11,200129)
;
-- May 26, 2014 10:31:38 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN SeqNo NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:39 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211254,'Y','N','N','N',10,'N','N','N','Y','be4dc8ea-58bf-4238-bff2-71099c2f36f9','Y','AD_Process_ID','Process or Report','The Process field identifies a unique Process or Report in the system.','Process','Y',TO_TIMESTAMP('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:38','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADProcess_ADInfoProcess','N',117,19,200129)
;
-- May 26, 2014 10:31:39 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN AD_Process_ID NUMERIC(10) NOT NULL
;
-- May 26, 2014 10:31:40 PM ICT
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211255,'N','N','N','Y',10,'N','N','N','Y','d9a775c3-dd5c-4e91-8416-60b78c33eb4e','N','AD_InfoWindow_ID','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.','Info Window','Y',TO_TIMESTAMP('2014-05-26 22:31:39','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:39','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','ADInfoWindow_ADInfoProcess','C',3068,19,200129)
;
-- May 26, 2014 10:31:40 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN AD_InfoWindow_ID NUMERIC(10) DEFAULT NULL
;
-- May 26, 2014 10:31:41 PM ICT
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (0,'Y',0,211256,'N','N','N',0,'N',2000,'N','N','N','Y','54387a92-4caa-4ab2-a765-51cf779a537c','Y','Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.','Comment/Help','Y',TO_TIMESTAMP('2014-05-26 22:31:40','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:40','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',326,14,200129)
;
-- May 26, 2014 10:31:41 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN Help VARCHAR(2000) DEFAULT NULL
;
-- May 26, 2014 10:31:41 PM ICT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,Name,Description,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('LayoutType',202714,'Process info can display as button, list, menu','LayoutType','Layout type of info process','Layout Type','913eafda-0cdc-4c44-85f8-487d77a3787c',0,100,100,'Y',0,'D',TO_TIMESTAMP('2014-05-26 22:31:41','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-05-26 22:31:41','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:42 PM ICT
INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,Description,ValidationType,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (200083,'AD_InfoProcess LayoutType','D','2171ebd2-e11a-4612-9885-128f155d65e8','N','Define layout type of info process button','L',0,100,TO_TIMESTAMP('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),'Y',TO_TIMESTAMP('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- May 26, 2014 10:31:43 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200185,200083,'Display as button','Button','6884dcd1-bc9a-4d16-9b2c-fe40968747f8','B',TO_TIMESTAMP('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2014-05-26 22:31:42','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:44 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200186,200083,'Display as menu on a gear button','Menu','7b539591-296a-43ee-916c-c87c35acc84d','M',TO_TIMESTAMP('2014-05-26 22:31:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2014-05-26 22:31:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:44 PM ICT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,Description,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,EntityType,AD_Client_ID,AD_Org_ID) VALUES (200187,200083,'Display as list','List','ff0cba3e-e82c-4aa8-9f9b-bedf681b822d','L',TO_TIMESTAMP('2014-05-26 22:31:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2014-05-26 22:31:44','YYYY-MM-DD HH24:MI:SS'),100,'Y','D',0,0)
;
-- May 26, 2014 10:31:45 PM ICT
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES (0,'Y',0,211257,'N','N','N',0,'N',1,'N','N','N','Y','a0e8f5b5-ac5f-44ba-a2c9-060dd3231c4e','Y','LayoutType','Layout type of info process','Process info can display as button, list, menu','LayoutType','Y',TO_TIMESTAMP('2014-05-26 22:31:45','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-26 22:31:45','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202714,17,200083,200129)
;
-- May 26, 2014 10:31:45 PM ICT
ALTER TABLE AD_InfoProcess ADD COLUMN LayoutType VARCHAR(1) DEFAULT NULL
;
-- 28/05/2014 01:24:40 PM COT
UPDATE AD_Column SET IsMandatory='Y', DefaultValue='B',Updated=TO_TIMESTAMP('2014-05-28 13:24:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=211257
;
-- 28/05/2014 01:24:44 PM COT
INSERT INTO t_alter_column values('ad_infoprocess','LayoutType','VARCHAR(10)',null,'B')
;
-- 28/05/2014 01:24:44 PM COT
INSERT INTO t_alter_column values('ad_infoprocess','LayoutType',null,'NOT NULL',null)
;
-- May 26, 2014 10:31:48 PM ICT
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Table_ID,AD_Client_ID,TreeDisplayedOn) VALUES ('N','N','Y',385,60,'N','N','N','N','N','Y','N',1,'2a39f93a-2062-404a-8e28-19fc45982162','D','Process',200142,0,TO_TIMESTAMP('2014-05-26 22:31:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2014-05-26 22:31:47','YYYY-MM-DD HH24:MI:SS'),100,'Y',200129,0,'B')
;
-- May 26, 2014 10:31:49 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,36,'N','N',0,'Y',203026,'N','AD_InfoProcess_UU','87361dd1-cfc0-412d-a344-e5f602650e32','N','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:48','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211242,'D',TO_TIMESTAMP('2014-05-26 22:31:48','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:49 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',0,'Y',203027,'N','Info Process','8020c77c-816a-4be9-a38c-747aed3afcf2','N','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211241,'D',TO_TIMESTAMP('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:50 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',10,'Y',203028,'Y','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client/Tenant for this installation.','Client','a6fccb4a-2521-4369-a1bb-06602ae9c840','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211243,'D',TO_TIMESTAMP('2014-05-26 22:31:49','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:51 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',20,'Y',203029,'Y','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organizational entity within client','Organization','60f9d173-cefb-417c-8080-8bb16aebff7e','Y','N','Y',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:50','YYYY-MM-DD HH24:MI:SS'),'Y','N',4,'N',0,2,1,'N','N',211244,'D',TO_TIMESTAMP('2014-05-26 22:31:50','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:51 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',30,'Y',203030,'Y','The Info window is used to search and select records as well as display information relevant to the selection.','Info and search/select Window','Info Window','ecc17f1a-a61e-4449-a35b-9915088cad60','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,1,'N',0,2,1,'N','N',211255,'D',TO_TIMESTAMP('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:52 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,120,'N','N',40,'Y',203031,'N','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.','URL of image','Image URL','8a9c636e-677b-464c-a942-3e0e8f5ad3a4','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,4,'N',0,2,1,'N','N',211252,'D',TO_TIMESTAMP('2014-05-26 22:31:51','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:53 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,60,'N','N',50,'Y',203032,'N','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.','Alphanumeric identifier of the entity','Name','af4c42ad-5b90-474a-80f4-41341a08d3cf','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,5,1,'N','N',211250,'D',TO_TIMESTAMP('2014-05-26 22:31:52','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:53 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,255,'N','N',60,'Y',203033,'N','A description is limited to 255 characters.','Optional short description of the record','Description','cc49a78e-2927-484e-990e-8c303be44b4c','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,5,1,'N','N',211251,'D',TO_TIMESTAMP('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:54 PM ICT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',200142,0,'N','N',70,'Y',203034,'N','The Help field contains a hint, comment or help about the use of this item.','Comment or Hint','Comment/Help','4b9118d1-4cc9-47fe-beee-b24e4d1263cb','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80,1,'N',0,5,3,'N','N',211256,'D',TO_TIMESTAMP('2014-05-26 22:31:53','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:55 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',80,'Y',203035,'N','The Process field identifies a unique Process or Report in the system.','Process or Report','Process','2f7cb5e4-1af9-4912-b9dd-bbc8ccbae537','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:54','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,1,'N',0,2,1,'N','N',211254,'D',TO_TIMESTAMP('2014-05-26 22:31:54','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:55 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,10,'N','N',90,'Y',203036,'N','The Sequence indicates the order of records','Method of ordering records; lowest number comes first','Sequence','c5ee4976-735e-40f8-8cd4-4bacc36adcdf','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,4,'N',0,2,1,'N','N',211253,'D',TO_TIMESTAMP('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:56 PM ICT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',200142,0,'N','N',100,'Y',203037,'N','Process info can display as button, list, menu','Layout type of info process','LayoutType','106b208d-b39b-4ab0-b839-7d0c95951bea','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'),'Y','Y',90,1,'N',0,2,1,'N','N',211257,'D',TO_TIMESTAMP('2014-05-26 22:31:55','YYYY-MM-DD HH24:MI:SS'))
;
-- May 26, 2014 10:31:57 PM ICT
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200142,1,'N','N',110,'Y',203038,'N','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.','The record is active in the system','Active','e45bfa22-f210-4a87-9b0c-b3ab2da35161','Y','N',100,0,100,TO_TIMESTAMP('2014-05-26 22:31:56','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,5,'N',0,2,1,'N','N',211245,'D',TO_TIMESTAMP('2014-05-26 22:31:56','YYYY-MM-DD HH24:MI:SS'))
;
-- migrate for anyone use red1 process in info panel start
INSERT INTO AD_InfoProcess
(ad_infoprocess_id, ad_infowindow_id, ad_client_id, ad_org_id, isactive,createdby, updatedby, seqno, name, ad_process_id, description, help, ad_infoprocess_uu)
(SELECT nextidfunc(200176,'N'), ad_infowindow_id, iw.ad_client_id, iw.ad_org_id, 'Y', 100, 100, 10, pr.name, iw.ad_process_id, pr.description, pr.help, generate_uuid()
FROM ad_infowindow iw INNER JOIN ad_process pr ON pr.ad_process_ID = iw.ad_process_ID
WHERE iw.ad_process_ID IS NOT NULL
);
-- May 23, 2014 4:01:30 PM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=202596
;
-- May 23, 2014 4:01:30 PM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=202596
;
-- May 23, 2014 4:01:51 PM ICT
UPDATE AD_Column SET IsActive='N' WHERE AD_Column_ID=210944
;
SELECT register_migration_script('201405261604_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,63 @@
-- May 29, 2014 6:19:41 AM ICT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203032
;
-- May 29, 2014 6:19:41 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203032
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203033
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203033
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=203034
;
-- May 29, 2014 6:19:52 AM ICT
DELETE FROM AD_Field WHERE AD_Field_ID=203034
;
-- May 29, 2014 6:20:37 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211251
;
-- May 29, 2014 6:20:37 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211251
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211256
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211256
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column_Trl WHERE AD_Column_ID=211250
;
-- May 29, 2014 6:20:38 AM ICT
DELETE FROM AD_Column WHERE AD_Column_ID=211250
;
ALTER TABLE ad_infoprocess DROP COLUMN name
;
ALTER TABLE ad_infoprocess DROP COLUMN description
;
ALTER TABLE ad_infoprocess DROP COLUMN help
;
-- May 29, 2014 6:21:41 AM ICT
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('M','Process Menu',200275,'D','c7cb8357-7a1f-46ab-9957-cda58431adfd','ProcessMenu','Y',TO_TIMESTAMP('2014-05-29 06:21:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2014-05-29 06:21:35','YYYY-MM-DD HH24:MI:SS'))
;
SELECT register_migration_script('201405291604_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,32 @@
-- May 29, 2014 6:00:45 PM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2014-05-29 18:00:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=211254
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203030
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=203036
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=203035
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=203037
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=203038
;
-- May 29, 2014 6:02:16 PM COT
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203031
;
SELECT register_migration_script('201405291802_IDEMPIERE-1334.sql') FROM dual
;

View File

@ -0,0 +1,86 @@
CREATE OR REPLACE FUNCTION invoiceDiscount
(
p_C_Invoice_ID NUMERIC,
p_paydate timestamp with time zone,
p_C_InvoicePaySchedule_ID NUMERIC
)
RETURNS numeric AS $body$
/*************************************************************************
* 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.
*
* converted to postgreSQL by Karsten Thiemann (Schaeffer AG),
* kthiemann@adempiere.org
*************************************************************************
***
* Title: Calculate Payment Discount Amount
* Description:
* - Calculate discountable amount (i.e. with or without tax)
* - Calculate and return payment discount
* Test:
* select invoiceDiscount(109, now(), 103) from ad_system; => 0
************************************************************************/
DECLARE
v_Amount NUMERIC;
v_IsDiscountLineAmt CHAR(1);
v_GrandTotal NUMERIC;
v_TotalLines NUMERIC;
v_C_PaymentTerm_ID NUMERIC(10);
v_C_Currency_ID NUMERIC(10);
v_DocDate timestamp with time zone;
v_PayDate timestamp with time zone := now();
v_IsPayScheduleValid CHAR(1);
BEGIN
SELECT ci.IsDiscountLineAmt, i.GrandTotal, i.TotalLines,
i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid, C_Currency_ID
INTO v_IsDiscountLineAmt, v_GrandTotal, v_TotalLines,
v_C_PaymentTerm_ID, v_DocDate, v_IsPayScheduleValid, v_C_Currency_ID
FROM AD_ClientInfo ci, C_Invoice i
WHERE ci.AD_Client_ID=i.AD_Client_ID
AND i.C_Invoice_ID=p_C_Invoice_ID;
-- What Amount is the Discount Base?
IF (v_IsDiscountLineAmt = 'Y') THEN
v_Amount := v_TotalLines;
ELSE
v_Amount := v_GrandTotal;
END IF;
-- Anything to discount?
IF (v_Amount = 0) THEN
RETURN 0;
END IF;
IF (p_PayDate IS NOT NULL) THEN
v_PayDate := p_PayDate;
END IF;
-- Valid Payment Schedule
IF (v_IsPayScheduleValid='Y' AND p_C_InvoicePaySchedule_ID > 0) THEN
SELECT COALESCE(MAX(DiscountAmt),0)
INTO v_Amount
FROM C_InvoicePaySchedule
WHERE C_InvoicePaySchedule_ID=p_C_InvoicePaySchedule_ID
AND DiscountDate <= v_PayDate;
--
RETURN v_Amount;
END IF;
-- return discount amount
RETURN paymentTermDiscount (v_Amount, v_C_Currency_ID, v_C_PaymentTerm_ID, v_DocDate, p_PayDate);
-- Most likely if invoice not found
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END;
$body$ LANGUAGE plpgsql;
SELECT register_migration_script('201405301104_IDEMPIERE-1856.sql') FROM dual
;

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ public class ProductionCreate extends SvrProcess {
{
costPercentageDiff = Env.ZERO;
String msg = "Could not retrieve costs";
if (MSysConfig.getBooleanValue("MFG_ValidateCostsOnCreate", false, getAD_Client_ID())) {
if (MSysConfig.getBooleanValue(MSysConfig.MFG_ValidateCostsOnCreate, false, getAD_Client_ID())) {
throw new AdempiereUserError(msg);
} else {
log.warning(msg);
@ -141,7 +141,7 @@ public class ProductionCreate extends SvrProcess {
if (!costsOK(M_Product_ID)) {
String msg = "Excessive difference in standard costs";
if (MSysConfig.getBooleanValue("MFG_ValidateCostsDifferenceOnCreate", false, getAD_Client_ID())) {
if (MSysConfig.getBooleanValue(MSysConfig.MFG_ValidateCostsDifferenceOnCreate, false, getAD_Client_ID())) {
throw new AdempiereUserError("Excessive difference in standard costs");
} else {
log.warning(msg);

View File

@ -0,0 +1,55 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. 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., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.X_AD_InfoProcess;
/**
* Contain info of process in info window
* include process_id, image name, name
* @author hieplq
*
*/
public class MInfoProcess extends X_AD_InfoProcess {
/**
*
*/
private static final long serialVersionUID = 4978433930748011554L;
/**
* {@inheritDoc}
* @param ctx
* @param AD_InfoProcess_ID
* @param trxName
*/
public MInfoProcess(Properties ctx, int AD_InfoProcess_ID, String trxName) {
super(ctx, AD_InfoProcess_ID, trxName);
}
/**
* {@inheritDoc}
* @param ctx
* @param rs
* @param trxName
*/
public MInfoProcess(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
}

View File

@ -0,0 +1,198 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. 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., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_InfoProcess
* @author iDempiere (generated)
* @version Release 2.0
*/
public interface I_AD_InfoProcess
{
/** TableName=AD_InfoProcess */
public static final String Table_Name = "AD_InfoProcess";
/** AD_Table_ID=200129 */
public static final int Table_ID = 200129;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 4 - System
*/
BigDecimal accessLevel = BigDecimal.valueOf(4);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_InfoProcess_ID */
public static final String COLUMNNAME_AD_InfoProcess_ID = "AD_InfoProcess_ID";
/** Set Info Process */
public void setAD_InfoProcess_ID (int AD_InfoProcess_ID);
/** Get Info Process */
public int getAD_InfoProcess_ID();
/** Column name AD_InfoProcess_UU */
public static final String COLUMNNAME_AD_InfoProcess_UU = "AD_InfoProcess_UU";
/** Set AD_InfoProcess_UU */
public void setAD_InfoProcess_UU (String AD_InfoProcess_UU);
/** Get AD_InfoProcess_UU */
public String getAD_InfoProcess_UU();
/** Column name AD_InfoWindow_ID */
public static final String COLUMNNAME_AD_InfoWindow_ID = "AD_InfoWindow_ID";
/** Set Info Window.
* Info and search/select Window
*/
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID);
/** Get Info Window.
* Info and search/select Window
*/
public int getAD_InfoWindow_ID();
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException;
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name AD_Process_ID */
public static final String COLUMNNAME_AD_Process_ID = "AD_Process_ID";
/** Set Process.
* Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID);
/** Get Process.
* Process or Report
*/
public int getAD_Process_ID();
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name ImageURL */
public static final String COLUMNNAME_ImageURL = "ImageURL";
/** Set Image URL.
* URL of image
*/
public void setImageURL (String ImageURL);
/** Get Image URL.
* URL of image
*/
public String getImageURL();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name LayoutType */
public static final String COLUMNNAME_LayoutType = "LayoutType";
/** Set LayoutType.
* Layout type of info process
*/
public void setLayoutType (String LayoutType);
/** Get LayoutType.
* Layout type of info process
*/
public String getLayoutType();
/** Column name SeqNo */
public static final String COLUMNNAME_SeqNo = "SeqNo";
/** Set Sequence.
* Method of ordering records;
lowest number comes first
*/
public void setSeqNo (int SeqNo);
/** Get Sequence.
* Method of ordering records;
lowest number comes first
*/
public int getSeqNo();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -95,21 +95,6 @@ public interface I_AD_InfoWindow
*/
public int getAD_Org_ID();
/** Column name AD_Process_ID */
public static final String COLUMNNAME_AD_Process_ID = "AD_Process_ID";
/** Set Process.
* Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID);
/** Get Process.
* Process or Report
*/
public int getAD_Process_ID();
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException;
/** Column name AD_Table_ID */
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";

View File

@ -35,7 +35,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
/**
*
*/
private static final long serialVersionUID = 1062151267747257338L;
private static final long serialVersionUID = -8412652367051443276L;
/**
* Get Locations for BPartner
@ -227,7 +227,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
public String getBPLocName(MLocation address) {
m_uniqueName = getName();
m_unique = MSysConfig.getIntValue("START_VALUE_BPLOCATION_NAME", 0,
m_unique = MSysConfig.getIntValue(MSysConfig.START_VALUE_BPLOCATION_NAME, 0,
getAD_Client_ID(), getAD_Org_ID());
if (m_unique < 0 || m_unique > 4)
m_unique = 0;

View File

@ -17,9 +17,6 @@
*****************************************************************************/
package org.compiere.model;
import static org.compiere.model.MSysConfig.CLIENT_ACCOUNTING;
import static org.compiere.model.MSysConfig.MAIL_SEND_CREDENTIALS;
import java.io.File;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -59,7 +56,7 @@ public class MClient extends X_AD_Client
/**
*
*/
private static final long serialVersionUID = 3043792947325698506L;
private static final long serialVersionUID = -4479164806149932775L;
/**
* Get client
@ -922,21 +919,21 @@ public class MClient extends X_AD_Client
private static final String CLIENT_ACCOUNTING_IMMEDIATE = "I";
public static boolean isClientAccounting() {
String ca = MSysConfig.getValue(CLIENT_ACCOUNTING,
String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING,
CLIENT_ACCOUNTING_QUEUE, // default
Env.getAD_Client_ID(Env.getCtx()));
return (ca.equalsIgnoreCase(CLIENT_ACCOUNTING_IMMEDIATE) || ca.equalsIgnoreCase(CLIENT_ACCOUNTING_QUEUE));
}
public static boolean isClientAccountingQueue() {
String ca = MSysConfig.getValue(CLIENT_ACCOUNTING,
String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING,
CLIENT_ACCOUNTING_QUEUE, // default
Env.getAD_Client_ID(Env.getCtx()));
return ca.equalsIgnoreCase(CLIENT_ACCOUNTING_QUEUE);
}
public static boolean isClientAccountingImmediate() {
String ca = MSysConfig.getValue(CLIENT_ACCOUNTING,
String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING,
CLIENT_ACCOUNTING_QUEUE, // default
Env.getAD_Client_ID(Env.getCtx()));
return ca.equalsIgnoreCase(CLIENT_ACCOUNTING_IMMEDIATE);
@ -1086,14 +1083,14 @@ public class MClient extends X_AD_Client
private static final String MAIL_SEND_CREDENTIALS_SYSTEM = "S";
public static boolean isSendCredentialsClient() {
String msc = MSysConfig.getValue(MAIL_SEND_CREDENTIALS,
String msc = MSysConfig.getValue(MSysConfig.MAIL_SEND_CREDENTIALS,
MAIL_SEND_CREDENTIALS_USER, // default
Env.getAD_Client_ID(Env.getCtx()));
return (MAIL_SEND_CREDENTIALS_CLIENT.equalsIgnoreCase(msc));
}
public static boolean isSendCredentialsSystem() {
String msc = MSysConfig.getValue(MAIL_SEND_CREDENTIALS,
String msc = MSysConfig.getValue(MSysConfig.MAIL_SEND_CREDENTIALS,
MAIL_SEND_CREDENTIALS_USER, // default
Env.getAD_Client_ID(Env.getCtx()));
return (MAIL_SEND_CREDENTIALS_SYSTEM.equalsIgnoreCase(msc));

View File

@ -19,10 +19,12 @@ package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.model.MInfoProcess;
import org.adempiere.model.MInfoRelated;
import org.compiere.model.AccessSqlParser.TableInfo;
import org.compiere.util.DB;
@ -40,7 +42,7 @@ public class MInfoWindow extends X_AD_InfoWindow
/**
*
*/
private static final long serialVersionUID = -4228782755777501270L;
private static final long serialVersionUID = -3099366897275960300L;
/**
* Standard Constructor
@ -110,6 +112,12 @@ public class MInfoWindow extends X_AD_InfoWindow
*/
private MInfoRelated[] m_infoRelated;
/**
* IDEMPIERE-1334
* cache list process button info
*/
private MInfoProcess[] m_infoProcess;
public MInfoRelated[] getInfoRelated(boolean requery) {
if ((this.m_infoRelated != null) && (!requery)) {
set_TrxName(this.m_infoRelated, get_TrxName());
@ -127,6 +135,49 @@ public class MInfoWindow extends X_AD_InfoWindow
return m_infoRelated;
}
/**
* IDEMPIERE-1334
* Get list {@link MInfoProcess} of this infoWindow
* @param requery true get from db, false try get from cache
* @return empty array when not exists Info Process
*/
public MInfoProcess [] getInfoProcess(boolean requery) {
// try from cache
if ((this.m_infoProcess != null) && (!requery)) {
set_TrxName(this.m_infoProcess, get_TrxName());
return this.m_infoProcess;
}
// get list info process from db, order by seqNo
List<MInfoProcess> list = new Query(getCtx(), MInfoProcess.Table_Name, "AD_InfoWindow_ID=?", get_TrxName())
.setParameters(getAD_InfoWindow_ID())
.setOnlyActiveRecords(true)
.setOrderBy("SeqNo")
.list();
checkProcessRight(list);
m_infoProcess = list.toArray(new MInfoProcess[list.size()]);
return m_infoProcess;
}
/**
* if user haven't right to run a process, set infoProcess to null
* @param lsInfoProcess
*/
protected void checkProcessRight (List<MInfoProcess> lsInfoProcess) {
Iterator<MInfoProcess> iterator = lsInfoProcess.iterator();
while (iterator.hasNext()){
MInfoProcess testInfoProcess = iterator.next();
// need more review
if (MRole.getDefault().getProcessAccess(testInfoProcess.getAD_Process_ID()) == null){
iterator.remove();
}
}
}
public MInfoColumn[] getInfoColumns(TableInfo[] tableInfos) {
Query query = new Query(getCtx(), MTable.get(getCtx(), I_AD_InfoColumn.Table_ID), I_AD_InfoColumn.COLUMNNAME_AD_InfoWindow_ID+"=?", get_TrxName());
List<MInfoColumn> list = query.setParameters(getAD_InfoWindow_ID())

View File

@ -49,12 +49,12 @@ import org.osgi.service.event.Event;
*/
public class MPInstance extends X_AD_PInstance
{
/**
/**
*
*/
private static final long serialVersionUID = -4047766735041088419L;
public static final String ON_RUNNING_JOB_CHANGED_TOPIC = "onRunningJobChanged";
private static final long serialVersionUID = 558778359873793799L;
public static final String ON_RUNNING_JOB_CHANGED_TOPIC = "onRunningJobChanged";
private static CLogger s_log = CLogger.getCLogger (MPInstance.class);
@ -395,7 +395,7 @@ public class MPInstance extends X_AD_PInstance
}
// unnamed instances
int lastRunCount = MSysConfig.getIntValue("LASTRUN_RECORD_COUNT", 5, Env.getAD_Client_ID(ctx));
int lastRunCount = MSysConfig.getIntValue(MSysConfig.LASTRUN_RECORD_COUNT, 5, Env.getAD_Client_ID(ctx));
if (lastRunCount > 0) {
// using JDBC instead of Query for performance reasons, AD_PInstance can be huge
String sql = "SELECT * FROM AD_PInstance "

View File

@ -80,12 +80,10 @@ import org.compiere.util.ValueNamePair;
public class MPayment extends X_C_Payment
implements DocAction, ProcessCall, PaymentInterface
{
/**
*
*/
private static final long serialVersionUID = 6200327948230438741L;
/**
*
*/
private static final long serialVersionUID = -3426445843281140181L;
/**
* Get Payments Of BPartner
@ -1625,7 +1623,7 @@ public class MPayment extends X_C_Payment
sumPaymentAllocates = sumPaymentAllocates.add(pAlloc.getAmount());
if (getPayAmt().compareTo(sumPaymentAllocates) != 0) {
if (isReceipt() && getPayAmt().compareTo(sumPaymentAllocates) < 0) {
if (MSysConfig.getBooleanValue("ALLOW_OVER_APPLIED_PAYMENT", false, Env.getAD_Client_ID(Env.getCtx()))) {
if (MSysConfig.getBooleanValue(MSysConfig.ALLOW_OVER_APPLIED_PAYMENT, false, Env.getAD_Client_ID(Env.getCtx()))) {
return true;
}
}

View File

@ -26,7 +26,7 @@ public class MProduction extends X_M_Production implements DocAction {
/**
*
*/
private static final long serialVersionUID = -9055468125493188165L;
private static final long serialVersionUID = 2222265936552140706L;
/**
*
@ -454,7 +454,7 @@ public class MProduction extends X_M_Production implements DocAction {
if (!costsOK(M_Product_ID)) {
msg = "Excessive difference in standard costs";
if (MSysConfig.getBooleanValue("MFG_ValidateCostsDifferenceOnCreate", false, getAD_Client_ID())) {
if (MSysConfig.getBooleanValue(MSysConfig.MFG_ValidateCostsDifferenceOnCreate, false, getAD_Client_ID())) {
return msg;
} else {
log.warning(msg);
@ -503,7 +503,7 @@ public class MProduction extends X_M_Production implements DocAction {
{
costPercentageDiff = Env.ZERO;
String msg = "Could not retrieve costs";
if (MSysConfig.getBooleanValue("MFG_ValidateCostsOnCreate", false, getAD_Client_ID())) {
if (MSysConfig.getBooleanValue(MSysConfig.MFG_ValidateCostsOnCreate, false, getAD_Client_ID())) {
throw new AdempiereUserError(msg);
} else {
log.warning(msg);

View File

@ -42,94 +42,102 @@ public class MSysConfig extends X_AD_SysConfig
/**
*
*/
private static final long serialVersionUID = -2008818748067665365L;
private static final long serialVersionUID = 7850399904723862767L;
public final static String PDF_FONT_DIR = "PDF_FONT_DIR";
public final static String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS";
public static final String ZK_DESKTOP_CLASS = "ZK_DESKTOP_CLASS";
public static final String CASH_AS_PAYMENT = "CASH_AS_PAYMENT";
public static final String MAX_ACTIVITIES_IN_LIST = "MAX_ACTIVITIES_IN_LIST";
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
public static final String ZK_GRID_EDIT_MODELESS = "ZK_GRID_EDIT_MODELESS";
public static final String ZK_DASHBOARD_REFRESH_INTERVAL = "ZK_DASHBOARD_REFRESH_INTERVAL";
public static final String RecentItems_MaxShown = "RecentItems_MaxShown";
public static final String USE_EMAIL_FOR_LOGIN = "USE_EMAIL_FOR_LOGIN";
public static final String LOGIN_SHOW_RESETPASSWORD = "LOGIN_SHOW_RESETPASSWORD";
public static final String ALogin_ShowOneRole = "ALogin_ShowOneRole";
public static final String ZK_BROWSER_ICON = "ZK_BROWSER_ICON";
public static final String ZK_BROWSER_TITLE = "ZK_BROWSER_TITLE";
public static final String ZK_LOGO_LARGE = "ZK_LOGO_LARGE";
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";
public static final String WEBUI_LOGOURL = "WEBUI_LOGOURL";
public static final String LOCATION_MAX_CITY_ROWS = "LOCATION_MAX_CITY_ROWS";
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
public static final String ZK_REPORT_TABLE_OUTPUT_TYPE = "ZK_REPORT_TABLE_OUTPUT_TYPE";
public static final String MENU_INFOUPDATER_SLEEP_MS = "MENU_INFOUPDATER_SLEEP_MS";
public static final String SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION = "SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION";
public static final String SYSCONFIG_INFO_DEFAULTSELECTED = "SYSCONFIG_INFO_DEFAULTSELECTED";
public static final String DICTIONARY_ID_USE_CENTRALIZED_ID = "DICTIONARY_ID_USE_CENTRALIZED_ID";
public static final String PROJECT_ID_USE_CENTRALIZED_ID = "PROJECT_ID_USE_CENTRALIZED_ID";
public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE";
public static final String START_VALUE_BPLOCATION_NAME = "START_VALUE_BPLOCATION_NAME";
public static final String CLIENT_ACCOUNTING = "CLIENT_ACCOUNTING";
public static final String CHECK_CREDIT_ON_PREPAY_ORDER = "CHECK_CREDIT_ON_PREPAY_ORDER";
public static final String CHECK_CREDIT_ON_CASH_POS_ORDER = "CHECK_CREDIT_ON_CASH_POS_ORDER";
public static final String Invoice_ReverseUseNewNumber = "Invoice_ReverseUseNewNumber";
public static final String PROJECT_ID_COMMENTS = "PROJECT_ID_COMMENTS";
public static final String DICTIONARY_ID_COMMENTS = "DICTIONARY_ID_COMMENTS";
public static final String LOCATION_MAPS_URL_PREFIX = "LOCATION_MAPS_URL_PREFIX";
public static final String LOCATION_MAPS_ROUTE_PREFIX = "LOCATION_MAPS_ROUTE_PREFIX";
public static final String LOCATION_MAPS_SOURCE_ADDRESS = "LOCATION_MAPS_SOURCE_ADDRESS";
public static final String LOCATION_MAPS_DESTINATION_ADDRESS = "LOCATION_MAPS_DESTINATION_ADDRESS";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT";
public static final String RecentItems_MaxSaved = "RecentItems_MaxSaved";
public static final String DICTIONARY_ID_WEBSITE = "DICTIONARY_ID_WEBSITE";
public static final String DICTIONARY_ID_USER = "DICTIONARY_ID_USER";
public static final String DICTIONARY_ID_PASSWORD = "DICTIONARY_ID_PASSWORD";
public static final String PROJECT_ID_WEBSITE = "PROJECT_ID_WEBSITE";
public static final String PROJECT_ID_USER = "PROJECT_ID_USER";
public static final String PROJECT_ID_PASSWORD = "PROJECT_ID_PASSWORD";
public static final String PROJECT_ID_PROJECT = "PROJECT_ID_PROJECT";
public static final String ZK_LOGIN_ALLOW_REMEMBER_ME = "ZK_LOGIN_ALLOW_REMEMBER_ME";
public static final String SWING_LOGIN_ALLOW_REMEMBER_ME = "SWING_LOGIN_ALLOW_REMEMBER_ME";
public static final String USER_PASSWORD_HASH = "USER_PASSWORD_HASH";
public static final String USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES = "USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES";
public static final String USER_LOCKING_MAX_LOGIN_ATTEMPT = "USER_LOCKING_MAX_LOGIN_ATTEMPT";
public static final String USER_LOCKING_MAX_INACTIVE_PERIOD_DAY = "USER_LOCKING_MAX_INACTIVE_PERIOD_DAY";
public static final String USER_LOCKING_MAX_PASSWORD_AGE_DAY = "USER_LOCKING_MAX_PASSWORD_AGE_DAY";
public static final String CHANGE_PASSWORD_MUST_DIFFER = "CHANGE_PASSWORD_MUST_DIFFER";
public static final String ProductUOMConversionUOMValidate = "ProductUOMConversionUOMValidate";
public static final String ProductUOMConversionRateValidate = "ProductUOMConversionRateValidate";
public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG";
public static final String REPORT_SWAP_MAX_ROWS = "REPORT_SWAP_MAX_ROWS";
public static final String JASPER_SWAP_MAX_PAGES = "JASPER_SWAP_MAX_PAGES";
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
public static final String SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR = "SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR";
public static final String MAIL_SEND_BCC_TO_ADDRESS = "MAIL_SEND_BCC_TO_ADDRESS";
public static final String MAIL_SEND_BCC_TO_FROM = "MAIL_SEND_BCC_TO_FROM";
public static final String MAIL_SEND_CREDENTIALS = "MAIL_SEND_CREDENTIALS";
public static final String REAL_TIME_POS = "REAL_TIME_POS";
public static final String SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE = "SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE";
public static final String SHIPPING_SAVE_REQUEST_RESPONSE_LOG = "SHIPPING_SAVE_REQUEST_RESPONSE_LOG";
public static final String DOCACTIONBUTTON_SHOWACTIONNAME = "DOCACTIONBUTTON_SHOWACTIONNAME";
public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE";
public static final String CALENDAR_ALTERNATE_TIMEZONE = "CALENDAR_ALTERNATE_TIMEZONE";
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
public static final String TAX_SAVE_REQUEST_RESPONSE_LOG = "TAX_SAVE_REQUEST_RESPONSE_LOG";
public static final String ADDRESS_SAVE_REQUEST_RESPONSE_LOG = "ADDRESS_SAVE_REQUEST_RESPONSE_LOG";
public static final String VALIDATE_MATCHING_TO_ORDERED_QTY = "VALIDATE_MATCHING_TO_ORDERED_QTY";
public static final String BACKGROUND_JOB_ALLOWED = "BACKGROUND_JOB_ALLOWED";
public static final String BACKGROUND_JOB_BY_DEFAULT = "BACKGROUND_JOB_BY_DEFAULT";
public static final String BACKGROUND_JOB_MAX_IN_SYSTEM = "BACKGROUND_JOB_MAX_IN_SYSTEM";
public static final String BACKGROUND_JOB_MAX_PER_CLIENT = "BACKGROUND_JOB_MAX_PER_CLIENT";
public static final String BACKGROUND_JOB_MAX_PER_USER = "BACKGROUND_JOB_MAX_PER_USER";
public static final String DPVIEWS_SHOWINFOACCOUNT = "DPViews_ShowInfoAccount";
public static final String DPVIEWS_SHOWINFOSCHEDULE = "DPViews_ShowInfoSchedule";
public static final String ADDRESS_SAVE_REQUEST_RESPONSE_LOG = "ADDRESS_SAVE_REQUEST_RESPONSE_LOG";
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO";
public static final String ALLOW_OVER_APPLIED_PAYMENT = "ALLOW_OVER_APPLIED_PAYMENT";
public static final String ALogin_ShowOneRole = "ALogin_ShowOneRole";
public static final String BACKGROUND_JOB_ALLOWED = "BACKGROUND_JOB_ALLOWED";
public static final String BACKGROUND_JOB_BY_DEFAULT = "BACKGROUND_JOB_BY_DEFAULT";
public static final String BACKGROUND_JOB_MAX_IN_SYSTEM = "BACKGROUND_JOB_MAX_IN_SYSTEM";
public static final String BACKGROUND_JOB_MAX_PER_CLIENT = "BACKGROUND_JOB_MAX_PER_CLIENT";
public static final String BACKGROUND_JOB_MAX_PER_USER = "BACKGROUND_JOB_MAX_PER_USER";
public static final String CALENDAR_ALTERNATE_TIMEZONE = "CALENDAR_ALTERNATE_TIMEZONE";
public static final String CASH_AS_PAYMENT = "CASH_AS_PAYMENT";
public static final String CHANGE_PASSWORD_MUST_DIFFER = "CHANGE_PASSWORD_MUST_DIFFER";
public static final String CHECK_CREDIT_ON_CASH_POS_ORDER = "CHECK_CREDIT_ON_CASH_POS_ORDER";
public static final String CHECK_CREDIT_ON_PREPAY_ORDER = "CHECK_CREDIT_ON_PREPAY_ORDER";
public static final String CLIENT_ACCOUNTING = "CLIENT_ACCOUNTING";
public static final String DICTIONARY_ID_COMMENTS = "DICTIONARY_ID_COMMENTS";
public static final String DICTIONARY_ID_PASSWORD = "DICTIONARY_ID_PASSWORD";
public static final String DICTIONARY_ID_USE_CENTRALIZED_ID = "DICTIONARY_ID_USE_CENTRALIZED_ID";
public static final String DICTIONARY_ID_USER = "DICTIONARY_ID_USER";
public static final String DICTIONARY_ID_WEBSITE = "DICTIONARY_ID_WEBSITE";
public static final String DOCACTIONBUTTON_SHOWACTIONNAME = "DOCACTIONBUTTON_SHOWACTIONNAME";
public static final String DPVIEWS_SHOWINFOACCOUNT = "DPViews_ShowInfoAccount";
public static final String DPVIEWS_SHOWINFOSCHEDULE = "DPViews_ShowInfoSchedule";
public static final String Invoice_ReverseUseNewNumber = "Invoice_ReverseUseNewNumber";
public static final String JASPER_SWAP_MAX_PAGES = "JASPER_SWAP_MAX_PAGES";
public static final String LASTRUN_RECORD_COUNT = "LASTRUN_RECORD_COUNT";
public static final String LOCATION_MAPS_DESTINATION_ADDRESS = "LOCATION_MAPS_DESTINATION_ADDRESS";
public static final String LOCATION_MAPS_ROUTE_PREFIX = "LOCATION_MAPS_ROUTE_PREFIX";
public static final String LOCATION_MAPS_SOURCE_ADDRESS = "LOCATION_MAPS_SOURCE_ADDRESS";
public static final String LOCATION_MAPS_URL_PREFIX = "LOCATION_MAPS_URL_PREFIX";
public static final String LOCATION_MAX_CITY_ROWS = "LOCATION_MAX_CITY_ROWS";
public static final String LOGIN_HELP_URL = "LOGIN_HELP_URL";
public static final String LOGIN_SHOW_RESETPASSWORD = "LOGIN_SHOW_RESETPASSWORD";
public static final String MAIL_SEND_BCC_TO_ADDRESS = "MAIL_SEND_BCC_TO_ADDRESS";
public static final String MAIL_SEND_BCC_TO_FROM = "MAIL_SEND_BCC_TO_FROM";
public static final String MAIL_SEND_CREDENTIALS = "MAIL_SEND_CREDENTIALS";
public static final String MAX_ACTIVITIES_IN_LIST = "MAX_ACTIVITIES_IN_LIST";
public static final String MENU_INFOUPDATER_SLEEP_MS = "MENU_INFOUPDATER_SLEEP_MS";
public static final String MFG_ValidateCostsDifferenceOnCreate = "MFG_ValidateCostsDifferenceOnCreate";
public static final String MFG_ValidateCostsOnCreate = "MFG_ValidateCostsOnCreate";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT";
public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD";
public static final String PDF_FONT_DIR = "PDF_FONT_DIR";
public static final String ProductUOMConversionRateValidate = "ProductUOMConversionRateValidate";
public static final String ProductUOMConversionUOMValidate = "ProductUOMConversionUOMValidate";
public static final String PROJECT_ID_COMMENTS = "PROJECT_ID_COMMENTS";
public static final String PROJECT_ID_PASSWORD = "PROJECT_ID_PASSWORD";
public static final String PROJECT_ID_PROJECT = "PROJECT_ID_PROJECT";
public static final String PROJECT_ID_USE_CENTRALIZED_ID = "PROJECT_ID_USE_CENTRALIZED_ID";
public static final String PROJECT_ID_USER = "PROJECT_ID_USER";
public static final String PROJECT_ID_WEBSITE = "PROJECT_ID_WEBSITE";
public static final String REAL_TIME_POS = "REAL_TIME_POS";
public static final String RecentItems_MaxSaved = "RecentItems_MaxSaved";
public static final String RecentItems_MaxShown = "RecentItems_MaxShown";
public static final String REPORT_SWAP_MAX_ROWS = "REPORT_SWAP_MAX_ROWS";
public static final String SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE = "SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE";
public static final String SHIPPING_SAVE_REQUEST_RESPONSE_LOG = "SHIPPING_SAVE_REQUEST_RESPONSE_LOG";
public static final String START_VALUE_BPLOCATION_NAME = "START_VALUE_BPLOCATION_NAME";
public static final String SWING_LOGIN_ALLOW_REMEMBER_ME = "SWING_LOGIN_ALLOW_REMEMBER_ME";
public static final String SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR = "SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR";
public static final String SYSCONFIG_INFO_DEFAULTSELECTED = "SYSCONFIG_INFO_DEFAULTSELECTED";
public static final String SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION = "SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION";
public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE";
public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG";
public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE";
public static final String TAX_SAVE_REQUEST_RESPONSE_LOG = "TAX_SAVE_REQUEST_RESPONSE_LOG";
public static final String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS";
public static final String USE_EMAIL_FOR_LOGIN = "USE_EMAIL_FOR_LOGIN";
public static final String USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES = "USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES";
public static final String USER_LOCKING_MAX_INACTIVE_PERIOD_DAY = "USER_LOCKING_MAX_INACTIVE_PERIOD_DAY";
public static final String USER_LOCKING_MAX_LOGIN_ATTEMPT = "USER_LOCKING_MAX_LOGIN_ATTEMPT";
public static final String USER_LOCKING_MAX_PASSWORD_AGE_DAY = "USER_LOCKING_MAX_PASSWORD_AGE_DAY";
public static final String USER_PASSWORD_HASH = "USER_PASSWORD_HASH";
public static final String VALIDATE_MATCHING_TO_ORDERED_QTY = "VALIDATE_MATCHING_TO_ORDERED_QTY";
public static final String WEBUI_LOGOURL = "WEBUI_LOGOURL";
public static final String ZK_BROWSER_ICON = "ZK_BROWSER_ICON";
public static final String ZK_BROWSER_TITLE = "ZK_BROWSER_TITLE";
public static final String ZK_BUTTON_STYLE = "ZK_BUTTON_STYLE";
public static final String ZK_DASHBOARD_REFRESH_INTERVAL = "ZK_DASHBOARD_REFRESH_INTERVAL";
public static final String ZK_DESKTOP_CLASS = "ZK_DESKTOP_CLASS";
public static final String ZK_GRID_EDIT_MODELESS = "ZK_GRID_EDIT_MODELESS";
public static final String ZK_LOGIN_ALLOW_REMEMBER_ME = "ZK_LOGIN_ALLOW_REMEMBER_ME";
public static final String ZK_LOGO_LARGE = "ZK_LOGO_LARGE";
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";
public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE";
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
public static final String ZK_REPORT_TABLE_OUTPUT_TYPE = "ZK_REPORT_TABLE_OUTPUT_TYPE";
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
public static final String ZK_THEME = "ZK_THEME";
/**
* Standard Constructor

View File

@ -0,0 +1,239 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. 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., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for AD_InfoProcess
* @author iDempiere (generated)
* @version Release 2.0 - $Id$ */
public class X_AD_InfoProcess extends PO implements I_AD_InfoProcess, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20140529L;
/** Standard Constructor */
public X_AD_InfoProcess (Properties ctx, int AD_InfoProcess_ID, String trxName)
{
super (ctx, AD_InfoProcess_ID, trxName);
/** if (AD_InfoProcess_ID == 0)
{
setAD_InfoProcess_ID (0);
setAD_InfoProcess_UU (null);
setAD_Process_ID (0);
setLayoutType (null);
// B
setSeqNo (0);
// @SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_InfoProcess WHERE AD_InfoWindow_ID=@AD_InfoWindow_ID@
} */
}
/** Load Constructor */
public X_AD_InfoProcess (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_InfoProcess[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Info Process.
@param AD_InfoProcess_ID Info Process */
public void setAD_InfoProcess_ID (int AD_InfoProcess_ID)
{
if (AD_InfoProcess_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_InfoProcess_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_InfoProcess_ID, Integer.valueOf(AD_InfoProcess_ID));
}
/** Get Info Process.
@return Info Process */
public int getAD_InfoProcess_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoProcess_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set AD_InfoProcess_UU.
@param AD_InfoProcess_UU AD_InfoProcess_UU */
public void setAD_InfoProcess_UU (String AD_InfoProcess_UU)
{
set_ValueNoCheck (COLUMNNAME_AD_InfoProcess_UU, AD_InfoProcess_UU);
}
/** Get AD_InfoProcess_UU.
@return AD_InfoProcess_UU */
public String getAD_InfoProcess_UU ()
{
return (String)get_Value(COLUMNNAME_AD_InfoProcess_UU);
}
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException
{
return (org.compiere.model.I_AD_InfoWindow)MTable.get(getCtx(), org.compiere.model.I_AD_InfoWindow.Table_Name)
.getPO(getAD_InfoWindow_ID(), get_TrxName()); }
/** Set Info Window.
@param AD_InfoWindow_ID
Info and search/select Window
*/
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID)
{
if (AD_InfoWindow_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, Integer.valueOf(AD_InfoWindow_ID));
}
/** Get Info Window.
@return Info and search/select Window
*/
public int getAD_InfoWindow_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoWindow_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return (org.compiere.model.I_AD_Process)MTable.get(getCtx(), org.compiere.model.I_AD_Process.Table_Name)
.getPO(getAD_Process_ID(), get_TrxName()); }
/** Set Process.
@param AD_Process_ID
Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID < 1)
set_Value (COLUMNNAME_AD_Process_ID, null);
else
set_Value (COLUMNNAME_AD_Process_ID, Integer.valueOf(AD_Process_ID));
}
/** Get Process.
@return Process or Report
*/
public int getAD_Process_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Process_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getAD_Process_ID()));
}
/** Set Image URL.
@param ImageURL
URL of image
*/
public void setImageURL (String ImageURL)
{
set_Value (COLUMNNAME_ImageURL, ImageURL);
}
/** Get Image URL.
@return URL of image
*/
public String getImageURL ()
{
return (String)get_Value(COLUMNNAME_ImageURL);
}
/** LayoutType AD_Reference_ID=200083 */
public static final int LAYOUTTYPE_AD_Reference_ID=200083;
/** Button = B */
public static final String LAYOUTTYPE_Button = "B";
/** Menu = M */
public static final String LAYOUTTYPE_Menu = "M";
/** List = L */
public static final String LAYOUTTYPE_List = "L";
/** Set LayoutType.
@param LayoutType
Layout type of info process
*/
public void setLayoutType (String LayoutType)
{
set_Value (COLUMNNAME_LayoutType, LayoutType);
}
/** Get LayoutType.
@return Layout type of info process
*/
public String getLayoutType ()
{
return (String)get_Value(COLUMNNAME_LayoutType);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -30,7 +30,7 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20140516L;
private static final long serialVersionUID = 20140528L;
/** Standard Constructor */
public X_AD_InfoWindow (Properties ctx, int AD_InfoWindow_ID, String trxName)
@ -147,34 +147,6 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
return (String)get_Value(COLUMNNAME_AD_InfoWindow_UU);
}
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return (org.compiere.model.I_AD_Process)MTable.get(getCtx(), org.compiere.model.I_AD_Process.Table_Name)
.getPO(getAD_Process_ID(), get_TrxName()); }
/** Set Process.
@param AD_Process_ID
Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID < 1)
set_Value (COLUMNNAME_AD_Process_ID, null);
else
set_Value (COLUMNNAME_AD_Process_ID, Integer.valueOf(AD_Process_ID));
}
/** Get Process.
@return Process or Report
*/
public int getAD_Process_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Process_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
{
return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name)

View File

@ -772,7 +772,7 @@ public class Login
// IDEMPIERE-1717 Maintenance mode
if (! MRole.get(m_ctx, AD_Role_ID).isAccessAdvanced()) {
if (MSysConfig.getBooleanValue("SYSTEM_IN_MAINTENANCE_MODE", false, AD_Client_ID))
if (MSysConfig.getBooleanValue(MSysConfig.SYSTEM_IN_MAINTENANCE_MODE, false, AD_Client_ID))
return Msg.getMsg(m_ctx, "SystemInMaintenance");
}

View File

@ -26,6 +26,8 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
/**
* Bank Transfer. Generate two Payments entry
@ -98,12 +100,12 @@ public class BankTransfer extends SvrProcess
+ " - Description="+p_Description+ " - Statement Date="+p_StatementDate+
" - Date Account="+p_DateAcct);
if (Env.getAD_Org_ID(getCtx()) == 0)
throw new AdempiereUserError(Msg.getMsg(getCtx(), "Org0NotAllowed"));
if (p_To_C_BankAccount_ID == 0 || p_From_C_BankAccount_ID == 0)
throw new IllegalArgumentException("Banks required");
if (p_DocumentNo == null || p_DocumentNo.length() == 0)
throw new IllegalArgumentException("Document No required");
if (p_To_C_BankAccount_ID == p_From_C_BankAccount_ID)
throw new AdempiereUserError ("Banks From and To must be different");
@ -145,7 +147,8 @@ public class BankTransfer extends SvrProcess
MPayment paymentBankFrom = new MPayment(getCtx(), 0 , get_TrxName());
paymentBankFrom.setC_BankAccount_ID(mBankFrom.getC_BankAccount_ID());
paymentBankFrom.setDocumentNo(p_DocumentNo);
if (!Util.isEmpty(p_DocumentNo, true))
paymentBankFrom.setDocumentNo(p_DocumentNo);
paymentBankFrom.setDateAcct(p_DateAcct);
paymentBankFrom.setDateTrx(p_StatementDate);
paymentBankFrom.setTenderType(MPayment.TENDERTYPE_DirectDeposit);
@ -171,7 +174,8 @@ public class BankTransfer extends SvrProcess
MPayment paymentBankTo = new MPayment(getCtx(), 0 , get_TrxName());
paymentBankTo.setC_BankAccount_ID(mBankTo.getC_BankAccount_ID());
paymentBankTo.setDocumentNo(p_DocumentNo);
if (!Util.isEmpty(p_DocumentNo, true))
paymentBankTo.setDocumentNo(p_DocumentNo);
paymentBankTo.setDateAcct(p_DateAcct);
paymentBankTo.setDateTrx(p_StatementDate);
paymentBankTo.setTenderType(MPayment.TENDERTYPE_DirectDeposit);

View File

@ -83,7 +83,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
public static final String APPLICATION_DESKTOP_KEY = "application.desktop";
public static final String APP_NAME = "iDempiere";
public static String APP_NAME = null;
public static final String UID = "1.0.0";

View File

@ -0,0 +1,200 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. 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., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s) : Layda Salas - globalqss *
*****************************************************************************/
package org.adempiere.webui;
import org.adempiere.base.event.AbstractEventHandler;
import org.adempiere.base.event.EventManager;
import org.adempiere.base.event.IEventTopics;
import org.compiere.model.I_AD_SysConfig;
import org.compiere.model.MSysConfig;
import org.compiere.model.PO;
import org.compiere.model.X_AD_SysConfig;
import org.osgi.service.event.Event;
import org.zkoss.zk.ui.WebApp;
import org.zkoss.zk.ui.util.WebAppInit;
/**
* Handle web app init event to sync config store in web config file and database
* @author hieplq
*
*/
public class DefaultWebAppInit implements WebAppInit {
private static SystemConfigHandler systemConfigChangeHandler;
protected WebApp webApp = null;
/**
* Register listen model change
*/
@Override
public void init(WebApp wapp) throws Exception {
this.webApp = wapp;
// save app name get from zk.xml to restore when delete app name in system config value
AdempiereWebUI.APP_NAME = this.webApp.getAppName();
String appNameConfig = MSysConfig.getValue(MSysConfig.ZK_BROWSER_TITLE);
if (appNameConfig != null){
this.webApp.setAppName(appNameConfig);
}
createStaticListeners ();
}
/**
* register handle model change to event manage
* Current only init handle System config table
*/
private synchronized void createStaticListeners() {
if (systemConfigChangeHandler == null) {
systemConfigChangeHandler = new SystemConfigHandler(webApp);
systemConfigChangeHandler.bindEventManager(EventManager.getInstance());
}
}
/**
* Process modle event of table system config
* @author hieplq
*
*/
static class SystemConfigHandler extends AbstractEventHandler {
String IS_DELETE = "org.compiere.util.SystemConfigHandler.isDelete";
protected WebApp webApp = null;
/**
* cache WebApp for user late
* @param webApp
*/
public SystemConfigHandler (WebApp webApp){
this.webApp = webApp;
}
/**
* {@inheritDoc}
*/
@Override
protected void doHandleEvent(Event event) {
PO po = getPO(event);
// just track change and delete status.
// new, change, rename to = change => isDelete = false
// delete, rename from = delete => isDelete = true
int nameColumnIndex = po.get_ColumnIndex(I_AD_SysConfig.COLUMNNAME_Name);
int valueColumnIndex = po.get_ColumnIndex(I_AD_SysConfig.COLUMNNAME_Value);
boolean isChangeValue = po.is_ValueChanged(valueColumnIndex);
boolean isChangeName = po.is_ValueChanged(nameColumnIndex);
// delete, rename config (rename have same effect delete)
if (IEventTopics.PO_BEFORE_DELETE.equals(event.getTopic()) ||
(IEventTopics.PO_BEFORE_CHANGE.equals(event.getTopic()) && isChangeName)
){
beforeDelete (po);
// when change one record = delete a record + new a record
if (IEventTopics.PO_BEFORE_CHANGE.equals(event.getTopic()) && isChangeName){
beforeChange (po);
}
return;
}
// delete, rename config (rename have same effect delete)
if (IEventTopics.PO_AFTER_DELETE.equals(event.getTopic()) ||
(IEventTopics.PO_AFTER_CHANGE.equals(event.getTopic()) && isChangeName)
){
afterDelete (po);
// when change one record = delete a record + new a record
if (IEventTopics.PO_AFTER_CHANGE.equals(event.getTopic()) && isChangeName){
afterChange(po);
}
return;
}
// new, change value consider as change. change name is process with above not there
if (IEventTopics.PO_BEFORE_NEW.equals(event.getTopic()) ||
(IEventTopics.PO_BEFORE_CHANGE.equals(event.getTopic()) && !isChangeName && isChangeValue)){
beforeChange (po);
return;
}
// new, change value consider as change. change name is process with above not there
if (IEventTopics.PO_AFTER_NEW.equals(event.getTopic()) ||
(IEventTopics.PO_AFTER_CHANGE.equals(event.getTopic()) && !isChangeName && isChangeValue)){
afterChange (po);
return;
}
}
protected void beforeDelete(PO po) {
//TODO:save flag to file for case when insert data success but before sync with file config has error crash program
}
/**
* Process when delete a configuration record
* @param po
*/
protected void afterDelete (PO po){
if (po instanceof X_AD_SysConfig){
// when delete ZK_BROWSER_TITLE, set web config to default value "Idempiere"
// user old value of name for correct meaning of record delete, change
if (MSysConfig.ZK_BROWSER_TITLE.equals(getOldValueOfName(po))){
webApp.setAppName(AdempiereWebUI.APP_NAME);
}
}
}
/**
* get old value of column name
* @param po
* @return
*/
protected String getOldValueOfName(PO po) {
int nameColumnIndex = po.get_ColumnIndex(I_AD_SysConfig.COLUMNNAME_Name);
return po.get_ValueOld(nameColumnIndex).toString();
}
protected void beforeChange (PO po){
//TODO:save flag to file for case when insert data success but before sync with file config has error crash program
}
/**
* sync value in web config with new value in db
* @param po
*/
protected void afterChange (PO po){
if (po instanceof X_AD_SysConfig){
// when change ZK_BROWSER_TITLE, set web config to new value
if (MSysConfig.ZK_BROWSER_TITLE.equals(((X_AD_SysConfig) po).getName())){
String configAppname = ((X_AD_SysConfig) po).getValue();
webApp.setAppName(configAppname);
}
}
}
@Override
protected void initialize() {
registerTableEvent(IEventTopics.PO_AFTER_CHANGE, I_AD_SysConfig.Table_Name);
registerTableEvent(IEventTopics.PO_AFTER_NEW, I_AD_SysConfig.Table_Name);
registerTableEvent(IEventTopics.PO_AFTER_DELETE, I_AD_SysConfig.Table_Name);
registerTableEvent(IEventTopics.PO_BEFORE_CHANGE, I_AD_SysConfig.Table_Name);
registerTableEvent(IEventTopics.PO_BEFORE_DELETE, I_AD_SysConfig.Table_Name);
registerTableEvent(IEventTopics.PO_BEFORE_NEW, I_AD_SysConfig.Table_Name);
}
}
}

View File

@ -42,6 +42,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
@ -82,8 +83,8 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
/**
*
*/
private static final long serialVersionUID = 2190456247109646320L;
private static final long serialVersionUID = 761285757875594250L;
private static final String ON_COMPLETE = "onComplete";
private static final String ON_STATUS_UPDATE = "onStatusUpdate";
@ -341,6 +342,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
public void runProcess()
{
Events.sendEvent(DialogEvents.ON_BEFORE_RUN_PROCESS, this, null);
future = Adempiere.getThreadPoolExecutor().submit(new DesktopRunnable(new ProcessDialogRunnable(null), getDesktop()));
}

View File

@ -84,6 +84,7 @@ public class ProcessModalDialog extends AbstractProcessDialog implements EventLi
if (listener != null)
{
addEventListener(ON_WINDOW_CLOSE, listener);
addEventListener(ON_BEFORE_RUN_PROCESS, listener);
}
log.info("Process=" + pi.getAD_Process_ID());

View File

@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@ -39,7 +40,8 @@ public final class ConfirmPanel extends Div
/**
*
*/
private static final long serialVersionUID = -6050634074454659578L;
private static final long serialVersionUID = 3257542169107223645L;
/** Action String OK. */
public static final String A_OK = "Ok";
/** Action String Cancel. */
@ -220,6 +222,8 @@ public final class ConfirmPanel extends Div
//
private Hlayout pnlBtnRight;
private Hlayout pnlBtnLeft;
// IDEMPIERE-1334 center panel, contain all process button
private Hlayout pnlBtnCenter;
/**
* initialise components
@ -231,13 +235,36 @@ public final class ConfirmPanel extends Div
pnlBtnRight = new Hlayout();
pnlBtnRight.setSclass("confirm-panel-right");
// IDEMPIERE-1334 start
pnlBtnCenter = new Hlayout();
pnlBtnCenter.setSclass("confirm-panel-center");
// IDEMPIERE-1334 end
this.appendChild(pnlBtnLeft);
// IDEMPIERE-1334
this.appendChild(pnlBtnCenter);
this.appendChild(pnlBtnRight);
this.setSclass("confirm-panel");
this.setVflex("min");
setId("confirmPanel");
}
/**
* IDEMPIERE-1334
* add a process button into center panel
* @param btName
* @param imgName
* @return
*/
public Button addProcessButton (String btName, String imgName){
Button btProcess = createButton(btName);
// replace default image with image set at info process
if (m_withImage && imgName != null && imgName.trim().length() > 0)
btProcess.setImage(ThemeManager.getThemeResource("images/" + imgName));
addComponentsCenter(btProcess);
return btProcess;
}
/**
* add button to the left side of the confirm panel
* @param button button
@ -260,6 +287,26 @@ public final class ConfirmPanel extends Div
pnlBtnRight.appendChild(button);
}
/**
* IDEMPIERE-1334
* add button to the center side of the confirm panel
* @param button button
*/
public void addComponentsCenter(Button button)
{
if (!buttonMap.containsKey(button.getId()))
buttonMap.put(button.getId(), button);
pnlBtnCenter.appendChild(button);
}
/**
* Add combobox to center panel
* @param cbb
*/
public void addComponentsCenter(Combobox cbb){
pnlBtnCenter.appendChild(cbb);
}
/**
* return button of the specified id
* @param id button id
@ -391,8 +438,12 @@ public final class ConfirmPanel extends Div
{
List<?> list1 = pnlBtnLeft.getChildren();
List<?> list2 = pnlBtnRight.getChildren();
// IDEMPIERE-1334
List<?> list3 = pnlBtnCenter.getChildren();
Iterator<?> iter1 = list1.iterator();
Iterator<?> iter2 = list2.iterator();
// IDEMPIERE-1334
Iterator<?> iter3 = list3.iterator();
while (iter1.hasNext())
{
@ -404,6 +455,13 @@ public final class ConfirmPanel extends Div
Button button = (Button)iter2.next();
button.setEnabled(enabled);
}
// IDEMPIERE-1334 start
while (iter3.hasNext())
{
Button button = (Button)iter3.next();
button.setEnabled(enabled);
}
// IDEMPIERE-1334 end
}
/**
* add action listener on the existing buttons
@ -414,8 +472,12 @@ public final class ConfirmPanel extends Div
{
List<?> list1 = pnlBtnLeft.getChildren();
List<?> list2 = pnlBtnRight.getChildren();
// IDEMPIERE-1334
List<?> list3 = pnlBtnCenter.getChildren();
Iterator<?> iter1 = list1.iterator();
Iterator<?> iter2 = list2.iterator();
// IDEMPIERE-1334
Iterator<?> iter3 = list3.iterator();
while (iter1.hasNext())
{
@ -427,6 +489,13 @@ public final class ConfirmPanel extends Div
Button button = (Button)iter2.next();
button.addEventListener(event, listener);
}
// IDEMPIERE-1334 start
while (iter3.hasNext())
{
Button button = (Button)iter3.next();
button.addEventListener(event, listener);
}
// IDEMPIERE-1334 start
}
/**

View File

@ -55,11 +55,11 @@ import org.zkoss.zul.ListModel;
* @author Sendy Yagambrum
*/
public class WListbox extends Listbox implements IMiniTable, TableValueChangeListener, WTableModelListener
{
{
/**
*
*/
private static final long serialVersionUID = 8717707799347994189L;
private static final long serialVersionUID = -706774424788688953L;
/** Logger. */
private static CLogger logger = CLogger.getCLogger(WListbox.class);
@ -745,22 +745,30 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
*/
public Integer getSelectedRowKey()
{
int row = 0;
final int noSelection = -1;
final int noIndex = -1;
Object data;
if (m_layout == null)
{
throw new UnsupportedOperationException("Layout not defined");
}
row = getSelectedRow();
int row = getSelectedRow();
// make common function
return getRowKeyAt (row);
} // getSelectedRowKey
/**
* IDEMPIERE-1334
* get key of record at index
* @param index
* @return
*/
public Integer getRowKeyAt (int index){
// TODO factor out the two parts of this guard statement
if (row != noSelection && m_keyColumnIndex != noIndex)
{
data = getModel().getDataAt(row, m_keyColumnIndex);
if (index < 0 || m_keyColumnIndex < 0)
return null;
Object data = getModel().getDataAt(index, m_keyColumnIndex);
if (data instanceof IDColumn)
{
@ -770,10 +778,33 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
{
return (Integer)data;
}
return null;
}
return null;
} // getSelectedRowKey
/**
* IDEMPIERE-1334
* deselect all current select, set all record have key in lsKey is selected
* when non key column just return
* @param lsKey
* @return
*/
public void setSelectedByKeys (List<Integer> lsKey){
// no key column because can't set selected, just return
if (m_keyColumnIndex < 0)
return;
ListModelTable model = getModel();
List<Object> lsSelectedItem = new ArrayList<Object> ();
for (int index = 0; index < model.getSize(); index++){
Integer key = getRowKeyAt(index);
if (key == null)
continue;
if (lsKey.contains(key)){
lsSelectedItem.add (model.getElementAt(index));
}
}
model.setSelection(lsSelectedItem);
}
public Integer getFirstRowKey()
{
@ -787,19 +818,8 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
return null;
}
Object data = getModel().getDataAt(0, m_keyColumnIndex);
if (data instanceof IDColumn)
{
data = ((IDColumn)data).getRecord_ID();
}
if (data instanceof Integer)
{
return (Integer)data;
}
return null;
// make common function
return getRowKeyAt (0);
}
/**

View File

@ -13,8 +13,6 @@
*****************************************************************************/
package org.adempiere.webui.dashboard;
import static org.compiere.model.MSysConfig.CALENDAR_ALTERNATE_TIMEZONE;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.math.BigDecimal;
@ -391,7 +389,7 @@ public class CalendarWindow extends Window implements EventListener<Event>, ITab
private String getTimeZone()
{
String alternateTimeZone = MSysConfig.getValue(CALENDAR_ALTERNATE_TIMEZONE, "Pacific Time=PST", Env.getAD_Client_ID(Env.getCtx()));
String alternateTimeZone = MSysConfig.getValue(MSysConfig.CALENDAR_ALTERNATE_TIMEZONE, "Pacific Time=PST", Env.getAD_Client_ID(Env.getCtx()));
TimeZone defaultTimeZone = TimeZone.getDefault();
StringBuilder defaultTimeZoneName = new StringBuilder(defaultTimeZone.getDisplayName());
int defaultTimeZoneOffset = defaultTimeZone.getOffset(0) / 3600000;

View File

@ -104,7 +104,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
/**
*
*/
private static final long serialVersionUID = -7495898481342426458L;
private static final long serialVersionUID = 4209181029836503344L;
private static final String IMAGES_UPARROW_PNG = "images/collapse-header.png";
@ -597,6 +597,11 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
helpController.renderToolTip(gridField);
}
@Override
public void updateHelpTooltip(String hdr, String desc, String help, String otherContent) {
helpController.renderToolTip(hdr, desc, help, otherContent);
}
@Override
public void updateHelpQuickInfo(GridTab gridTab) {
helpController.renderQuickInfo(gridTab);

View File

@ -206,6 +206,8 @@ public interface IDesktop extends UIPart {
public void updateHelpTooltip(GridField gridField);
public void updateHelpTooltip(String hdr, String desc, String help, String otherContent);
public void updateHelpQuickInfo(GridTab gridTab);
public boolean isPendingWindow();

View File

@ -25,4 +25,10 @@ public interface DialogEvents {
*/
public final static String ON_WINDOW_CLOSE = "onWindowClose";
/**
* rise event before run process, other code can inject a long process in there
* example: at info window, save info to database before run process
*/
public final static String ON_BEFORE_RUN_PROCESS = "onBeforeRunProcess";
}

View File

@ -28,13 +28,11 @@ import org.compiere.util.Util;
*/
public class ButtonFactory {
private static final String ZK_BUTTON_STYLE = "ZK_BUTTON_STYLE";
/**
* @return true if button should have text label
*/
public static final boolean isWithText() {
String type = MSysConfig.getValue(ZK_BUTTON_STYLE, "I");
String type = MSysConfig.getValue(MSysConfig.ZK_BUTTON_STYLE, "I");
return type.indexOf("T") >= 0;
}
@ -42,7 +40,7 @@ public class ButtonFactory {
* @return true if button should include an image icon
*/
public static final boolean isWithImage() {
String type = MSysConfig.getValue(ZK_BUTTON_STYLE, "I");
String type = MSysConfig.getValue(MSysConfig.ZK_BUTTON_STYLE, "I");
return type.indexOf("I") >= 0;
}

View File

@ -841,7 +841,7 @@ public class InfoProductWindow extends InfoWindow {
@Override
protected void prepareTable(ColumnInfo[] layout, String from, String where,
String orderBy) {
if (getSelectedWarehouseId() > 0)
if (Util.isEmpty(orderBy) && getSelectedWarehouseId() > 0)
{
orderBy = "QtyAvailable DESC";
}

View File

@ -14,17 +14,20 @@ import java.util.Properties;
import java.util.TreeMap;
import java.util.logging.Level;
import org.adempiere.model.MInfoProcess;
import org.adempiere.model.MInfoRelated;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.Combobox;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.Menupopup;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Tab;
@ -40,6 +43,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.window.FDialog;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.EmbedWinInfo;
@ -52,6 +56,7 @@ import org.compiere.model.MInfoColumn;
import org.compiere.model.MInfoWindow;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MLookupInfo;
import org.compiere.model.MProcess;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.X_AD_InfoColumn;
@ -70,7 +75,12 @@ import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.SwipeEvent;
import org.zkoss.zul.Center;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.ComboitemRenderer;
import org.zkoss.zul.Div;
import org.zkoss.zul.ListModel;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.North;
import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
@ -87,7 +97,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
/**
*
*/
private static final long serialVersionUID = -5198550045241794995L;
private static final long serialVersionUID = 1958501982483183179L;
protected Grid parameterGrid;
private Borderlayout layout;
@ -111,6 +121,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected String queryValue;
private List<GridField> gridFields;
private int AD_InfoWindow_ID;
private Checkbox checkAND;
/**
@ -140,18 +151,6 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
this.queryValue = queryValue;
this.AD_InfoWindow_ID = AD_InfoWindow_ID;
//red1 IDEMPIERE-1711 (Hengsin advised this minimal coding way)
infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, null);
if (infoWindow.getAD_Process_ID() > 0)
{
p_multipleSelection = true;
hasProcess = true;
Button b = confirmPanel.createButton(ConfirmPanel.A_PROCESS);
confirmPanel.addComponentsLeft(b);
b.addEventListener(Events.ON_CLICK, this);
}
//red1 -- end --
//Xolali IDEMPIERE-1045
contentPanel.addActionListener(new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
@ -166,6 +165,16 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
infoContext = new Properties(Env.getCtx());
p_loadedOK = loadInfoDefinition();
// make process button only in windown mode
if (!m_lookup){
// IDEMPIERE-1334
boolean haveProcess = initInfoProcess();
// when have a process, force multi select mode
if (haveProcess)
p_multipleSelection = true;
}
loadInfoRelatedTabs();
if (loadedOK()) {
if (isLookup()) {
@ -182,6 +191,117 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
}
}
/**
* IDEMPIERE-1334
* load info process info
* layout each info process as button or dropdown item
* @return true when have process, false when no process
*/
protected boolean initInfoProcess() {
if (infoWindow == null){
return false;
}
MInfoProcess [] infoProcessList = infoWindow.getInfoProcess(false);
// ** layout info process flow order (button list, drop down, dialog,...)
// each layout type in a loop to ensure this order
// get info from process (name, help, des), set to name of button, item menu,...
MProcess process = null;
// make list process button
for (MInfoProcess infoProcess : infoProcessList){
// just add info process have layout is button
if (!MInfoProcess.LAYOUTTYPE_Button.equals(infoProcess.getLayoutType())){
continue;
}
process = MProcess.get(Env.getCtx(), infoProcess.getAD_Process_ID());
Button btProcess = confirmPanel.addProcessButton(process.get_Translation(MProcess.COLUMNNAME_Name), infoProcess.getImageURL());
if (Util.isEmpty(infoProcess.getImageURL(), true)) {
btProcess.setImage(null);
btProcess.setLabel(process.get_Translation(MProcess.COLUMNNAME_Name));
}
// save process_id, handle event will use
btProcess.setAttribute(PROCESS_ID_KEY, new Integer(infoProcess.getAD_Process_ID()));
btProcess.addEventListener(Events.ON_CLICK, this);
// save info process to use in handle event
btProcess.setAttribute(ATT_INFO_PROCESS_KEY, process);
// update tooltip hepl when focus
btProcess.addEventListener(Events.ON_FOCUS, this);
btProcessList.add(btProcess);
}
// filte just infoprocess have layout type is drop list for model of combobox
List<MInfoProcess> infoProcessDropList = new ArrayList<MInfoProcess>();
for (MInfoProcess infoProcess : infoProcessList){
if (!MInfoProcess.LAYOUTTYPE_List.equals(infoProcess.getLayoutType())){
continue;
}
infoProcessDropList.add(infoProcess);
}
// make combobox contain list info process
if (infoProcessDropList.size() > 0){
cbbProcess = new Combobox ();
ListModel<MInfoProcess> infoProccessModel = new ListModelList<MInfoProcess>(infoProcessDropList);
// render item, use name to display
cbbProcess.setItemRenderer(new ComboitemRenderer<MInfoProcess>() {
public void render(Comboitem item, MInfoProcess data, int index){
MProcess process = MProcess.get(Env.getCtx(), data.getAD_Process_ID());
item.setValue(process);
item.setLabel(process.get_Translation(MProcess.COLUMNNAME_Name));
if (!Util.isEmpty(data.getImageURL(), true)) {
item.setImage(ThemeManager.getThemeResource("images/" + data.getImageURL()));
}
}
});
// update tooltip hepl when select a item
cbbProcess.addEventListener(Events.ON_SELECT, this);
cbbProcess.setModel(infoProccessModel);
confirmPanel.addComponentsCenter(cbbProcess);
btCbbProcess = confirmPanel.addProcessButton(Msg.getMsg(Env.getCtx(), ConfirmPanel.A_PROCESS), null);
btCbbProcess.addEventListener(Events.ON_CLICK, this);
}
// make menu button
Menupopup ipMenu = null;
for (MInfoProcess infoProcess : infoProcessList){
// just add info process have layout is bt_menu
if (!MInfoProcess.LAYOUTTYPE_Menu.equals(infoProcess.getLayoutType())){
continue;
}
process = MProcess.get(Env.getCtx(), infoProcess.getAD_Process_ID());
// init popup menu
if (ipMenu == null){
ipMenu = new Menupopup();
ipMenu.setId("ipMenu");
confirmPanel.appendChild(ipMenu);
// init button to show menu
btMenuProcess = confirmPanel.addProcessButton("ProcessMenu", null);
btMenuProcess.setPopup("ipMenu, before_start");
}
// make menu item for each info process
Menuitem ipMenuItem = new Menuitem();
ipMenuItem.setLabel(process.get_Translation(MProcess.COLUMNNAME_Name));
if (!Util.isEmpty(infoProcess.getImageURL(), true)) {
ipMenuItem.setImage(ThemeManager.getThemeResource("images/" + infoProcess.getImageURL()));
}
ipMenuItem.setAttribute(PROCESS_ID_KEY, infoProcess.getAD_Process_ID());
ipMenuItem.addEventListener(Events.ON_CLICK, this);
ipMenu.appendChild(ipMenuItem);
}
return infoProcessList.length > 0;
}
private void processQueryValue() {
for (int i = 0; i < identifiers.size(); i++) {
WEditor editor = identifiers.get(i);
@ -398,6 +518,11 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{
if (infoColumn.getAD_Reference_ID() == DisplayType.List)
{
WEditor editor = null;
editor = WebEditorFactory.getEditor(gridFields.get(i), true);
editor.setMandatory(false);
editor.setReadWrite(false);
editorMap.put(infoColumn.getSelectClause(), editor);
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), infoColumn.getSelectClause(), ValueNamePair.class, (String)null);
}
else
@ -662,9 +787,23 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
confirmPanel.getButton(ConfirmPanel.A_ZOOM).setVisible(hasZoom());
confirmPanel.getButton(ConfirmPanel.A_ZOOM).setDisabled(true);
if (hasProcess)
confirmPanel.getButton(ConfirmPanel.A_PROCESS).setDisabled(true);
// IDEMPIERE-1334 start when init all button process is disable because nothing record is selected
for (Button btProcess : btProcessList){
btProcess.setDisabled(true);
}
if (btCbbProcess != null){
btCbbProcess.setDisabled(true);
}
if (btMenuProcess != null){
btMenuProcess.setDisabled(true);
}
if (cbbProcess != null){
cbbProcess.setDisabled(true);
}
// IDEMPIERE-1334 end
}
protected void renderFooter(South south) {
@ -1010,11 +1149,6 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
return !isLookup() && infoWindow != null && !MTable.get(Env.getCtx(), infoWindow.getAD_Table_ID()).isView();
}
@Override
protected boolean hasProcess() { //red1 IDEMPIERE-1711 to retain InfoWindow.process_ID > 0 as true
return hasProcess;
}
@Override
public void valueChange(ValueChangeEvent evt) {
if (evt != null && evt.getSource() instanceof WEditor)
@ -1059,7 +1193,13 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
public void onEvent(Event event)
{
if (event.getName().equals(Events.ON_FOCUS)) {
if (event.getName().equals(Events.ON_FOCUS) && event.getTarget() != null &&
event.getTarget().getAttribute(ATT_INFO_PROCESS_KEY) != null){
MProcess process = (MProcess)event.getTarget().getAttribute(ATT_INFO_PROCESS_KEY);
SessionManager.getAppDesktop().updateHelpTooltip(process.get_Translation(MProcess.COLUMNNAME_Name), process.get_Translation(MProcess.COLUMNNAME_Description), process.get_Translation(MProcess.COLUMNNAME_Help), null);
}
else if (event.getName().equals(Events.ON_FOCUS)) {
for (WEditor editor : editors)
{
if (editor.isComponentOfEditor(event.getTarget()))
@ -1068,6 +1208,15 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
return;
}
}
}else if (event.getName().equals(Events.ON_SELECT) && event.getTarget().equals(cbbProcess)){
// update help panel when change select item in combobox process
Comboitem selectedItem = cbbProcess.getSelectedItem();
if (selectedItem != null && selectedItem.getValue() != null){
MProcess selectedValue = (MProcess)selectedItem.getValue();
SessionManager.getAppDesktop().updateHelpTooltip(selectedValue.get_Translation(MProcess.COLUMNNAME_Name), selectedValue.get_Translation(MProcess.COLUMNNAME_Description), selectedValue.get_Translation(MProcess.COLUMNNAME_Help), null);
}
}
else
{
@ -1203,6 +1352,11 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{
if (infoColumn.getAD_Reference_ID() == DisplayType.List)
{
WEditor editor = null;
editor = WebEditorFactory.getEditor(getGridField(infoColumn), true);
editor.setMandatory(false);
editor.setReadWrite(false);
editorMap.put(infoColumn.getSelectClause(), editor);
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), infoColumn.getSelectClause(), ValueNamePair.class, (String)null);
}
else

View File

@ -183,11 +183,13 @@ public class HelpController
sb.append("<html>\n<body>\n<div class=\"help-content\">\n");
if (hdr == null || hdr.trim().length() == 0){
if (otherContent != null){
if (otherContent == null){
otherContent = Msg.getMsg(Env.getCtx(), "PlaceCursorIntoField");
}
sb.append("<i>(");
sb.append (otherContent);
sb.append (")</i>");
}
}else{
sb.append("<b>");
sb.append(hdr);

View File

@ -32,17 +32,20 @@ import java.util.List;
import java.util.Map;
import java.util.Vector;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.apps.BusyDialog;
import org.adempiere.webui.apps.ProcessModalDialog;
import org.adempiere.webui.apps.WProcessCtl;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Combobox;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.WListItemRenderer;
import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
@ -75,9 +78,11 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.SelectEvent;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Listhead;
import org.zkoss.zul.Listheader;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Paging;
import org.zkoss.zul.event.ZulEvents;
import org.zkoss.zul.ext.Sortable;
@ -99,11 +104,15 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/**
*
*/
private static final long serialVersionUID = 2823393272482373014L;
private static final long serialVersionUID = 7396541753653210881L;
private final static int PAGE_SIZE = 100;
protected boolean hasProcess = false;
protected List<Button> btProcessList = new ArrayList<Button>();
protected Map<String, WEditor> editorMap = new HashMap<String, WEditor>();
protected final static String PROCESS_ID_KEY = "processId";
protected final static String ON_RUN_PROCESS = "onRunProcess";
// attribute key of info process
protected final static String ATT_INFO_PROCESS_KEY = "INFO_PROCESS";
public static InfoPanel create (int WindowNo,
String tableName, String keyColumn, String value,
@ -125,7 +134,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/** Window Width */
static final int INFO_WIDTH = 800;
private boolean m_lookup;
protected boolean m_lookup;
/**************************************************
* Detail Constructor
@ -161,6 +170,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
log.info("WinNo=" + WindowNo + " " + whereClause);
p_tableName = tableName;
p_keyColumn = keyColumn;
p_multipleSelection = multipleSelection;
m_lookup = lookup;
@ -184,6 +194,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
infoWindow = MInfoWindow.get(p_keyColumn.replace("_ID", ""), null);
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
addEventListener(ON_RUN_PROCESS, this);
} // InfoPanel
private void init()
@ -206,10 +218,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
setWidth("100%");
setHeight("100%");
setStyle("position: absolute");
if (p_multipleSelection) hasProcess = true; //red1 IDEMPIERE-1711 !isLookUp() and is multipleSelection so add Process button first
}
confirmPanel = new ConfirmPanel(true, true, false, true, true, true, true, hasProcess); // Elaine 2008/12/16 //red1 hasProcess checked by isLookup()
confirmPanel = new ConfirmPanel(true, true, false, true, true, true); // Elaine 2008/12/16
confirmPanel.addActionListener(Events.ON_CLICK, this);
confirmPanel.setHflex("1");
@ -231,6 +242,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
contentPanel.setOddRowSclass(null);
// contentPanel.setSizedByContent(true);
contentPanel.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "infoListbox");
contentPanel.addEventListener("onAfterRender", this);
this.setSclass("info-panel");
} // init
@ -290,11 +302,14 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
private Listitem m_lastOnSelectItem;
private static final String[] lISTENER_EVENTS = {};
//red1 added for embedded Process feature
protected int AD_InfoWindow_ID;
private ProcessInfo m_pi = null;
private MProcess m_process = null;
/**
* IDEMPIERE-1334
* button and combobox when layout process button as dropdow list
*/
protected Button btCbbProcess;
protected Combobox cbbProcess;
protected Button btMenuProcess;
/**
* Loaded correctly
* @return true if loaded OK
@ -329,7 +344,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
String orderBy)
{
String sql =contentPanel.prepareTable(layout, from,
where,p_multipleSelection && m_lookup,
where,p_multipleSelection,
getTableName(),false);
p_layout = contentPanel.getLayout();
m_sqlMain = sql;
@ -923,24 +938,49 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
return InfoPanel.lISTENER_EVENTS;
}
/**
* enable all control button or disable all rely to selected record
*/
protected void enableButtons (){
boolean enable = (contentPanel.getSelectedCount() > 0);
enableButtons(enable);
}
// Elaine 2008/11/28
/**
* enable or disable all control button
* Enable OK, History, Zoom if row/s selected
* ---
* Changes: Changed the logic for accommodating multiple selection
* @author ashley
*/
protected void enableButtons ()
protected void enableButtons (boolean enable)
{
boolean enable = (contentPanel.getSelectedCount() > 0);
confirmPanel.getOKButton().setEnabled(contentPanel.getSelectedCount() > 0); //red1 allow Process for 1 or more records
confirmPanel.getOKButton().setEnabled(enable); //red1 allow Process for 1 or more records
if (hasHistory())
confirmPanel.getButton(ConfirmPanel.A_HISTORY).setEnabled(enable);
if (hasZoom())
confirmPanel.getButton(ConfirmPanel.A_ZOOM).setEnabled( (contentPanel.getSelectedCount() == 1) ); //red1 only zoom for single record
confirmPanel.getButton(ConfirmPanel.A_ZOOM).setEnabled(!enable?enable : (contentPanel.getSelectedCount() == 1) ); //red1 only zoom for single record
if (hasProcess())
confirmPanel.getButton(ConfirmPanel.A_PROCESS).setEnabled(enable);
// IDEMPIERE-1334 start
for (Button btProcess : btProcessList){
btProcess.setEnabled(enable);
}
if (btCbbProcess != null){
btCbbProcess.setEnabled(enable);
}
if (btMenuProcess != null){
btMenuProcess.setEnabled(enable);
}
if (cbbProcess != null){
cbbProcess.setEnabled(enable);
}
// IDEMPIERE-1334 end
} // enableButtons
//
@ -1046,8 +1086,10 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
public void onEvent(Event event)
{
if (event!=null)
{
if (event == null){
return;
}
if (event.getTarget().equals(confirmPanel.getButton(ConfirmPanel.A_OK)))
{
onOk();
@ -1058,6 +1100,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
SelectEvent<?, ?> selectEvent = (SelectEvent<?, ?>) event;
if (selectEvent.getReference() != null && selectEvent.getReference() instanceof Listitem)
m_lastOnSelectItem = (Listitem) selectEvent.getReference();
}else if (event.getTarget() == contentPanel && event.getName().equals("onAfterRender")){
//IDEMPIERE-1334 at this event selected item from listBox and model is sync
enableButtons();
}
else if (event.getTarget() == contentPanel && event.getName().equals(Events.ON_DOUBLE_CLICK))
{
@ -1102,45 +1147,36 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
this.detach();
}
}
//red1 handle process_ID
else if (event.getTarget().equals(confirmPanel.getButton(ConfirmPanel.A_PROCESS)))
{
if (hasProcess) {
infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, null);
m_process = MProcess.get(Env.getCtx(), infoWindow.getAD_Process_ID());
m_pi = new ProcessInfo(m_process.getName(),
infoWindow.getAD_Process_ID());
m_pi.setAD_User_ID(Env.getAD_User_ID(Env.getCtx()));
m_pi.setAD_Client_ID(Env.getAD_Client_ID(Env.getCtx()));
// IDEMPIERE-1334 handle event click into process button start
else if (ON_RUN_PROCESS.equals(event.getName())){
// hand echo event after click button process
runProcess((Integer)event.getData());
}else if (Events.ON_CLICK.equals(event.getName()) &&
event.getTarget() != null && event.getTarget() instanceof Menuitem &&
event.getTarget().getAttribute(PROCESS_ID_KEY) != null){
// handle event when click to menu item of info process
preRunProcess((Integer)event.getTarget().getAttribute(PROCESS_ID_KEY));
}
else if (event.getTarget().equals(btCbbProcess)){
// click bt process in case display drop down list
Comboitem cbbSelectedItem = cbbProcess.getSelectedItem();
MPInstance instance = new MPInstance(Env.getCtx(), infoWindow.getAD_Process_ID(), 0);
instance.saveEx();
// store in T_Selection table selected rows for Execute Process that retrieves from T_Selection in code.
DB.createT_Selection(instance.getAD_PInstance_ID(), getSelectedKeysCollection(),
null);
//clear back
m_results.clear();
// Execute Process
m_pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
if (cbbSelectedItem == null || cbbSelectedItem.getValue() == null){
// do nothing when no process is selected
return;
}
//HengSin - to let process end with message and requery
WProcessCtl.process(p_WindowNo, m_pi, (Trx)null, new EventListener<Event>() {
MProcess selectedProcess = (MProcess)cbbSelectedItem.getValue();
preRunProcess(selectedProcess.getAD_Process_ID());
}
else if (btProcessList.contains(event.getTarget())){
// click bt process in case display button list
Button btProcess = (Button)event.getTarget();
Integer processId = (Integer)btProcess.getAttribute(PROCESS_ID_KEY);
@Override
public void onEvent(Event event) throws Exception {
if (!m_pi.isError()) {
Clients.response(new AuEcho(InfoPanel.this, "onQueryCallback", null));
preRunProcess (processId);
}
if (m_pi.isError())
FDialog.error(p_WindowNo, m_pi.getSummary());
else
FDialog.info(p_WindowNo, null, m_pi.getSummary());
//HengSin -- end --
}
});
confirmPanel.getButton(ConfirmPanel.A_PROCESS).setEnabled(false);
}
} //red1 IDEMPIERE-1711 --end--
// IDEMPIERE-1334 handle event click into process button end
else if (event.getTarget() == paging)
{
int pgNo = paging.getActivePage();
@ -1180,9 +1216,71 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
showBusyDialog();
Clients.response(new AuEcho(this, "onQueryCallback", null));
}
}
} // onEvent
void preRunProcess (Integer processId){
// disable all control button when run process
enableButtons(false);
// call run process in next request to disable all button control
Events.echoEvent(ON_RUN_PROCESS, this, processId);
}
/**
* Run a process.
* show process dialog,
* before start process, save id of record selected
* after run process, show message report result
* @param processIdObj
*/
protected void runProcess (Object processIdObj){
final Integer processId = (Integer)processIdObj;
final MProcess m_process = MProcess.get(Env.getCtx(), processId);
final ProcessInfo m_pi = new ProcessInfo(m_process.getName(), processId);
m_pi.setAD_User_ID(Env.getAD_User_ID(Env.getCtx()));
m_pi.setAD_Client_ID(Env.getAD_Client_ID(Env.getCtx()));
MPInstance instance = new MPInstance(Env.getCtx(), processId, 0);
instance.saveEx();
final int pInstanceID = instance.getAD_PInstance_ID();
// Execute Process
m_pi.setAD_PInstance_ID(pInstanceID);
//HengSin - to let process end with message and requery
WProcessCtl.process(p_WindowNo, m_pi, (Trx)null, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
ProcessModalDialog processModalDialog = (ProcessModalDialog)event.getTarget();
if (DialogEvents.ON_BEFORE_RUN_PROCESS.equals(event.getName())){
// store in T_Selection table selected rows for Execute Process that retrieves from T_Selection in code.
DB.createT_Selection(pInstanceID, getSelectedKeysCollection(),
null);
}else if (ProcessModalDialog.ON_WINDOW_CLOSE.equals(event.getName())){
if (processModalDialog.isCancel()){
//clear back
m_results.clear();
// enable or disable control button rely selected record status
enableButtons();
}else if (m_pi.isError()){
// show error info
FDialog.error(p_WindowNo, m_pi.getSummary());
// enable or disable control button rely selected record status
enableButtons();
}else if (!m_pi.isError() && m_pi.getSummary() != null && m_pi.getSummary().trim().length() > 0){
// when success, show summary if exists
FDialog.info(p_WindowNo, null, m_pi.getSummary());
//showBusyDialog();
Clients.response(new AuEcho(InfoPanel.this, "onQueryCallback", m_results));
}
}
//HengSin -- end --
}
});
}
private void showBusyDialog() {
progressWindow = new BusyDialog();
progressWindow.setPage(this.getPage());
@ -1196,7 +1294,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
}
}
public void onQueryCallback()
public void onQueryCallback(Event event)
{
try
{
@ -1212,6 +1310,14 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
m_sqlUserOrder="";
executeQuery();
renderItems();
// IDEMPIERE-1334 after refresh, restore prev selected item start
if (event != null && event.getData() != null){
@SuppressWarnings("unchecked")
List<Integer> lsSelectedKey = (List<Integer>)event.getData();
contentPanel.setSelectedByKeys(lsSelectedKey);
m_results.clear();
}
// IDEMPIERE-1334 after refresh, restore prev selected item end
}
finally
{

View File

@ -443,7 +443,7 @@ public class LoginPanel extends Window implements EventListener<Event>
private void openLoginHelp() {
String langName = (String) lstLanguage.getSelectedItem().getValue();
langName = langName.substring(0, 2);
String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/{lang}/Login_Help");
String helpURL = MSysConfig.getValue(MSysConfig.LOGIN_HELP_URL, "http://wiki.idempiere.org/{lang}/Login_Help");
if (helpURL.contains("{lang}"))
helpURL = Util.replace(helpURL, "{lang}", langName);
try {

View File

@ -19,9 +19,6 @@ package org.adempiere.webui.theme;
*
*/
public interface ITheme {
//theme key in MSysConfig
public static final String ZK_THEME = "ZK_THEME";
//default theme
public static final String ZK_THEME_DEFAULT = "default";
//theme resource url prefix

View File

@ -15,7 +15,7 @@ package org.adempiere.webui.theme;
import java.io.IOException;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.apps.AEnv;
import org.compiere.model.MClientInfo;
import org.compiere.model.MImage;
import org.compiere.model.MSysConfig;
@ -55,8 +55,8 @@ public final class ThemeManager {
* @return name of active theme
*/
public static String getTheme() {
String theme = System.getProperty("ZK_THEME");
return Util.isEmpty(theme) ? MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT) : theme;
String theme = System.getProperty(MSysConfig.ZK_THEME);
return Util.isEmpty(theme) ? MSysConfig.getValue(MSysConfig.ZK_THEME, ITheme.ZK_THEME_DEFAULT) : theme;
}
/**
@ -83,9 +83,8 @@ public final class ThemeManager {
/**
* @return title text for the browser window
*/
public static String getBrowserTitle() {
String s = Env.getContext(Env.getCtx(), "#ZK_BROWSER_TITLE");
return Util.isEmpty(s) ? MSysConfig.getValue(MSysConfig.ZK_BROWSER_TITLE, AdempiereWebUI.APP_NAME) : s;
public static String getBrowserTitle() {
return AEnv.getDesktop().getWebApp().getAppName();
}
/**

View File

@ -1,7 +1,5 @@
package org.adempiere.webui.window;
import static org.compiere.model.MSysConfig.ZK_REPORT_JASPER_OUTPUT_TYPE;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@ -87,7 +85,7 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
private void init() {
final boolean isCanExport=MRole.getDefault().isCanExport();
defaultType = MSysConfig.getValue(ZK_REPORT_JASPER_OUTPUT_TYPE, "PDF",
defaultType = MSysConfig.getValue(MSysConfig.ZK_REPORT_JASPER_OUTPUT_TYPE, "PDF",
Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()));//It gets default Jasper output type
Borderlayout layout = new Borderlayout();

View File

@ -11,6 +11,11 @@
<listener-class>org.adempiere.webui.session.SessionContextListener
</listener-class>
</listener>
<listener>
<description>iDempiere Web app init for register handle change in table system configuration</description>
<listener-class>org.adempiere.webui.DefaultWebAppInit</listener-class>
</listener>
<!-- uncomment following to debug server event flow -->
<!-- listener>

View File

@ -1,11 +1,14 @@
<?page title="iDempiere" contentType="text/html;charset=UTF-8" automaticTimeout="false" ?>
<?init zscript="theme.zs" ?>
<?link rel="icon" type="image/png" href="${browserIcon}"?>
<zk>
<zscript>
<![CDATA[
import org.compiere.util.Msg;
import org.compiere.util.Env;
import org.adempiere.webui.theme.ThemeManager;
var continueText = Msg.getMsg(Env.getCtx(),"continue");
self.setTitle(ThemeManager.getBrowserTitle());
]]>
</zscript>
<window width="60%" mode="highlighted">

View File

@ -31,6 +31,10 @@
.confirm-panel-left {
float: left;
}
.confirm-panel-center{
padding-left: 5px;
float: left;
}
<%-- busy dialog --%>
.busy-dialog {

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -16,4 +16,11 @@
adempiere.store.get("zkTimeoutURL", callback);
]]>
</script>
<zscript>
<![CDATA[
import org.adempiere.webui.theme.ThemeManager;
self.setTitle(ThemeManager.getBrowserTitle());
]]>
</zscript>
</zk>

View File

@ -421,10 +421,10 @@ public class Allocation
if (col == i_payment)
{
if (! MSysConfig.getBooleanValue("ALLOW_APPLY_PAYMENT_TO_CREDITMEMO", false, Env.getAD_Client_ID(Env.getCtx()))
if (! MSysConfig.getBooleanValue(MSysConfig.ALLOW_APPLY_PAYMENT_TO_CREDITMEMO, false, Env.getAD_Client_ID(Env.getCtx()))
&& open.signum() > 0 && applied.signum() == -open.signum() )
applied = applied.negate();
if (! MSysConfig.getBooleanValue("ALLOW_OVER_APPLIED_PAYMENT", false, Env.getAD_Client_ID(Env.getCtx())))
if (! MSysConfig.getBooleanValue(MSysConfig.ALLOW_OVER_APPLIED_PAYMENT, false, Env.getAD_Client_ID(Env.getCtx())))
if ( open.abs().compareTo( applied.abs() ) < 0 )
applied = open;
}

View File

@ -25,7 +25,8 @@ bin.includes = META-INF/,\
plugin.xml,\
WEB-INF/lib/axis.jar,\
WEB-INF/lib/commons-discovery-0.5.jar,\
WEB-INF/lib/jsr311-api-1.1.jar
WEB-INF/lib/jsr311-api-1.1.jar,\
OSGI-INF/
src.includes = WEB-INF/classes/,\
WEB-INF/lib/,\
WEB-INF/web.xml,\