Merge development (10307) into zk7 (10294) branch

This commit is contained in:
Heng Sin Low 2014-04-09 10:47:51 +08:00
commit df81b807dc
84 changed files with 2722 additions and 196 deletions

View File

@ -0,0 +1,14 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 21, 2014 10:20:57 PM CET
-- IDEMPIERE-1845
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2014-03-21 22:20:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9448
;
-- Mar 21, 2014 10:20:59 PM CET
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2014-03-21 22:20:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202528
;
SELECT register_migration_script('201303212222_IDEMPIERE-1845.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 30, 2014 6:50:49 PM COT
-- IDEMPIERE-1864 Allow negative tax rate
UPDATE AD_Column SET ValueMin=NULL,Updated=TO_DATE('2014-03-30 18:50:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3693
;
SELECT register_migration_script('201403301851_IDEMPIERE-1864.sql') FROM dual
;

View File

@ -0,0 +1,14 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Apr 2, 2014 8:22:49 AM COT
-- IDEMPIERE-1834
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2014-04-02 08:22:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10900
;
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2014-04-02 08:22:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53438
;
SELECT register_migration_script('201404020823_IDEMPIERE-1834.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Apr 2, 2014 10:27:03 AM COT
-- IDEMPIERE-1717 Maintenance mode
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Updated,Created,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType) VALUES (200052,'C','N','Define if the system is in manteinance mode. Y = just advanced roles can log in / N = normal operation mode','636b9278-5633-4f92-9180-a2eb4f0674b1',TO_DATE('2014-04-02 10:27:02','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-04-02 10:27:02','YYYY-MM-DD HH24:MI:SS'),0,100,'Y',100,'SYSTEM_IN_MAINTENANCE_MODE',0,'D')
;
-- Apr 2, 2014 10:39:33 AM COT
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('E','System is in maintenance mode, please wait until the access is restored.',200268,'D','bc45a082-4784-46a8-b5a5-14874ed5ee69','SystemInMaintenance','Y',TO_DATE('2014-04-02 10:39:32','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2014-04-02 10:39:32','YYYY-MM-DD HH24:MI:SS'),0,0)
;
SELECT register_migration_script('201404021038_IDEMPIERE-1717.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Apr 2, 2014 2:46:52 PM COT
-- fix wrong length of PA_DashboardContent_Trl.Name
UPDATE AD_Column SET FieldLength=120,Updated=TO_DATE('2014-04-02 14:46:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60126
;
-- Apr 2, 2014 2:46:54 PM COT
ALTER TABLE PA_DashboardContent_Trl MODIFY Name NVARCHAR2(120)
;
SELECT register_migration_script('201404021448_IDEMPIERE-1216.sql') FROM dual
;

View File

@ -0,0 +1,167 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- 7/04/2014 09:21:13 PM CEST
-- IDEMPIERE-1853 Accounting Schema Default
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:21:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3455
;
-- 7/04/2014 09:21:15 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY V_Liability_Services_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:21:15 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY V_Liability_Services_Acct NULL
;
-- 7/04/2014 09:21:15 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_vliabilityservices_cschemad
;
-- 7/04/2014 09:21:16 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_vliabilityservices_cschemad FOREIGN KEY (V_Liability_Services_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:24:14 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:24:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4872
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY UnEarnedRevenue_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY UnEarnedRevenue_Acct NULL
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_unearnedrevenue_cschemadefa
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_unearnedrevenue_cschemadefa FOREIGN KEY (UnEarnedRevenue_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:24:46 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:24:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5206
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Asset_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Asset_Acct NULL
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbasset_cschemadefault
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbasset_cschemadefault FOREIGN KEY (CB_Asset_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:05 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:25:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6493
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_CashTransfer_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_CashTransfer_Acct NULL
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbcashtransfer_cschemadefau
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbcashtransfer_cschemadefau FOREIGN KEY (CB_CashTransfer_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:23 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:25:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5207
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Differences_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Differences_Acct NULL
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbdifferences_cschemadefaul
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbdifferences_cschemadefaul FOREIGN KEY (CB_Differences_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:43 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:25:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5208
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Expense_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Expense_Acct NULL
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbexpense_cschemadefault
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbexpense_cschemadefault FOREIGN KEY (CB_Expense_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:26:02 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:26:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5209
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Receipt_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY CB_Receipt_Acct NULL
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbreceipt_cschemadefault
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbreceipt_cschemadefault FOREIGN KEY (CB_Receipt_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:26:34 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2014-04-07 21:26:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14430
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY C_Receivable_Services_Acct NUMBER(10) DEFAULT NULL
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default MODIFY C_Receivable_Services_Acct NULL
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT creceivableservices_cacctschem
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT creceivableservices_cacctschem FOREIGN KEY (C_Receivable_Services_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
SELECT register_migration_script('201404071427_IDEMPIERE-1853.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
-- Mar 21, 2014 10:20:57 PM CET
-- IDEMPIERE-1845
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2014-03-21 22:20:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9448
;
-- Mar 21, 2014 10:20:59 PM CET
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2014-03-21 22:20:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202528
;
SELECT register_migration_script('201303212222_IDEMPIERE-1845.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- Mar 30, 2014 6:50:49 PM COT
-- IDEMPIERE-1864 Allow negative tax rate
UPDATE AD_Column SET ValueMin=NULL,Updated=TO_TIMESTAMP('2014-03-30 18:50:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3693
;
SELECT register_migration_script('201403301851_IDEMPIERE-1864.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
-- Apr 2, 2014 8:22:49 AM COT
-- IDEMPIERE-1834
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2014-04-02 08:22:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10900
;
UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2014-04-02 08:22:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53438
;
SELECT register_migration_script('201404020823_IDEMPIERE-1834.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- Apr 2, 2014 10:27:03 AM COT
-- IDEMPIERE-1717 Maintenance mode
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Updated,Created,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType) VALUES (200052,'C','N','Define if the system is in manteinance mode. Y = just advanced roles can log in / N = normal operation mode','636b9278-5633-4f92-9180-a2eb4f0674b1',TO_TIMESTAMP('2014-04-02 10:27:02','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-04-02 10:27:02','YYYY-MM-DD HH24:MI:SS'),0,100,'Y',100,'SYSTEM_IN_MAINTENANCE_MODE',0,'D')
;
-- Apr 2, 2014 10:39:33 AM COT
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('E','System is in maintenance mode, please wait until the access is restored.',200268,'D','bc45a082-4784-46a8-b5a5-14874ed5ee69','SystemInMaintenance','Y',TO_TIMESTAMP('2014-04-02 10:39:32','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2014-04-02 10:39:32','YYYY-MM-DD HH24:MI:SS'),0,0)
;
SELECT register_migration_script('201404021038_IDEMPIERE-1717.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- Apr 2, 2014 2:46:52 PM COT
-- fix wrong length of PA_DashboardContent_Trl.Name
UPDATE AD_Column SET FieldLength=120,Updated=TO_TIMESTAMP('2014-04-02 14:46:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60126
;
-- Apr 2, 2014 2:46:54 PM COT
INSERT INTO t_alter_column values('pa_dashboardcontent_trl','Name','VARCHAR(120)',null,null)
;
SELECT register_migration_script('201404021448_IDEMPIERE-1216.sql') FROM dual
;

View File

@ -0,0 +1,164 @@
-- 7/04/2014 09:21:13 PM CEST
-- IDEMPIERE-1853 Accounting Schema Default
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:21:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3455
;
-- 7/04/2014 09:21:15 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','V_Liability_Services_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:21:15 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','V_Liability_Services_Acct',null,'NULL',null)
;
-- 7/04/2014 09:21:15 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_vliabilityservices_cschemad
;
-- 7/04/2014 09:21:16 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_vliabilityservices_cschemad FOREIGN KEY (V_Liability_Services_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:24:14 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:24:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4872
;
-- 7/04/2014 09:24:16 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','UnEarnedRevenue_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:24:16 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','UnEarnedRevenue_Acct',null,'NULL',null)
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_unearnedrevenue_cschemadefa
;
-- 7/04/2014 09:24:16 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_unearnedrevenue_cschemadefa FOREIGN KEY (UnEarnedRevenue_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:24:46 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:24:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5206
;
-- 7/04/2014 09:24:48 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Asset_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:24:48 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Asset_Acct',null,'NULL',null)
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbasset_cschemadefault
;
-- 7/04/2014 09:24:48 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbasset_cschemadefault FOREIGN KEY (CB_Asset_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:05 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:25:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6493
;
-- 7/04/2014 09:25:08 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_CashTransfer_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:25:08 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_CashTransfer_Acct',null,'NULL',null)
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbcashtransfer_cschemadefau
;
-- 7/04/2014 09:25:08 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbcashtransfer_cschemadefau FOREIGN KEY (CB_CashTransfer_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:23 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:25:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5207
;
-- 7/04/2014 09:25:28 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Differences_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:25:28 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Differences_Acct',null,'NULL',null)
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbdifferences_cschemadefaul
;
-- 7/04/2014 09:25:28 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbdifferences_cschemadefaul FOREIGN KEY (CB_Differences_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:25:43 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:25:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5208
;
-- 7/04/2014 09:25:46 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Expense_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:25:46 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Expense_Acct',null,'NULL',null)
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbexpense_cschemadefault
;
-- 7/04/2014 09:25:46 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbexpense_cschemadefault FOREIGN KEY (CB_Expense_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:26:02 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:26:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5209
;
-- 7/04/2014 09:26:05 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Receipt_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:26:05 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','CB_Receipt_Acct',null,'NULL',null)
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT vc_cbreceipt_cschemadefault
;
-- 7/04/2014 09:26:05 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT vc_cbreceipt_cschemadefault FOREIGN KEY (CB_Receipt_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
-- 7/04/2014 09:26:34 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2014-04-07 21:26:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14430
;
-- 7/04/2014 09:26:36 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','C_Receivable_Services_Acct','NUMERIC(10)',null,'NULL')
;
-- 7/04/2014 09:26:36 PM CEST
INSERT INTO t_alter_column values('c_acctschema_default','C_Receivable_Services_Acct',null,'NULL',null)
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default DROP CONSTRAINT creceivableservices_cacctschem
;
-- 7/04/2014 09:26:36 PM CEST
ALTER TABLE C_AcctSchema_Default ADD CONSTRAINT creceivableservices_cacctschem FOREIGN KEY (C_Receivable_Services_Acct) REFERENCES c_validcombination(c_validcombination_id) DEFERRABLE INITIALLY DEFERRED
;
SELECT register_migration_script('201404071427_IDEMPIERE-1853.sql') FROM dual
;

View File

@ -0,0 +1,35 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Nov 27, 2013 10:35:14 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,EntityType,IsEncrypted,AD_Element_ID,AD_Client_ID,IsSecure) VALUES (0,'N',0,282,210890,'N','N','Y',0,'N',60,'Y',10,'N','N','Y','4f66cceb-27a2-47b8-a1ef-0bc2882bfdef','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',100,TO_DATE('2013-11-27 10:35:12','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-11-27 10:35:12','YYYY-MM-DD HH24:MI:SS'),100,'N','N','D','N',469,0,'N')
;
-- Nov 27, 2013 10:35:20 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
ALTER TABLE AD_PInstance ADD Name NVARCHAR2(60) DEFAULT NULL
;
-- Nov 27, 2013 10:36:46 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Last Run',200240,'D','fd39a4cd-eb0a-4b35-97ae-cbd4657d8234','LastRun','Y',TO_DATE('2013-11-27 10:36:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-11-27 10:36:45','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Nov 27, 2013 10:37:01 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Saved Parameters',200241,'D','f1688973-03c3-4af4-9b76-a0cec366ec41','SavedParameter','Y',TO_DATE('2013-11-27 10:37:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-11-27 10:37:00','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Nov 27, 2013 10:47:53 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Could not save parameters.',200242,'D','d07376af-ab08-4835-a962-9f5addc8dedc','SaveParameterError','Y',TO_DATE('2013-11-27 10:47:52','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-11-27 10:47:52','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Mar 28, 2014 12:23:30 PM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,AD_SysConfig_UU,Created,Updated,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType) VALUES (200046,'C','5','9b2426cb-b513-4199-b835-016cbc34a24f',TO_DATE('2014-03-28 12:23:23','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-03-28 12:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,'Y',100,'LASTRUN_RECORD_COUNT',0,'D')
;
SELECT register_migration_script('201404040826_IDEMPIERE-1572.sql') FROM dual
;

View File

@ -0,0 +1,32 @@
-- Nov 27, 2013 10:35:14 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,EntityType,IsEncrypted,AD_Element_ID,AD_Client_ID,IsSecure) VALUES (0,'N',0,282,210890,'N','N','Y',0,'N',60,'Y',10,'N','N','Y','4f66cceb-27a2-47b8-a1ef-0bc2882bfdef','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',100,TO_TIMESTAMP('2013-11-27 10:35:12','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-11-27 10:35:12','YYYY-MM-DD HH24:MI:SS'),100,'N','N','D','N',469,0,'N')
;
-- Nov 27, 2013 10:35:20 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
ALTER TABLE AD_PInstance ADD COLUMN Name VARCHAR(60) DEFAULT NULL
;
-- Nov 27, 2013 10:36:46 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Last Run',200240,'D','fd39a4cd-eb0a-4b35-97ae-cbd4657d8234','LastRun','Y',TO_TIMESTAMP('2013-11-27 10:36:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-11-27 10:36:45','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Nov 27, 2013 10:37:01 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Saved Parameters',200241,'D','f1688973-03c3-4af4-9b76-a0cec366ec41','SavedParameter','Y',TO_TIMESTAMP('2013-11-27 10:37:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-11-27 10:37:00','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Nov 27, 2013 10:47:53 AM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Could not save parameters.',200242,'D','d07376af-ab08-4835-a962-9f5addc8dedc','SaveParameterError','Y',TO_TIMESTAMP('2013-11-27 10:47:52','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-11-27 10:47:52','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Mar 28, 2014 12:23:30 PM IST
-- IDEMPIERE-1572: Last Run and Saved parameter for process
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,AD_SysConfig_UU,Created,Updated,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType) VALUES (200046,'C','5','9b2426cb-b513-4199-b835-016cbc34a24f',TO_TIMESTAMP('2014-03-28 12:23:23','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-03-28 12:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,'Y',100,'LASTRUN_RECORD_COUNT',0,'D')
;
SELECT register_migration_script('201404040826_IDEMPIERE-1572.sql') FROM dual
;

View File

@ -8,4 +8,5 @@ Require-Bundle: org.adempiere.base;bundle-version="2.0.0"
Eclipse-RegisterBuddy: org.adempiere.base
Service-Component: OSGI-INF/costadjustmentcalloutfactory.xml
Bundle-ActivationPolicy: lazy
Export-Package: org.compiere.model

View File

@ -108,8 +108,8 @@ public class CopyRole extends SvrProcess
sql.append(") ");
sql.append("SELECT ").append(m_AD_Client_ID)
.append(", ").append(m_AD_Org_ID)
.append(", getdate(), ").append(Env.getAD_User_ID(Env.getCtx()))
.append(", getdate(), ").append(Env.getAD_User_ID(Env.getCtx()))
.append(", SYSDATE, ").append(Env.getAD_User_ID(Env.getCtx()))
.append(", SYSDATE, ").append(Env.getAD_User_ID(Env.getCtx()))
.append(", ").append(m_AD_Role_ID_To)
.append(", ").append(keycolumn)
.append(", IsActive ");

View File

@ -769,8 +769,17 @@ public class GridField
{
// try timestamp format - then date format -- [ 1950305 ]
java.util.Date date = null;
SimpleDateFormat dateTimeFormat = DisplayType.getTimestampFormat_Default();
SimpleDateFormat dateFormat = DisplayType.getDateFormat_JDBC();
SimpleDateFormat timeFormat = DisplayType.getTimeFormat_Default();
try {
date = DisplayType.getTimestampFormat_Default().parse (value);
if (m_vo.displayType == DisplayType.Date) {
date = dateFormat.parse (value);
} else if (m_vo.displayType == DisplayType.Time) {
date = timeFormat.parse (value);
} else {
date = dateTimeFormat.parse (value);
}
} catch (java.text.ParseException e) {
date = DisplayType.getDateFormat_JDBC().parse (value);
}

View File

@ -161,6 +161,19 @@ public interface I_AD_PInstance
/** Get Processing */
public boolean isProcessing();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Record_ID */
public static final String COLUMNNAME_Record_ID = "Record_ID";

View File

@ -425,10 +425,10 @@ public class MLanguage extends X_AD_Language
StringBuilder keyColumn = new StringBuilder(baseTable).append("_ID");
StringBuilder insert = new StringBuilder("INSERT INTO ").append(tableName)
.append("(AD_Language,IsTranslated, AD_Client_ID,AD_Org_ID, ")
.append("Createdby,UpdatedBy, ")
.append("Createdby,UpdatedBy,Created,Updated, ")
.append(keyColumn).append(cols).append(") ")
.append("SELECT '").append(getAD_Language()).append("','N', AD_Client_ID,AD_Org_ID, ")
.append(AD_User_ID).append(",").append(AD_User_ID).append(", ")
.append(AD_User_ID).append(",").append(AD_User_ID).append(", SysDate, SysDate, ")
.append(keyColumn).append(cols)
.append(" FROM ").append(baseTable)
.append(" WHERE ").append(keyColumn).append(" NOT IN (SELECT ").append(keyColumn)

View File

@ -25,8 +25,10 @@ import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
* Process Instance Model
@ -40,11 +42,12 @@ import org.compiere.util.Env;
*/
public class MPInstance extends X_AD_PInstance
{
/**
*
*/
private static final long serialVersionUID = -3952972645135787655L;
/**
*
*/
private static final long serialVersionUID = -5848424269552679604L;
private static CLogger s_log = CLogger.getCLogger (MPInstance.class);
/**
* Standard Constructor
@ -130,6 +133,7 @@ public class MPInstance extends X_AD_PInstance
final String whereClause = "AD_PInstance_ID=?";
List <MPInstancePara> list = new Query(getCtx(), I_AD_PInstance_Para.Table_Name, whereClause, null) // @TODO: Review implications of using transaction
.setParameters(getAD_PInstance_ID())
.setOrderBy("SeqNo, ParameterName")
.list();
//
@ -349,4 +353,78 @@ public class MPInstance extends X_AD_PInstance
ip.saveEx();
return ip;
}
} // MPInstance
public static List<MPInstance> get(Properties ctx, int AD_Process_ID, int AD_User_ID) {
List<MPInstance> list = new ArrayList<MPInstance>();
List<String> paramsStrAdded = new ArrayList<String>();
List<MPInstance> namedInstances = new Query(ctx, Table_Name, "AD_Process_ID=? AND AD_User_ID=? AND Name IS NOT NULL", null)
.setClient_ID()
.setOnlyActiveRecords(true)
.setParameters(AD_Process_ID, AD_User_ID)
.setOrderBy("Name")
.list();
for (MPInstance namedInstance : namedInstances) {
list.add(namedInstance);
paramsStrAdded.add(namedInstance.getParamsStr());
}
// unnamed instances
int lastRunCount = MSysConfig.getIntValue("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 "
+ " WHERE AD_Process_ID=? AND AD_User_ID=? AND IsActive='Y' AND AD_Client_ID=? AND Name IS NULL"
+ " ORDER BY Created DESC";
PreparedStatement pstmt = null;
ResultSet rs = null;
int cnt = 0;
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, AD_Process_ID);
pstmt.setInt(2, AD_User_ID);
pstmt.setInt(3, Env.getAD_Client_ID(ctx));
rs = pstmt.executeQuery();
while (rs.next()) {
MPInstance unnamedInstance = new MPInstance(ctx, rs, null);
String paramsStr = unnamedInstance.getParamsStr();
if (! paramsStrAdded.contains(paramsStr)) {
unnamedInstance.setName(Msg.getMsg(ctx, "LastRun") + " " + unnamedInstance.getCreated());
list.add(unnamedInstance);
paramsStrAdded.add(paramsStr);
cnt++;
if (cnt == lastRunCount)
break;
}
}
} catch (Exception e)
{
s_log.log(Level.SEVERE, "Error while Fetching last run records", e);
} finally {
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
}
return list;
}
private String getParamsStr() {
StringBuilder cksum = new StringBuilder();
for (MPInstancePara ip : getParameters()) {
cksum.append("(")
.append(ip.getParameterName()).append("|")
.append(ip.getP_String()).append("|")
.append(ip.getP_String_To()).append("|")
.append(ip.getP_Number()).append("|")
.append(ip.getP_Number_To()).append("|")
.append(ip.getP_Date()).append("|")
.append(ip.getP_Date_To()).append("|")
.append(ip.getInfo()).append("|")
.append(ip.getInfo_To()).append("|")
.append(")");
}
return cksum.toString();
}
} // MPInstance

View File

@ -188,27 +188,24 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
ps.saveEx();
return psc;
} // createForPayment
/**************************************************************************
* Get Checks of Payment Selection
* Get Checks of Payment Selection without check no assignment
*
* @param C_PaySelection_ID Payment Selection
* @param PaymentRule Payment Rule
* @param startDocumentNo start document no
* @param trxName transaction
* @return array of checks
*/
static public MPaySelectionCheck[] get (int C_PaySelection_ID,
String PaymentRule, int startDocumentNo, String trxName)
public static MPaySelectionCheck[] get (int C_PaySelection_ID, String PaymentRule, String trxName)
{
if (s_log.isLoggable(Level.FINE)) s_log.fine("C_PaySelection_ID=" + C_PaySelection_ID
+ ", PaymentRule=" + PaymentRule + ", startDocumentNo=" + startDocumentNo);
+ ", PaymentRule=" + PaymentRule);
ArrayList<MPaySelectionCheck> list = new ArrayList<MPaySelectionCheck>();
int docNo = startDocumentNo;
String sql = "SELECT * FROM C_PaySelectionCheck "
+ "WHERE C_PaySelection_ID=? AND PaymentRule=?";
+ "WHERE C_PaySelection_ID=? AND PaymentRule=? "
+ "ORDER BY C_PaySelectionCheck_ID"; // order by the C_PaySelectionCheck_ID
PreparedStatement pstmt = null;
ResultSet rs = null;
try
@ -220,9 +217,6 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
while (rs.next())
{
MPaySelectionCheck check = new MPaySelectionCheck (Env.getCtx(), rs, trxName);
// Set new Check Document No
check.setDocumentNo(String.valueOf(docNo++));
check.saveEx();
list.add(check);
}
}
@ -243,6 +237,122 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
} // get
/**************************************************************************
* Get Checks of Payment Selection
*
* @param C_PaySelection_ID Payment Selection
* @param PaymentRule Payment Rule
* @param startDocumentNo start document no
* @param trxName transaction
* @return array of checks
*/
static public MPaySelectionCheck[] get (int C_PaySelection_ID,
String PaymentRule, int startDocumentNo, String trxName)
{
MPaySelectionCheck[] checks = get(C_PaySelection_ID, PaymentRule, trxName);
int docNo = startDocumentNo;
for (MPaySelectionCheck check : checks)
{
// Set new Check Document No
check.setDocumentNo(String.valueOf(docNo++));
check.saveEx();
}
return checks;
} // get
/**************************************************************************
* Confirm Print for a payment selection check
* Create Payment the first time
* @param check check
* @param batch batch
*/
public static void confirmPrint (MPaySelectionCheck check, MPaymentBatch batch)
{
MPayment payment = new MPayment(check.getCtx(), check.getC_Payment_ID(), check.get_TrxName());
// Existing Payment
if (check.getC_Payment_ID() != 0)
{
// Update check number
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
{
payment.setCheckNo(check.getDocumentNo());
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
}
}
else // New Payment
{
payment = new MPayment(check.getCtx(), 0, check.get_TrxName());
payment.setAD_Org_ID(check.getAD_Org_ID());
//
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
payment.setBankCheck (check.getParent().getC_BankAccount_ID(), false, check.getDocumentNo());
else if (check.getPaymentRule().equals(PAYMENTRULE_CreditCard))
payment.setTenderType(X_C_Payment.TENDERTYPE_CreditCard);
else if (check.getPaymentRule().equals(PAYMENTRULE_DirectDeposit)
|| check.getPaymentRule().equals(PAYMENTRULE_DirectDebit))
payment.setBankACH(check);
else
{
s_log.log(Level.SEVERE, "Unsupported Payment Rule=" + check.getPaymentRule());
return;
}
payment.setTrxType(X_C_Payment.TRXTYPE_CreditPayment);
payment.setAmount(check.getParent().getC_Currency_ID(), check.getPayAmt());
payment.setDiscountAmt(check.getDiscountAmt());
payment.setDateTrx(check.getParent().getPayDate());
payment.setDateAcct(payment.getDateTrx()); // globalqss [ 2030685 ]
payment.setC_BPartner_ID(check.getC_BPartner_ID());
// Link to Batch
if (batch != null)
{
if (batch.getC_PaymentBatch_ID() == 0)
batch.saveEx(); // new
payment.setC_PaymentBatch_ID(batch.getC_PaymentBatch_ID());
}
// Link to Invoice
MPaySelectionLine[] psls = check.getPaySelectionLines(false);
if (s_log.isLoggable(Level.FINE)) s_log.fine("confirmPrint - " + check + " (#SelectionLines=" + psls.length + ")");
if (check.getQty() == 1 && psls != null && psls.length == 1)
{
MPaySelectionLine psl = psls[0];
if (s_log.isLoggable(Level.FINE)) s_log.fine("Map to Invoice " + psl);
//
payment.setC_Invoice_ID (psl.getC_Invoice_ID());
payment.setDiscountAmt (psl.getDiscountAmt());
payment.setWriteOffAmt(psl.getDifferenceAmt());
BigDecimal overUnder = psl.getOpenAmt().subtract(psl.getPayAmt())
.subtract(psl.getDiscountAmt()).subtract(psl.getDifferenceAmt());
payment.setOverUnderAmt(overUnder);
}
else
payment.setDiscountAmt(Env.ZERO);
payment.setWriteOffAmt(Env.ZERO);
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
//
int C_Payment_ID = payment.get_ID();
if (C_Payment_ID < 1)
s_log.log(Level.SEVERE, "Payment not created=" + check);
else
{
check.setC_Payment_ID (C_Payment_ID);
check.saveEx(); // Payment process needs it
// added AdempiereException by zuhri
if (!payment.processIt(DocAction.ACTION_Complete))
throw new AdempiereException("Failed when processing document - " + payment.getProcessMsg());
// end added
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
}
} // new Payment
check.setIsPrinted(true);
check.setProcessed(true);
if (!check.save ())
s_log.log(Level.SEVERE, "Check not saved: " + check);
} // confirmPrint
/**************************************************************************
* Confirm Print.
* Create Payments the first time
@ -256,85 +366,8 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
for (int i = 0; i < checks.length; i++)
{
MPaySelectionCheck check = checks[i];
MPayment payment = new MPayment(check.getCtx(), check.getC_Payment_ID(), check.get_TrxName());
// Existing Payment
if (check.getC_Payment_ID() != 0)
{
// Update check number
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
{
payment.setCheckNo(check.getDocumentNo());
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
}
}
else // New Payment
{
payment = new MPayment(check.getCtx(), 0, check.get_TrxName());
payment.setAD_Org_ID(check.getAD_Org_ID());
//
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
payment.setBankCheck (check.getParent().getC_BankAccount_ID(), false, check.getDocumentNo());
else if (check.getPaymentRule().equals(PAYMENTRULE_CreditCard))
payment.setTenderType(X_C_Payment.TENDERTYPE_CreditCard);
else if (check.getPaymentRule().equals(PAYMENTRULE_DirectDeposit)
|| check.getPaymentRule().equals(PAYMENTRULE_DirectDebit))
payment.setBankACH(check);
else
{
s_log.log(Level.SEVERE, "Unsupported Payment Rule=" + check.getPaymentRule());
continue;
}
payment.setTrxType(X_C_Payment.TRXTYPE_CreditPayment);
payment.setAmount(check.getParent().getC_Currency_ID(), check.getPayAmt());
payment.setDiscountAmt(check.getDiscountAmt());
payment.setDateTrx(check.getParent().getPayDate());
payment.setDateAcct(payment.getDateTrx()); // globalqss [ 2030685 ]
payment.setC_BPartner_ID(check.getC_BPartner_ID());
// Link to Batch
if (batch != null)
{
if (batch.getC_PaymentBatch_ID() == 0)
batch.saveEx(); // new
payment.setC_PaymentBatch_ID(batch.getC_PaymentBatch_ID());
}
// Link to Invoice
MPaySelectionLine[] psls = check.getPaySelectionLines(false);
if (s_log.isLoggable(Level.FINE)) s_log.fine("confirmPrint - " + check + " (#SelectionLines=" + psls.length + ")");
if (check.getQty() == 1 && psls != null && psls.length == 1)
{
MPaySelectionLine psl = psls[0];
if (s_log.isLoggable(Level.FINE)) s_log.fine("Map to Invoice " + psl);
//
payment.setC_Invoice_ID (psl.getC_Invoice_ID());
payment.setDiscountAmt (psl.getDiscountAmt());
payment.setWriteOffAmt(psl.getDifferenceAmt());
BigDecimal overUnder = psl.getOpenAmt().subtract(psl.getPayAmt())
.subtract(psl.getDiscountAmt()).subtract(psl.getDifferenceAmt());
payment.setOverUnderAmt(overUnder);
}
else
payment.setDiscountAmt(Env.ZERO);
payment.setWriteOffAmt(Env.ZERO);
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
//
int C_Payment_ID = payment.get_ID();
if (C_Payment_ID < 1)
s_log.log(Level.SEVERE, "Payment not created=" + check);
else
{
check.setC_Payment_ID (C_Payment_ID);
check.saveEx(); // Payment process needs it
// added AdempiereException by zuhri
if (!payment.processIt(DocAction.ACTION_Complete))
throw new AdempiereException("Failed when processing document - " + payment.getProcessMsg());
// end added
if (!payment.save())
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
}
} // new Payment
confirmPrint(check, batch);
// Get Check Document No
try
{
@ -346,10 +379,6 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
{
s_log.log(Level.SEVERE, "DocumentNo=" + check.getDocumentNo(), ex);
}
check.setIsPrinted(true);
check.setProcessed(true);
if (!check.save ())
s_log.log(Level.SEVERE, "Check not saved: " + check);
} // all checks
if (s_log.isLoggable(Level.FINE)) s_log.fine("Last Document No = " + lastDocumentNo);

View File

@ -2778,9 +2778,10 @@ public final class MRole extends X_AD_Role
+" SELECT 1 FROM AD_User_Roles ur"
+" INNER JOIN AD_User_Substitute us ON (us.AD_User_ID=ur.AD_User_ID)"
+" WHERE ur.AD_Role_ID=AD_Role.AD_Role_ID AND ur.IsActive='Y' AND us.IsActive='Y'"
+" AND (us.ValidFrom IS NULL OR us.ValidFrom <= getdate())"
+" AND (us.ValidTo IS NULL OR us.ValidTo >= getdate())"
+" AND (us.ValidFrom IS NULL OR us.ValidFrom <= SYSDATE)"
+" AND (us.ValidTo IS NULL OR us.ValidTo >= SYSDATE)"
+" AND us.Substitute_ID=?)";
List<MRole> list = new Query(getCtx(), Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{AD_User_ID})
.setClient_ID()

View File

@ -21,6 +21,7 @@ import java.util.List;
import java.util.Properties;
import org.compiere.util.CLogger;
import org.compiere.util.Msg;
/**
* User Roles Model
@ -33,8 +34,7 @@ public class MUserRoles extends X_AD_User_Roles
/**
*
*/
private static final long serialVersionUID = -2659323298844769713L;
private static final long serialVersionUID = 5850010835736994376L;
/**
* Get User Roles Of Role
@ -133,4 +133,38 @@ public class MUserRoles extends X_AD_User_Roles
set_ValueNoCheck ("AD_Role_ID", new Integer(AD_Role_ID));
} // setAD_Role_ID
@Override
protected boolean beforeSave(boolean newRecord) {
// IDEMPIERE-1410
if (! MRole.getDefault().isAccessAdvanced()) {
MRole role = new MRole(getCtx(), getAD_Role_ID(), get_TrxName());
if (role.isAccessAdvanced()) {
log.saveError("Error", Msg.getMsg(getCtx(), "ActionNotAllowedHere"));
return false;
}
if (! newRecord && is_ValueChanged(COLUMNNAME_AD_Role_ID)) {
MRole oldrole = new MRole(getCtx(), get_ValueOldAsInt(COLUMNNAME_AD_Role_ID), get_TrxName());
if (oldrole.isAccessAdvanced()) {
log.saveError("Error", Msg.getMsg(getCtx(), "ActionNotAllowedHere"));
return false;
}
}
}
return true;
}
@Override
protected boolean beforeDelete() {
// IDEMPIERE-1410
if (! MRole.getDefault().isAccessAdvanced()) {
MRole role = new MRole(getCtx(), getAD_Role_ID(), get_TrxName());
if (role.isAccessAdvanced()) {
log.saveError("Error", Msg.getMsg(getCtx(), "ActionNotAllowedHere"));
return false;
}
}
return true;
}
} // MUserRoles

View File

@ -30,7 +30,7 @@ public class X_AD_PInstance extends PO implements I_AD_PInstance, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20131031L;
private static final long serialVersionUID = 20140404L;
/** Standard Constructor */
public X_AD_PInstance (Properties ctx, int AD_PInstance_ID, String trxName)
@ -209,6 +209,23 @@ public class X_AD_PInstance extends PO implements I_AD_PInstance, I_Persistent
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Record ID.
@param Record_ID
Direct internal record ID

View File

@ -768,7 +768,14 @@ public class Login
{
log.severe("Refused: " + error);
return error;
}
}
// IDEMPIERE-1717 Maintenance mode
if (! MRole.get(m_ctx, AD_Role_ID).isAccessAdvanced()) {
if (MSysConfig.getBooleanValue("SYSTEM_IN_MAINTENANCE_MODE", false, AD_Client_ID))
return Msg.getMsg(m_ctx, "SystemInMaintenance");
}
return null;
} // validateLogin

View File

@ -2,9 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ADempiere - Smart Open Source ERP Software with integrated CRM Solution</title>
<meta name="author" content="ADempiere">
<meta name="copyright" content="Copyright 2010, ADempiere">
<title>iDempiere - Smart Open Source ERP Software with integrated CRM Solution</title>
<meta name="author" content="iDempiere">
<meta name="copyright" content="Copyright 2010, iDempiere">
<meta name="rating" content="GENERAL">
<link rel="stylesheet" href="images/adempiere_disc.css" type="text/css" media="screen">
<link rel="stylesheet" href="images/adempiere_print.css" type="text/css" media="print">
@ -41,8 +41,8 @@ function MM_swapImage() { //v3.0
<!-- begin masthead -->
<div id="masthead">
<div id="header">
<div id="logoHeader"><a href="http://www.adempiere.org" target="_blank"><img src="images/adempiere_5a.jpg" width="760" height="94" border="0" /></a></div>
<div id="topNav" class='noPrint'><a href="http://www.adempiere.com/index.php?option=com_contact&Itemid=3" class="alttoplink" target="_blank">Contact
<div id="logoHeader"><a href="http://www.idempiere.org" target="_blank"><img src="images/idempiere_5a.jpg" width="760" height="94" border="0" /></a></div>
<div id="topNav" class='noPrint'><a href="http://www.idempiere.com/index.php?option=com_contact&Itemid=3" class="alttoplink" target="_blank">Contact
Us</a></div>
</div>
</div>
@ -50,42 +50,41 @@ function MM_swapImage() { //v3.0
<!-- end masthead -->
<div id="fullcontent">
<div class="story">
<h1 id="pageName"><img src="images/InstallSteps.gif" alt="Install Steps" width="237" height="667" align="right" />ADempiere
<h1 id="pageName"><img src="images/InstallSteps.gif" alt="Install Steps" width="237" height="667" align="right" />iDempiere
Server Installation </h1>
<img src="images/hr.jpg" name="pageNameimg" width="350" height="2" id="pageNameimg"/>
<p>Please check the more detailed page on <a href="http://www.adempiere.com/wiki/index.php" target="i">ADempiere Wiki<br />
</a>for the latest version and help from ADempiere Partners.</p>
<p>Please check the more detailed page on <a href="http://wiki.idempiere.org" target="i">iDempiere Wiki<br />
</a>for the latest version and help from iDempiere Partners.</p>
<p><a href="license.html">License information</a></p>
<p>&nbsp;</p>
<h2 id="storyTitle2">Prerequisites</h2>
<ol>
<li>Download and install <a href="http://java.sun.com/j2se/1.5.0/download.html" target="sun">Sun Java 1.5.0 SDK</a> (not just JRE)</li>
<li><a href="http://adempiere.com/wiki/index.php/ADempiere_Installing" target="ora">Install
<li>Download and install <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" target="sun">Oracle Java 7 SDK</a> (not just JRE)</li>
<li><a href="http://wiki.idempiere.org/en/Install_Database" target="ora">Install
Database</a> (Oracle 10g free download for development, Oracle 10gXE,
PostgreSQL)</li>
<li>You downloaded ADempiere </li>
<li>You downloaded iDempiere </li>
</ol>
<h2 id="storyTitle2">Installation</h2>
<ol>
<li><a href="http://www.adempiere.com/wiki/index.php/InstallServer" target="i">Install ADempiere Server</a></li>
<li><a href="http://adempiere.com/wiki/index.php/CreateDatabase" target="i">Create ADempiere Database</a></li>
<li><a href="http://www.adempiere.com/wiki/index.php/InstallComplete" target="i">Complete ADempiere Server Install</a></li>
<li><a href="http://wiki.idempiere.org/en/Install_Server" target="i">Install iDempiere Server</a></li>
<li><a href="http://wiki.idempiere.org/en/Create_Database" target="i">Create iDempiere Database</a></li>
<li><a href="http://wiki.idempiere.org/enInstall_Complete" target="i">Complete iDempiere Server Install</a></li>
</ol>
<h2 id="storyTitle1">Client Installation</h2>
<ol>
<li>Download and install <a href="http://java.sun.com/j2se/1.5.0/download.html" target="sun">Sun Java 1.5.0 JRE</a></li>
<li>Download and install <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" target="sun">Oracle Java 7 JRE</a></li>
<li>Point your browser to your application server - options -
<ol>
<li>Start the client with WebStart</li>
<li>Download and extract the file AdempiereClient.zip </li>
<li>Download and extract the idempiere client</li>
</ol>
</li>
</ol>
<p><a href="http://www.adempiere.com/wiki/index.php/InstallClient" target="i">ADempiere Application Client Install Details</a>.</p>
<p><a href="http://wiki.idempiere.org/en/Install_Client" target="i">iDempiere Application Client Install Details</a>.</p>
<h2 id="storyTitle1">Installing Language Packs</h2>
<p>Please check the <a href="http://sourceforge.net/project/showfiles.php?group_id=176962">Download
<p>Please check the <a href="http://wiki.idempiere.org/en/Translations">Translations
Project Page</a> for the availability of Language Packs. You find the
installation details <a href="http://www.adempiere.com/wiki/index.php/Language_Pack_Installation">here</a>.<br>
installation details <a href="http://wiki.idempiere.org/en/Language_Pack_Installation">here</a>.<br>
</p>
</div>
</div>
@ -94,8 +93,8 @@ function MM_swapImage() { //v3.0
<tr>
<td height="38" align="center" valign="top">
<p class="style2"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">Copyright
&copy; 2010 ADempiere, Inc. - All rights reserved<br />
ADempiere&#153; is a registered trademark of ADempiere, Inc</font>
&copy; 2010 iDempiere, Inc. - All rights reserved<br />
iDempiere&#153; is a registered trademark of iDempiere, Inc</font>
</p>
</td>
</tr>

View File

@ -17,7 +17,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.service.http.port=8888 -Dosgi.compatibility.bootdelegation=true"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.service.http.port=8888 -Dosgi.compatibility.bootdelegation=true -XX:MaxPermSize=128M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.server.server_product"/>

View File

@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src/main/server"/>
<classpathentry kind="src" path="src/main/servlet"/>
<classpathentry kind="src" path="src/main/home"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/jardiff.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/jnlp-servlet.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

View File

@ -97,6 +97,6 @@
</user-data-constraint>
</security-constraint>
<welcome-file-list>
<welcome-file>idempiere.html</welcome-file>
<welcome-file>idempiere.jsp</welcome-file>
</welcome-file-list>
</web-app>

View File

@ -27,10 +27,13 @@ bin.includes = META-INF/,\
OSGI-INF/requestprocessorfactory.xml,\
OSGI-INF/schedulerfactory.xml,\
OSGI-INF/workflowprocessorfactory.xml,\
OSGI-INF/
OSGI-INF/,\
resources/,\
idempiere.jsp
output.. = build/classes/
source.. = src/main/server/,\
src/main/servlet/
src/main/servlet/,\
src/main/home/
bin.excludes = src/**,\
.settings/**,\
.classpath,\

View File

@ -2,12 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ADempiere Server Error</title>
<title>iDempiere Server Error</title>
<link href="/standard.css" rel="stylesheet"/>
</head>
<body>
<h1>ADempiere Server Error </h1>
<p>The ADempiere Server encountered a unrecoverable error.</p>
<h1>iDempiere Server Error </h1>
<p>The iDempiere Server encountered a unrecoverable error.</p>
<h2>Please notify the administrator.</h2>
</body>
</html>

View File

@ -0,0 +1,190 @@
<%@ page import="org.bmlaurus.home.Prop" %>
<!--
Theme Name: iDempiere Theme
Version: 2.0
Description: iDempiere Theme
Author: BMLaurus
Author URI: http://www.bmlaurus.com
-->
<html>
<% Prop.load(); %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="<%=Prop.loadCss()%>">
<script type="text/javascript" src="resources/jquery/jquery.js"></script>
<% if(Prop.isRssOn()){
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"http://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n");
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"resources/gfeedfetcher.js\"></script>");
}
%>
<title><%=Prop.getProperty(Prop.TITLE) %></title>
</head>
<body>
<div id="body" class="body">
<div id="toolBar" class="toolBar">
<div id="toolBar-title" class="toolBar-title">
<div id="credits" style="color:#336699;">
<%=Prop.getProperty(Prop.CREDITS_TXT)%>
</div>
<div class="left_div" id="title">
<p><%=Prop.getProperty(Prop.CLIENT_NAME)%></p>
</div>
</div>
<div id="toolBar-tools" class="toolBar-tools">
<a href="<%=Prop.getProperty(Prop.OPTION_LINK)%>" target="_blank">
<img name="img_option" src="<%=Prop.getImage("img_option.png")%>" border="0" title="<%=Prop.getProperty(Prop.OPTION_TEXT)%>"/>
</a>
<a id="felixConsole" href="<%=Prop.getProperty(Prop.FELIX_LINK)%>">
<img name="img_felix" src="<%=Prop.getImage("img_felix.png")%>" border="0" title="<%=Prop.getProperty(Prop.FELIX_TEXT)%>"/>
</a>
<a id="ServerManagement" href="<%=Prop.getProperty(Prop.MONITOR_LINK)%>">
<img name="img_idempiereMonitor" src="<%=Prop.getImage("img_idempiereMonitor.png")%>" border="0" title="<%=Prop.getProperty(Prop.MONITOR_TEXT)%>"/>
</a>
</div>
</div>
<div id ="main" class="main">
<div id="main-content" class="main-content">
<div id="main-topButtons">
<div id="main-requestBtns" class="topBtnHeader">
<div id ="main-requestBtns-btnReq" class="topBtn">
<div class = "btnResoc-content">
<a href="<%=Prop.getProperty(Prop.SUPPORT_LINK)%>" target="_blank">
<img name="img_locsupport" src="<%=Prop.getImage("img_locsupport.png")%>" border="0" title="<%=Prop.getProperty(Prop.LOCAL_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.LOCAL_TEXT)%></div>
</div>
</div>
<div id ="main-requestBtns-btnSendReq" class="topBtn">
<div class = "btnResoc-content">
<a href="<%=Prop.getProperty(Prop.RESOURCE_LINK)%>" target="_blank">
<img name="img_resource" src="<%=Prop.getImage("img_resource.png")%>" border="0" title="<%=Prop.getProperty(Prop.RESOURCE_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.RESOURCE_TEXT)%></div>
</div>
</div>
<div id ="main-requestBtns-btnLocSupp" class="topBtn">
<div class = "btnResoc-content">
<a href="<%=Prop.getProperty(Prop.WEBSTORE_LINK)%>" target="_blank">
<img name="img_webstore" src="<%=Prop.getImage("img_webstore.png")%>" border="0" title="<%=Prop.getProperty(Prop.WEBSTORE_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.WEBSTORE_TEXT)%></div>
</div>
</div>
<div id ="main-requestBtns-btnResoc" class="topBtn">
<div class = "btnResoc-content">
<a href="<%=Prop.getProperty(Prop.SENDREQUEST_LINK)%>" target="_blank">
<img name="img_sendreq" src="<%=Prop.getImage("img_sendreq.png")%>" border="0" title="<%=Prop.getProperty(Prop.SENDREQUEST_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.SENDREQUEST_TEXT)%></div>
</div>
</div>
</div>
</div>
<div id="main-rssContent">
<div id="rssfeed-wrap">
<script type="text/javascript">
<% if(Prop.isRssOn()) {
out.write("var newsfeed=new gfeedfetcher(\"rssfeeds\", \"rssfeedsclass\", \"_new\");\n");
out.write("newsfeed.displayoptions(\"label datetime snippet\");\n");
out.write("newsfeed.setentrycontainer(\"p\");\n");
out.write("newsfeed.filterfeed(20, \"date\");\n");
for(int i=1;i<=5;i++){
if(Prop.getProperty(Prop.RSS+i)!=null&&Prop.getProperty(Prop.RSS+i).length()>0){
out.write("newsfeed.addFeed(\""+Prop.getProperty(Prop.RSS+i+"Name")+"\",\""+Prop.getProperty(Prop.RSS+i)+"\");\n");
}
}
out.write("newsfeed.init();\n");
}
%>
</script>
<% if(Prop.isRssOn())
out.write("<p><a class=\"darklink\" href=\"javascript:newsfeed.init()\">"+Prop.getProperty(Prop.RSS_REFRESH)+"</a></p>");
%>
</div>
</div>
<div id="main-login" class="main-login">
<a href="<%=Prop.getProperty(Prop.WEBUI_LINK)%>" target="_self">
<img name="img_webui" src="<%=Prop.getImage("img_webui.png")%>" border="0" />
</a>
</div>
<div id="main-docuBtns">
<div id="main-docuBtns" class="topBtnFooter">
<div id ="main-docuBtns-btnIrc" class="bottomBtn">
<div class = "btnDocu-content">
<a href="<%=Prop.getProperty(Prop.IRC_LINK)%>" target="_blank">
<img name="img_irc" src="<%=Prop.getImage("img_irc.png")%>" border="0" title="<%=Prop.getProperty(Prop.IRC_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.IRC_TEXT)%></div>
</div>
</div>
<div id ="main-docuBtns-btnWiki" class="bottomBtn">
<div class = "btnDocu-content">
<a href="<%=Prop.getProperty(Prop.WIKI_LINK)%>" target="_blank">
<img name="img_wiki" src="<%=Prop.getImage("img_wiki.png")%>" border="0" title="<%=Prop.getProperty(Prop.WIKI_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.WIKI_TEXT)%></div>
</div>
</div>
<div id ="main-docuBtns-btnForum" class="bottomBtn">
<div class = "btnDocu-content">
<a href="<%=Prop.getProperty(Prop.FORUMS_LINK)%>" target="_blank">
<img name="img_forum" src="<%=Prop.getImage("img_forum.png")%>" border="0" title="<%=Prop.getProperty(Prop.FORUMS_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.FORUMS_TEXT)%></div>
</div>
</div>
<div id ="main-docuBtns-btnSuppReq" class="bottomBtn">
<div class = "btnDocu-content">
<a href="<%=Prop.getProperty(Prop.SUPPORTREQ_LINK)%>" target="_blank">
<img name="img_supreq" src="<%=Prop.getImage("img_supreq.png")%>" border="0" title="<%=Prop.getProperty(Prop.SUPPORTREQUEST_TEXT)%>"/>
</a>
<div class="main-txt-btn"><%=Prop.getProperty(Prop.SUPPORTREQUEST_TEXT)%></div>
</div>
</div>
</div>
</div>
<div id="main-background">
<img name="img_background" src="<%=Prop.getImage("img_back.png")%>" border="0"/>
</div>
</div>
</div>
<div id="foot" class="foot">
<div id="socialBar" class="socialBar">
<%if(!Prop.getProperty(Prop.SOC_FACEBOOK).equals("") && !Prop.getProperty(Prop.SOC_FACEBOOK).equals("NONE")){%>
<a id="facebook" href="<%=Prop.getProperty(Prop.SOC_FACEBOOK)%>" target="_blank">
<img name="img_facebook" src="<%=Prop.getImage("img_facebook.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_TWITTER).equals("") && !Prop.getProperty(Prop.SOC_TWITTER).equals("NONE")){%>
<a id="twitter" href="<%=Prop.getProperty(Prop.SOC_TWITTER)%>" target="_blank">
<img name="img_twitter" src="<%=Prop.getImage("img_twitter.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_LINKEDIN).equals("") && !Prop.getProperty(Prop.SOC_LINKEDIN).equals("NONE")){%>
<a id="linkedin" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
<img name="img_linkedin" src="<%=Prop.getImage("img_linkedin.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_GOOPLUS).equals("") && !Prop.getProperty(Prop.SOC_GOOPLUS).equals("NONE")){%>
<a id="google+" href="<%=Prop.getProperty(Prop.SOC_GOOPLUS)%>" target="_blank">
<img name="img_googleplus" src="<%=Prop.getImage("img_googleplus.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_5).equals("") && !Prop.getProperty(Prop.SOC_5).equals("NONE")){%>
<a id="soc5" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
<img name="img_soc5" src="<%=Prop.getImage("img_soc5.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_6).equals("") && !Prop.getProperty(Prop.SOC_6).equals("NONE")){%>
<a id="soc6" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
<img name="img_soc6" src="<%=Prop.getImage("img_soc6.png")%>" border="0"/>
</a>
<%} if(!Prop.getProperty(Prop.SOC_7).equals("") && !Prop.getProperty(Prop.SOC_7).equals("NONE")){%>
<a id="soc7" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
<img name="img_soc7" src="<%=Prop.getImage("img_soc7.png")%>" border="0"/>
</a>
<%}%>
</div>
<div id="footercopyright">
&copy; Copyright 2013-<%=Prop.getYear()%> iDempiere - All rights reserved - <a href="http://www.gnu.org/licenses/gpl-2.0.html" target="blank">iDempiere License is GPLv2</a>
<%=Prop.getProperty(Prop.COPYRIGHT_TXT)%>
</div>
</div>
</div>
</body>
</html>

View File

@ -6,8 +6,8 @@
</head>
<body>
<script language="JavaScript" type="text/javascript">
document.location='idempiere.html';
document.location='idempiere.jsp';
</script>
<p>Click <a href="idempiere.html">here</a> if not forwarded automatically</p>
<p>Click <a href="idempiere.jsp">here</a> if not forwarded automatically</p>
</body>
</html>

View File

@ -0,0 +1,119 @@
// -------------------------------------------------------------------
// gAjax RSS Feeds Displayer- By Dynamic Drive, available at: http://www.dynamicdrive.com
// Created: July 17th, 2007
// Updated June 14th, 10': Fixed issue in IE where labels would sometimes be associated with the incorrect feed items
// -------------------------------------------------------------------
var gfeedfetcher_loading_image="resources/indicator.gif" //Full URL to "loading" image. No need to config after this line!!
google.load("feeds", "1") //Load Google Ajax Feed API (version 1)
function gfeedfetcher(divid, divClass, linktarget){
this.linktarget=linktarget || "" //link target of RSS entries
this.feedlabels=[] //array holding lables for each RSS feed
this.feedurls=[]
this.feeds=[] //array holding combined RSS feeds' entries from Feed API (result.feed.entries)
this.feedsfetched=0 //number of feeds fetched
this.feedlimit=5
this.showoptions="" //Optional components of RSS entry to show (none by default)
this.sortstring="date" //sort by "date" by default
document.write('<div id="'+divid+'" class="'+divClass+'"></div>') //output div to contain RSS entries
this.feedcontainer=document.getElementById(divid)
this.itemcontainer="<li>" //default element wrapping around each RSS entry item
}
gfeedfetcher.prototype.addFeed=function(label, url){
this.feedlabels[this.feedlabels.length]=label
this.feedurls[this.feedurls.length]=url
}
gfeedfetcher.prototype.filterfeed=function(feedlimit, sortstr){
this.feedlimit=feedlimit
if (typeof sortstr!="undefined")
this.sortstring=sortstr
}
gfeedfetcher.prototype.displayoptions=function(parts){
this.showoptions=parts //set RSS entry options to show ("date, datetime, time, snippet, label, description")
}
gfeedfetcher.prototype.setentrycontainer=function(containerstr){ //set element that should wrap around each RSS entry item
this.itemcontainer="<"+containerstr.toLowerCase()+">"
}
gfeedfetcher.prototype.init=function(){
this.feedsfetched=0 //reset number of feeds fetched to 0 (in case init() is called more than once)
this.feeds=[] //reset feeds[] array to empty (in case init() is called more than once)
this.feedcontainer.innerHTML='<p><img src="'+gfeedfetcher_loading_image+'" /> Retrieving RSS feed(s)</p>'
var displayer=this
for (var i=0; i<this.feedurls.length; i++){ //loop through the specified RSS feeds' URLs
var feedpointer=new google.feeds.Feed(this.feedurls[i]) //create new instance of Google Ajax Feed API
var items_to_show=(this.feedlimit<=this.feedurls.length)? 1 : Math.floor(this.feedlimit/this.feedurls.length) //Calculate # of entries to show for each RSS feed
if (this.feedlimit%this.feedurls.length>0 && this.feedlimit>this.feedurls.length && i==this.feedurls.length-1) //If this is the last RSS feed, and feedlimit/feedurls.length yields a remainder
items_to_show+=(this.feedlimit%this.feedurls.length) //Add that remainder to the number of entries to show for last RSS feed
feedpointer.setNumEntries(items_to_show) //set number of items to display
feedpointer.load(function(label){
return function(r){
displayer._fetch_data_as_array(r, label)
}
}(this.feedlabels[i])) //call Feed.load() to retrieve and output RSS feed.
}
}
gfeedfetcher._formatdate=function(datestr, showoptions){
var itemdate=new Date(datestr)
var parseddate=(showoptions.indexOf("datetime")!=-1)? itemdate.toLocaleString() : (showoptions.indexOf("date")!=-1)? itemdate.toLocaleDateString() : (showoptions.indexOf("time")!=-1)? itemdate.toLocaleTimeString() : ""
return "<span class='datefield'>"+parseddate+"</span>"
}
gfeedfetcher._sortarray=function(arr, sortstr){
var sortstr=(sortstr=="label")? "ddlabel" : sortstr //change "label" string (if entered) to "ddlabel" instead, for internal use
if (sortstr=="title" || sortstr=="ddlabel"){ //sort array by "title" or "ddlabel" property of RSS feed entries[]
arr.sort(function(a,b){
var fielda=a[sortstr].toLowerCase()
var fieldb=b[sortstr].toLowerCase()
return (fielda<fieldb)? -1 : (fielda>fieldb)? 1 : 0
})
}
else{ //else, sort by "publishedDate" property (using error handling, as "publishedDate" may not be a valid date str if an error has occured while getting feed
try{
arr.sort(function(a,b){return new Date(b.publishedDate)-new Date(a.publishedDate)})
}
catch(err){}
}
}
gfeedfetcher.prototype._fetch_data_as_array=function(result, ddlabel){
var thisfeed=(!result.error)? result.feed.entries : "" //get all feed entries as a JSON array or "" if failed
if (thisfeed==""){ //if error has occured fetching feed
alert("Some blog posts could not be loaded: "+result.error.message)
}
for (var i=0; i<thisfeed.length; i++){ //For each entry within feed
result.feed.entries[i].ddlabel=ddlabel //extend it with a "ddlabel" property
}
this.feeds=this.feeds.concat(thisfeed) //add entry to array holding all feed entries
this._signaldownloadcomplete() //signal the retrieval of this feed as complete (and move on to next one if defined)
}
gfeedfetcher.prototype._signaldownloadcomplete=function(){
this.feedsfetched+=1
if (this.feedsfetched==this.feedurls.length) //if all feeds fetched
this._displayresult(this.feeds) //display results
}
gfeedfetcher.prototype._displayresult=function(feeds){
var rssoutput=(this.itemcontainer=="<li>")? "<ul>\n" : ""
gfeedfetcher._sortarray(feeds, this.sortstring)
for (var i=0; i<feeds.length; i++){
var itemtitle="<a rel=\"nofollow\" href=\"" + feeds[i].link + "\" target=\"" + this.linktarget + "\" class=\"titlefield\">" + feeds[i].title + "</a>"
var itemlabel=/label/i.test(this.showoptions)? '<span class="labelfield">['+this.feeds[i].ddlabel+']</span>' : " "
var itemdate=gfeedfetcher._formatdate(feeds[i].publishedDate, this.showoptions)
var itemdescription=/description/i.test(this.showoptions)? "<br />"+feeds[i].content : /snippet/i.test(this.showoptions)? "<br />"+feeds[i].contentSnippet : ""
rssoutput+=this.itemcontainer + itemtitle + " " + itemlabel + " " + itemdate + "\n" + itemdescription + this.itemcontainer.replace("<", "</") + "\n\n"
}
rssoutput+=(this.itemcontainer=="<li>")? "</ul>" : ""
this.feedcontainer.innerHTML=rssoutput
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,351 @@
/*
Theme Name: iDempiere Theme
Version: 2.0
Description: Black Template
Author: BMLaurus
Author URI: http://www.bmlaurus.com
*/
body{
background-color:#333333;
font-family: verdana;
color:#FFFFFF;
}
a{
color: #336699;
text-decoration: none;
}
div.body{
margin-top: 25px;
width: 800px;
display: block;
margin-left: auto;
margin-right: auto;
position: relative;
}
.toolBar{
width: 100%;
position: absolute;
background-color:#000000;
}
.toolBar-title{
margin-left: 10px;
float: left;
width: 50%;
}
.toolBar-tools {
bottom: 10px;
position: absolute;
right: 10px;
}
.toolBar-tools img{
filter:alpha(opacity=60);
opacity: 0.6;
}
.toolBar-tools img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
.main{
padding-top: 60px;
}
#main-background{
height: 95%;
position: absolute;
top: 0;
width: 100%;
z-index: -1000;
filter:alpha(opacity=60);
opacity: 0.6;
}
#main-background img{
height: 100%;
width: 100%;
}
.topBtnHeader{
overflow: hidden;
position: absolute;
top:50px;
}
.topBtnFooter{
overflow: hidden;
position: absolute;
top:262px;
}
.topBtn{
margin-left: 0px;
}
#main-requestBtns-btnReq{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-requestBtns-btnReq:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-requestBtns-btnSendReq{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-requestBtns-btnSendReq:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-requestBtns-btnLocSupp{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-requestBtns-btnLocSupp:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-requestBtns-btnResoc{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-requestBtns-btnResoc:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-docuBtns-btnIrc{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-docuBtns-btnIrc:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-docuBtns-btnWiki{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-docuBtns-btnWiki:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-docuBtns-btnForum{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-docuBtns-btnForum:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
#main-docuBtns-btnSuppReq{
overflow: hidden;
width: 70px;
height:53px;
filter:alpha(opacity=60);
opacity: 0.6;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#main-docuBtns-btnSuppReq:hover{
width: 181px;
height: 53px;
filter:alpha(opacity=100);
opacity: 1;
}
.btnDocu-content{
position: relative;
}
.btnResoc-content{
position: relative;
}
.main-txt-btn{
font-size: 9px;
left: 90px;
position: absolute;
top: 20px;
width: 100%;
cursor: pointer;
}
.main-content{
position: relative;
height: 550px;
}
.main-login{
bottom: 25px;
position: absolute;
right: 150px;
}
.main-login img{
filter:alpha(opacity=60);
opacity: 0.6;
}
.main-login img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
#main-rssContent{
position: absolute;
right: 50px;
top: 50px;
}
#credits{
font-size: 70%;
}
#foot{
background-color: #000000;
height: 50px;
position: absolute;
width: 100%;
margin-top: -28px;
}
#footercopyright{
font-size: 60%;
position: absolute;
right: 10px;
top: 20px;
}
#socialBar{
left: 10px;
top: 10px;
position: absolute;
}
#socialBar img{
height: 25px;
width: 25px;
filter:alpha(opacity=60);
opacity: 0.6;
}
#socialBar img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
/** RSS FEED **/
.labelfield{
color:gray;
font-size: 50%; }
.datefield{
color:gray;
font-size: 80%;}
#rssfeeds a{
color: #336699;
text-decoration: none;
font-weight: bold;
font-size: 90%;
}
#rssfeeds p{
margin-bottom: 2px;
text-decoration: none;
font-size: 90%;
}
code{
color: red;
}
#blogoolafeed, #blogoolafeed a {
color:white;
}
#blogoolafeed a:hover{
color:#8E7BD3;
}
#blogoolafeed ul {
margin-left:-15px
}
#rssfeed-wrap:hover {
opacity: 0.9;
filter:alpha(opacity=90);
}
#rssfeed-wrap {
font-size: 80%;
background-color: #CCCCCC;
border-radius: 15px;
color: #000000;
height: 340px;
opacity: 0.3;
overflow: scroll;
padding: 10px;
text-align: left;
width: 300px;
filter:alpha(opacity=30);
-moz-border-radius: 15px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,224 @@
/*
Theme Name: iDempiere Theme
Version: 2.0
Description: White Template
Author: BMLaurus
Author URI: http://www.bmlaurus.com
*/
body{
background-color:white;
font-family: verdana;
}
a{
color: #336699;
text-decoration: none;
}
div.body{
margin-top: 25px;
width: 810px;
display: block;
margin-left: auto;
margin-right: auto;
position: relative;
}
.toolBar{
width: 100%;
position: absolute;
}
.toolBar-title{
margin-left: 10px;
float: left;
width: 50%;
}
.toolBar-tools {
bottom: 10px;
position: absolute;
right: 10px;
}
.toolBar-tools img{
filter:alpha(opacity=80);
opacity: 0.8;
}
.toolBar-tools img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
.main{
padding-top: 70px;
}
#main-background{
height: 396px;
position: absolute;
top: 71px;
width: 810px;
z-index: -1000;
}
#main-background img{
height: 396px;
width: 810px;
}
.topBtnHeader{
overflow: hidden;
}
.topBtnFooter{
margin-top: 50px;
}
.topBtn{
border-top: 2px solid #59595B;
border-right: 2px solid #59595B;
float:left;
width: 200px;
height:70px;
}
.topBtn img{
padding-top: 10px;
width: 200px;
height: 50px;
filter:alpha(opacity=80);
opacity: 0.8;
}
.bottomBtn{
border-bottom: 2px solid #59595B;
border-right: 2px solid #59595B;
float:left;
width: 200px;
height:70px;
}
.bottomBtn img{
padding-top: 10px;
width: 200px;
height: 50px;
filter:alpha(opacity=80);
opacity: 0.8;
}
.topBtn img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
.main-content{
position: relative;
height: 550px;
}
.main-login{
bottom: 150px;
position: absolute;
right: 100px;
}
.main-login img{
filter:alpha(opacity=60);
opacity: 0.6;
}
.main-login img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
.btnDocu-content{
position: relative;
}
.btnResoc-content{
position: relative;
}
.main-txt-btn{
font-size: 11px;
left: 90px;
position: absolute;
top: 25px;
cursor: pointer;
z-index: -1000;
}
#main-requestBtns-btnReq{
-moz-border-top-left-radius: 15px;
border-top-left-radius: 15px;
border-left: 2px solid #59595B;
}
#main-requestBtns-btnResoc{
-moz-border-top-right-radius: 15px;
border-top-right-radius: 15px;
border-right: 2px solid #59595B;
}
#main-docuBtns-btnIrc{
-moz-border-bottom-left-radius: 15px;
border-bottom-left-radius: 15px;
border-left: 2px solid #59595B;
}
#main-docuBtns-btnSuppReq{
-moz-border-bottom-right-radius: 15px;
border-bottom-right-radius: 15px;
border-right: 2px solid #59595B;
}
#main-rssContent{
height: 320px;
padding-left: 25px;
padding-top: 25px;
}
#credits{
font-size: 70%;
}
.foot{
position: relative;
}
#footercopyright{
bottom: 10px;
font-size: 60%;
position: absolute;
right: 10px;
}
#socialBar{
margin-left: 10px;
}
#socialBar img{
filter:alpha(opacity=80);
opacity: 0.8;
}
#socialBar img:hover{
filter:alpha(opacity=100);
opacity: 1;
}
/** RSS FEED **/
.labelfield{
color:gray;
font-size: 50%; }
.datefield{
color:gray;
font-size: 80%;}
#rssfeeds a{
color: #336699;
text-decoration: none;
font-weight: bold;
font-size: 90%;
}
#rssfeeds p{
margin-bottom: 2px;
text-decoration: none;
font-size: 90%;
}
code{
color: red;
}
#blogoolafeed, #blogoolafeed a {
color:white;
}
#blogoolafeed a:hover{
color:#8E7BD3;
}
#blogoolafeed ul {
margin-left:-15px
}
#rssfeed-wrap {
font-size: 80%;
height: 300px;
overflow: scroll;
text-align: left;
width: 280px;
background-color:white;
filter:alpha(opacity=90);
opacity:.9;
-moz-border-radius: 15px;
border-radius: 15px;
padding: 10px;
}

View File

@ -0,0 +1,335 @@
package org.bmlaurus.home;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.Ini;
import org.compiere.util.SecureEngine;
import com.lowagie.text.pdf.codec.Base64;
public final class Prop implements Serializable {
/**
* @author BMLaurus-acanaveral
* @uri http://www.bmlaurus.com
*/
private static final long serialVersionUID = -3973931828485013352L;
/** File Property */
public static final String HOME_PROPERTY_FILE = "home.properties";
/** Customizable Properties */
private static final String TEMPLATE_PATH = "TemplatePath";
private static final String TEMPLATE_NAME = "TemplateName";
public static final String CLIENT_NAME = "ClientName";
public static final String CREDITS_TXT = "Credits";
public static final String COPYRIGHT_TXT = "Copyriright";
public static final String CUSTOM_IMAGE_PATH = "CustomImagePath";
/** Customizable Links */
public static final String WEBUI_LINK = "WebUiLink";
public static final String WEBSTORE_LINK = "WebStoreLink";
public static final String SENDREQUEST_LINK = "SendRequestLink";
public static final String RESOURCE_LINK = "ResourceLink";
public static final String SUPPORT_LINK = "SupportLink";
public static final String IRC_LINK = "IrcLink";
public static final String WIKI_LINK = "WikiLink";
public static final String FORUMS_LINK = "ForumsLink";
public static final String SUPPORTREQ_LINK = "SupportRequestLink";
public static final String OPTION_LINK = "OptionLink";
public static final String FELIX_LINK = "FelixLink";
public static final String MONITOR_LINK = "iDempiereMonitorLink";
/** Custom Texts */
public static final String OPTION_TEXT = "OptionText";
public static final String FELIX_TEXT = "FelixText";
public static final String LOCAL_TEXT = "LocalSupportText";
public static final String MONITOR_TEXT = "iDempiereMonitorText";
public static final String WEBUI_TEXT = "WebUiText";
public static final String WEBSTORE_TEXT = "WebStoreText";
public static final String SENDREQUEST_TEXT = "SendRequestText";
public static final String RESOURCE_TEXT = "ResourceText";
public static final String IRC_TEXT = "IrcText";
public static final String WIKI_TEXT = "WikiText";
public static final String FORUMS_TEXT = "ForumsText";
public static final String SUPPORTREQUEST_TEXT = "SupportRequestText";
public static final String TITLE = "Title";
/** Default Links */
private static final String DEF_FELIX_LINK = "osgi/system/console";
private static final String DEF_MONITOR_LINK = "idempiereMonitor";
private static final String DEF_WEBUI_LINK = "/webui/";
private static final String DEF_WEBSTORE_LINK = "/wstore/index.jsp";
private static final String DEF_SENDREQUEST_LINK= "/wstore/request.jsp";
private static final String DEF_RESOURCE_LINK = "http://www.idempiere.org";
private static final String DEF_SUPPORT_LINK = "#";
private static final String DEF_IRC_LINK = "http://webchat.freenode.net/?channels=idempiere";
private static final String DEF_WIKI_LINK = "http://wiki.idempiere.org/";
private static final String DEF_FORUMS_LINK = "http://groups.google.com/group/idempiere";
private static final String DEF_SUPPORTREQ_LINK = "http://jira.idempiere.com";
/**Social Network*/
public static final String SOC_FACEBOOK = "Facebook";
public static final String SOC_TWITTER = "Twitter";
public static final String SOC_LINKEDIN = "LinkedIn";
public static final String SOC_GOOPLUS = "Google+";
public static final String SOC_5 = "Social5";
public static final String SOC_6 = "Social6";
public static final String SOC_7 = "Social7";
/** RSS Properties */
public static final String RSS_ON = "rssOn";
public static final String RSS = "rss";
public static final String RSS_1_NAME = "rss1Name";
public static final String RSS_1 = "rss1";
public static final String RSS_2_NAME = "rss2Name";
public static final String RSS_2 = "rss2";
public static final String RSS_3_NAME = "rss3Name";
public static final String RSS_3 = "rss3";
public static final String RSS_4_NAME = "rss4Name";
public static final String RSS_4 = "rss4";
public static final String RSS_5_NAME = "rss5Name";
public static final String RSS_5 = "rss5";
public static final String RSS_REFRESH = "RssRefreshMessage";
/**Defaults*/
private static final String CREDITS = "Welcome to the iDempiere (OSGi+ADempiere) 1.0b Page!";
private static String LOGO_URL = null;
/** Container for Properties */
private volatile static Properties s_prop = new Properties();
/** Logger */
private static CLogger log = CLogger.getCLogger(Prop.class);
private static String IMAGE_PATH(){
String path="resources/templates/";
if(s_prop!=null){
path = getProperty(TEMPLATE_PATH);
if(getProperty(TEMPLATE_NAME)!=null && getProperty(TEMPLATE_NAME).length()>0)
path = path+getProperty(TEMPLATE_NAME)+"/images/";
}
return path;
}
public static boolean loadProperties (String filename)
{
boolean loadOK = true;
s_prop = new Properties();
InputStream fis = null;
try
{
fis = new FileInputStream(filename);
s_prop.load(fis);
fis.close();
}
catch (FileNotFoundException e)
{
log.warning(filename + " not found");
log.warning("!!WARNING:Please locate yout custom home.properties on iDEMPIERE_HOME.");
loadOK = false;
try {
fis = Prop.class.getResourceAsStream(HOME_PROPERTY_FILE);
s_prop.load(fis);
fis.close();
loadOK = true;
} catch (IOException e1) {
e1.printStackTrace();
}
}
catch (Exception e)
{
log.log(Level.SEVERE, filename + " - " + e.toString());
loadOK = false;
}
catch (Throwable t)
{
log.log(Level.SEVERE, filename + " - " + t.toString());
loadOK = false;
}
return loadOK;
} // loadProperties
private static void setDefaults(){
if(s_prop.getProperty(TEMPLATE_NAME)==null ||s_prop.getProperty(TEMPLATE_NAME).length()<=0)
s_prop.setProperty(TEMPLATE_NAME, "white");
if(s_prop.getProperty(CLIENT_NAME)==null||s_prop.getProperty(CLIENT_NAME).length()<=0)
s_prop.setProperty(CLIENT_NAME, "iDempiere Server");
if(s_prop.getProperty(CREDITS_TXT)==null||s_prop.getProperty(CREDITS_TXT).length()<=0)
s_prop.setProperty(CREDITS_TXT, CREDITS);
if(s_prop.getProperty(RSS_REFRESH)==null||s_prop.getProperty(RSS_REFRESH).length()<=0)
s_prop.setProperty(RSS_REFRESH, "Refresh live blog posts");
//LINKS
if(s_prop.getProperty(FELIX_LINK)==null||s_prop.getProperty(FELIX_LINK).length()<=0)
s_prop.setProperty(FELIX_LINK, DEF_FELIX_LINK);
if(s_prop.getProperty(MONITOR_LINK)==null||s_prop.getProperty(MONITOR_LINK).length()<=0)
s_prop.setProperty(MONITOR_LINK, DEF_MONITOR_LINK);
if(s_prop.getProperty(WEBUI_LINK)==null||s_prop.getProperty(WEBUI_LINK).length()<=0)
s_prop.setProperty(WEBUI_LINK, DEF_WEBUI_LINK);
if(s_prop.getProperty(WEBSTORE_LINK)==null||s_prop.getProperty(WEBSTORE_LINK).length()<=0)
s_prop.setProperty(WEBSTORE_LINK, DEF_WEBSTORE_LINK);
if(s_prop.getProperty(SENDREQUEST_LINK)==null||s_prop.getProperty(SENDREQUEST_LINK).length()<=0)
s_prop.setProperty(SENDREQUEST_LINK, DEF_SENDREQUEST_LINK);
if(s_prop.getProperty(RESOURCE_LINK)==null||s_prop.getProperty(RESOURCE_LINK).length()<=0)
s_prop.setProperty(RESOURCE_LINK, DEF_RESOURCE_LINK);
if(s_prop.getProperty(SUPPORT_LINK)==null||s_prop.getProperty(SUPPORT_LINK).length()<=0)
s_prop.setProperty(SUPPORT_LINK, DEF_SUPPORT_LINK);
if(s_prop.getProperty(IRC_LINK)==null||s_prop.getProperty(IRC_LINK).length()<=0)
s_prop.setProperty(IRC_LINK, DEF_IRC_LINK);
if(s_prop.getProperty(WIKI_LINK)==null||s_prop.getProperty(WIKI_LINK).length()<=0)
s_prop.setProperty(WIKI_LINK, DEF_WIKI_LINK);
if(s_prop.getProperty(FORUMS_LINK)==null||s_prop.getProperty(FORUMS_LINK).length()<=0)
s_prop.setProperty(FORUMS_LINK, DEF_FORUMS_LINK);
if(s_prop.getProperty(SUPPORTREQ_LINK)==null||s_prop.getProperty(SUPPORTREQ_LINK).length()<=0)
s_prop.setProperty(SUPPORTREQ_LINK, DEF_SUPPORTREQ_LINK);
if(s_prop.getProperty(OPTION_LINK)==null||s_prop.getProperty(OPTION_LINK).length()<=0)
s_prop.setProperty(OPTION_LINK, "#");
}
public static String loadCss(){
String retPath = null;
if(getProperty(TEMPLATE_PATH).contains("://")){
String ret="data:plain/text;base64,";
URL fis = null;
try {
fis = new URL(getProperty(TEMPLATE_PATH)+getProperty(TEMPLATE_NAME)+"/styles/template.css");
byte data[]=read(fis);
ret+=Base64.encodeBytes(data);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
retPath = ret;
}else
retPath = getProperty(TEMPLATE_PATH)+getProperty(TEMPLATE_NAME)+"/styles/template.css";
return retPath;
}
public static String getYear(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
return sdf.format(new Date());
}
public static String getImage(String img){
String retPath = null;
if(getProperty(CUSTOM_IMAGE_PATH)!=null && getProperty(CUSTOM_IMAGE_PATH).length()>0
&& !getProperty(CUSTOM_IMAGE_PATH).equals("NONE")){
retPath = imageToData(getProperty(CUSTOM_IMAGE_PATH)+img);
if(retPath==null){
if(IMAGE_PATH().contains("://"))
retPath = imageToData(IMAGE_PATH()+img);
else
retPath = IMAGE_PATH()+img;
}
}else{
if(IMAGE_PATH().contains("://"))
retPath = imageToData(IMAGE_PATH()+img);
else
retPath = IMAGE_PATH()+img;
}
return retPath;
}
public static String getProperty (String key)
{
if (key == null)
return "";
String retStr = s_prop.getProperty(key, "");
if (retStr == null || retStr.length() == 0)
return "";
String value = SecureEngine.decrypt(retStr, 0);
if (value == null)
return "";
return value;
}
public static String getFileName (boolean tryUserHome)
{
if (System.getProperty("PropertyHomeFile") != null)
return System.getProperty("PropertyHomeFile");
String base = null;
if (tryUserHome && Ini.isClient())
base = System.getProperty("user.home");
if (!Ini.isClient() || base == null || base.length() == 0)
{
String home = Ini.getAdempiereHome();
if (home != null)
base = home;
}
if (base != null && !base.endsWith(File.separator))
base += File.separator;
if (base == null)
base = "";
return base + HOME_PROPERTY_FILE;
}
public static String imageToData(String url){
String ret="data:image/png;base64,";
if(url.equals(LOGO_URL))
return url;
URL fis = null;
try {
fis = new URL(url);
byte data[]=read(fis);
if(data==null||data.length<=0)
return null;
ret+=Base64.encodeBytes(data);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return ret;
}
private static byte[] read(URL url) throws IOException {
ByteArrayOutputStream bais = new ByteArrayOutputStream();
InputStream is = null;
try {
is = url.openStream();
byte[] byteChunk = new byte[4096]; // Or whatever size you want to read in at a time.
int n;
while ( (n = is.read(byteChunk)) > 0 ) {
bais.write(byteChunk, 0, n);
}
}
catch (IOException e) {
System.err.println("Failed while reading bytes from %s: %s"+ url.toExternalForm()+ e.getMessage());
}
finally {
if (is != null) { is.close(); }
}
return bais.toByteArray();
}
public static boolean isRssOn(){
boolean rss=false;
if(getProperty(RSS_ON).toUpperCase().equals("TRUE")||
getProperty(RSS_ON).toUpperCase().equals("YES")||
getProperty(RSS_ON).toUpperCase().equals("Y"))
rss=true;
return rss;
}
public static void load(){
loadProperties(getFileName(false));
setDefaults();
LOGO_URL=IMAGE_PATH()+"logo.png";
}
}

View File

@ -0,0 +1,64 @@
#iDempiere Custom-Home Properties file.
#Custom Default Links
FelixLink = osgi/system/console
iDempiereMonitorLink= idempiereMonitor
WebUiLink = /webui/
WebStoreLink = /wstore/index.jsp
SendRequestLink = /wstore/request.jsp
ResourceLink = http://www.idempiere.org
IrcLink = http://webchat.freenode.net/?channels=idempiere
WikiLink = http://wiki.idempiere.org/
ForumsLink = http://groups.google.com/group/idempiere
SupportRequestLink = http://jira.idempiere.com
SupportLink = mailto:support@idempiere.com
OptionLink = https://idempiere.atlassian.net
#Default Texts
OptionText = Options
FelixText = Plug-In Console
iDempiereMonitorText= Idempiere Monitor
LocalSupportText = Local Support
WebUiText = WebUI App
WebStoreText = Web Store
SendRequestText = Send Request
ResourceText = Resource
IrcText = IRC Channel
WikiText = Wiki
ForumsText = Forums
SupportRequestText = Support Request
#Social Networks. NONE to hide
Facebook = https://www.facebook.com/IDempiere
Twitter = https://twitter.com/iDempiere
LinkedIn = NONE
Google+ = https://groups.google.com/forum/#!forum/idempiere-dev
Social5 = NONE
Social6 = NONE
Social7 = NONE
#Home Title
Title = iDempiere Application Home
#Custom TemplateName (white or black)
TemplateName = white
#file:///Linux/&Mac/resources/templates/ --- file://Windows/resources/templates/
TemplatePath = resources/templates/
#If want to customize just the images. EX: file:///u01/home/images/
CustomImagePath = NONE
#Client Name & Logo file (format file://)
ClientName = iDempiere Server
#Custom Credits & Copyright tail
Credits = Welcome to the iDempiere (OSGi+ADempiere) 2.0 Page!
Copyriright = || by <a href="http://www.company.com" target="blank">Company</a>
#Custom RSS (rss1 to rss5)
rssOn = true
RssRefreshMessage = Refresh
rss1Name = iDempiere's Blog
rss1 = https://groups.google.com/group/idempiere/feed/rss_v2_0_msgs.xml
rss2Name = 2 nd Blog
rss2 = https://groups.google.com/group/idempiere-es/feed/rss_v2_0_msgs.xml

View File

@ -18,6 +18,9 @@ package org.compiere.server;
import java.io.File;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Properties;
@ -40,10 +43,12 @@ import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoUtil;
import org.compiere.process.ServerProcessCtl;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.TimeUtil;
import org.compiere.util.Trx;
import org.compiere.util.Util;
/**
@ -402,6 +407,39 @@ public class Scheduler extends AdempiereServer
if (variable == null
|| (variable != null && variable.length() == 0))
value = null;
else if (variable.startsWith("@SQL=")) {
String defStr = "";
String sql = variable.substring(5); // w/o tag
//sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables
//hengsin, capture unparseable error to avoid subsequent sql exception
sql = Env.parseContext(m_schedulerctx, 0, sql, false, false); // replace variables
if (sql.equals(""))
log.log(Level.WARNING, "(" + sPara.getColumnName() + ") - Default SQL variable parse failed: " + variable);
else {
PreparedStatement stmt = null;
ResultSet rs = null;
try {
stmt = DB.prepareStatement(sql, null);
rs = stmt.executeQuery();
if (rs.next())
defStr = rs.getString(1);
else {
if (log.isLoggable(Level.INFO))
log.log(Level.INFO, "(" + sPara.getColumnName() + ") - no Result: " + sql);
}
}
catch (SQLException e) {
log.log(Level.WARNING, "(" + sPara.getColumnName() + ") " + sql, e);
}
finally{
DB.close(rs, stmt);
rs = null;
stmt = null;
}
}
if (!Util.isEmpty(defStr))
value = defStr;
} // SQL Statement
else if ( variable.indexOf('@') != -1
&& variable.indexOf('@') != variable.lastIndexOf('@')) // we have a variable / BF [1926032]
{

View File

@ -16,20 +16,27 @@
*****************************************************************************/
package org.compiere.apps;
import static org.compiere.model.SystemIDs.PROCESS_C_INVOICE_GENERATE;
import static org.compiere.model.SystemIDs.PROCESS_M_INOUT_GENERATE;
import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GraphicsConfiguration;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JEditorPane;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
@ -39,18 +46,23 @@ import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.adempiere.util.Callback;
import org.adempiere.util.IProcessUI;
import static org.compiere.model.SystemIDs.*;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.print.ReportCtl;
import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoUtil;
import org.compiere.swing.CButton;
import org.compiere.swing.CComboBox;
import org.compiere.swing.CFrame;
import org.compiere.swing.CLabel;
import org.compiere.swing.CPanel;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
/**
* Dialog to Start process.
@ -75,7 +87,7 @@ public class ProcessDialog extends CFrame
/**
*
*/
private static final long serialVersionUID = 7486479305726277406L;
private static final long serialVersionUID = 2435351857958558386L;
/**
* @deprecated
@ -194,6 +206,11 @@ public class ProcessDialog extends CFrame
private ProcessParameterPanel parameterPanel = null;
private JSeparator separator = new JSeparator();
private ProcessInfo m_pi = null;
private CComboBox fSavedName = new CComboBox();
private CButton bSave = new CButton();
private CButton bDelete = new CButton();
private List<MPInstance> savedParams;
private CLabel lSaved = new CLabel(Msg.getMsg(Env.getCtx(), "SavedParameter"));
/**
* Static Layout
@ -207,6 +224,19 @@ public class ProcessDialog extends CFrame
dialog.setMinimumSize(new Dimension(500, 200));
bOK.addActionListener(this);
bPrint.addActionListener(this);
fSavedName.setToolTipText (Msg.getMsg(Env.getCtx(),"SavedParameter"));
fSavedName.setEditable(true);
fSavedName.addActionListener(this);
bSave.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Save24.gif")));
bSave.setMargin(new Insets(2, 2, 2, 2));
bSave.setToolTipText(Msg.getMsg(Env.getCtx(),"Save"));
bSave.addActionListener(this);
bSave.setEnabled(false);
bDelete.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Delete24.gif")));
bDelete.setMargin(new Insets(2, 2, 2, 2));
bDelete.setToolTipText(Msg.getMsg(Env.getCtx(),"Delete"));
bDelete.addActionListener(this);
bDelete.setEnabled(false);
//
southPanel.setLayout(southLayout);
southLayout.setAlignment(FlowLayout.RIGHT);
@ -216,7 +246,12 @@ public class ProcessDialog extends CFrame
message.setFocusable(true);
getContentPane().add(dialog);
dialog.add(southPanel, BorderLayout.SOUTH);
southPanel.add(bPrint, null);
southPanel.add(lSaved,"wrap");
southPanel.add(fSavedName, "w :200:");
southPanel.add(bSave, null);
southPanel.add(bDelete, null);
southPanel.add(bPrint, "span, split 2, align right, pushx");
southPanel.add(bOK, null);
dialog.add(messagePane, BorderLayout.NORTH);
messagePane.setBorder(null);
@ -337,16 +372,39 @@ public class ProcessDialog extends CFrame
if(m_ShowHelp != null && m_ShowHelp.equals("S"))
bOK.doClick();
querySaved();
dialog.revalidate();
return true;
} // init
private void querySaved() {
//user query
savedParams = MPInstance.get(Env.getCtx(), m_AD_Process_ID, Env.getContextAsInt(Env.getCtx(), "#AD_User_ID"));
String[] queries = new String[savedParams.size()+1];
int i = 0;
queries[i++] = "";
for (MPInstance instance : savedParams)
{
queries[i++] = instance.getName();
}
fSavedName.setModel(new DefaultComboBoxModel(queries));
fSavedName.setValue("");
}
/**
* ActionListener (Start)
* @param e ActionEvent
*/
public void actionPerformed (ActionEvent e)
{
String saveName = null;
if (fSavedName.getSelectedItem() != null)
saveName = fSavedName.getSelectedItem().toString();
boolean lastRun = ("** " + Msg.getMsg(Env.getCtx(), "LastRun") + " **").equals(saveName);
if (e.getSource() == bOK)
{
if (bOK.getText().length() == 0)
@ -357,12 +415,92 @@ public class ProcessDialog extends CFrame
ProcessCtl.process(this, m_WindowNo, parameterPanel, m_pi, null);
}
}
else if (e.getSource() == fSavedName)
{
if (savedParams != null && saveName != null)
{
for (int i = 0; i < savedParams.size(); i++)
{
if (savedParams.get(i).getName().equals(saveName))
{
loadSavedParams(savedParams.get(i));
}
}
}
boolean enabled = !Util.isEmpty(saveName);
bSave.setEnabled(enabled && !lastRun);
bDelete.setEnabled(enabled && fSavedName.getSelectedIndex() > -1 && !lastRun);
}
else if (e.getSource() == bSave && fSavedName != null && !lastRun)
{
// Update existing
if (fSavedName.getSelectedIndex() > -1 && savedParams != null)
{
for (int i = 0; i < savedParams.size(); i++)
{
if (savedParams.get(i).getName().equals(saveName))
{
m_pi.setAD_PInstance_ID(savedParams.get(i).getAD_PInstance_ID());
for (MPInstancePara para : savedParams.get(i).getParameters())
{
para.deleteEx(true);
}
parameterPanel.saveParameters();
}
}
}
// create new
else {
MPInstance instance = null;
try
{
instance = new MPInstance(Env.getCtx(), m_pi.getAD_Process_ID(), m_pi.getRecord_ID());
instance.setName(saveName);
instance.saveEx();
m_pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
// Get Parameters
if (parameterPanel != null) {
if (!parameterPanel.saveParameters())
{
throw new AdempiereSystemError(Msg.getMsg(Env.getCtx(), "SaveParameterError"));
}
}
}
catch (Exception ex)
{
ADialog.warn(m_WindowNo, this, ex.getLocalizedMessage());
}
}
querySaved();
fSavedName.setSelectedItem(saveName);
}
else if (e.getSource() == bDelete && fSavedName != null && !lastRun )
{
Object o = fSavedName.getSelectedItem();
if (savedParams != null && o != null)
{
String selected = o.toString();
for (int i = 0; i < savedParams.size(); i++)
{
if (savedParams.get(i).getName().equals(selected))
{
savedParams.get(i).deleteEx(true);
}
}
}
querySaved();
}
else if (e.getSource() == bPrint)
printScreen();
} // actionPerformed
private void loadSavedParams(MPInstance instance) {
parameterPanel.loadParameters(instance);
}
/**
* Lock User Interface
* Called from the Worker before processing

View File

@ -40,6 +40,7 @@ import org.compiere.model.GridField;
import org.compiere.model.GridFieldVO;
import org.compiere.model.MClient;
import org.compiere.model.MLookup;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.process.ProcessInfo;
import org.compiere.swing.CLabel;
@ -65,7 +66,7 @@ public class ProcessParameterPanel extends CPanel implements VetoableChangeListe
/**
*
*/
private static final long serialVersionUID = 3871379020889713432L;
private static final long serialVersionUID = -111202562692738248L;
/**
* Dynamic generated Parameter panel.
@ -638,6 +639,64 @@ public class ProcessParameterPanel extends CPanel implements VetoableChangeListe
return true;
} // saveParameters
/*
* load parameters from saved instance
*/
public boolean loadParameters(MPInstance instance)
{
log.config("");
MPInstancePara[] params = instance.getParameters();
for (int j = 0; j < m_mFields.size(); j++)
{
GridField mField = (GridField)m_mFields.get(j);
// Get Values
VEditor editor = (VEditor)m_vEditors.get(j);
VEditor editor2 = (VEditor)m_vEditors2.get(j);
editor.setValue(null);
if (editor2 != null)
editor2.setValue(null);
for ( int i = 0; i<params.length; i++)
{
MPInstancePara para = params[i];
para.getParameterName();
if ( mField.getColumnName().equals(para.getParameterName()) )
{
if (para.getP_Date() != null || para.getP_Date_To() != null )
{
editor.setValue(para.getP_Date());
if (editor2 != null )
editor2.setValue(para.getP_Date_To());
}
// String
else if ( para.getP_String() != null || para.getP_String_To() != null )
{
editor.setValue(para.getP_String());
if (editor2 != null)
editor2.setValue(para.getP_String_To());
}
else if ( !Env.ZERO.equals(para.getP_Number()) || !Env.ZERO.equals(para.getP_Number_To()) )
{
editor.setValue(para.getP_Number());
if (editor2 != null)
editor2.setValue(para.getP_Number_To());
}
log.fine(para.toString());
break;
}
} // for every saved parameter
} // for every field
return true;
} // saveParameters
/**
* Restore window context.
* @author teo_sarca [ 1699826 ]

View File

@ -20,6 +20,7 @@ import java.util.Map.Entry;
import java.util.Properties;
import org.adempiere.util.GridRowCtx;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.EditorBox;
@ -390,6 +391,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
row.appendChild(cell);
Boolean isActive = null;
int colIndex = -1;
for (int i = 0; i < columnCount; i++) {
if (editors.get(gridPanelFields[i]) == null) {
@ -415,6 +417,15 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
defaultFocusField = editor;
}
if ("IsActive".equals(gridPanelFields[i].getColumnName())) {
isActive = Boolean.FALSE;
if (currentValues[i] != null) {
if ("true".equalsIgnoreCase(currentValues[i].toString())) {
isActive = Boolean.TRUE;
}
}
}
if (!gridPanelFields[i].isDisplayedGrid() || gridPanelFields[i].isToolbarButton()) {
continue;
}
@ -453,6 +464,21 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
row.addEventListener(Events.ON_CLICK, rowListener);
row.addEventListener(Events.ON_OK, rowListener);
row.setTooltiptext("Row " + (rowIndex+1));
if (isActive == null) {
Object isActiveValue = gridTab.getValue(rowIndex, "IsActive");
if (isActiveValue != null) {
if ("true".equalsIgnoreCase(isActiveValue.toString())) {
isActive = Boolean.TRUE;
} else {
isActive = Boolean.FALSE;
}
}
}
if (isActive != null && !isActive.booleanValue()) {
LayoutUtils.addSclass("grid-inactive-row", row);
}
}
/**
@ -485,6 +511,20 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
}
String script = "jq('#"+row.getUuid()+"').addClass('highlight').siblings().removeClass('highlight')";
Boolean isActive = null;
Object isActiveValue = gridTab.getValue(currentRowIndex, "IsActive");
if (isActiveValue != null) {
if ("true".equalsIgnoreCase(isActiveValue.toString())) {
isActive = Boolean.TRUE;
} else {
isActive = Boolean.FALSE;
}
}
if (isActive != null && !isActive.booleanValue()) {
script = "jq('#"+row.getUuid()+"').addClass('grid-inactive-row').siblings().removeClass('highlight')";
}
Clients.response(new AuScript(script));
}

View File

@ -21,9 +21,14 @@ import org.adempiere.util.ContextRunnable;
import org.adempiere.util.IProcessUI;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
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.Mask;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.desktop.IDesktop;
import org.adempiere.webui.factory.ButtonFactory;
@ -36,16 +41,21 @@ import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.Adempiere;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.model.MProcess;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoLog;
import org.compiere.process.ProcessInfoUtil;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Text;
@ -62,11 +72,12 @@ import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.A;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Div;
import org.zkoss.zul.Hlayout;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Html;
import org.zkoss.zul.Label;
import org.zkoss.zul.North;
import org.zkoss.zul.Row;
import org.zkoss.zul.South;
import com.lowagie.text.Document;
@ -107,7 +118,7 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
/**
*
*/
private static final long serialVersionUID = 6316822220179816250L;
private static final long serialVersionUID = -899849696748614034L;
private static final String MESSAGE_DIV_STYLE = "max-height: 150pt; overflow: auto; margin: 10px;";
private Div messageDiv;
@ -117,6 +128,10 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
private List<File> downloadFiles;
private boolean showLastRun = false;
private Grid southRowPanel = GridFactory.newGridLayout();
/**
* Dialog to start a process/report
* @param ctx
@ -139,6 +154,11 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
Env.setContext(Env.getCtx(), m_WindowNo, "IsSOTrx", isSOTrx ? "Y" : "N");
try
{
MProcess process = new MProcess(m_ctx, m_AD_Process_ID, null);
int count = process.getParameters().length;
if (count > 0)
showLastRun = true;
initComponents();
init();
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
@ -174,26 +194,48 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
center.setAutoscroll(true);
center.setStyle("border: none");
Hlayout hbox = new Hlayout();
Rows rows = southRowPanel.newRows();
Row row = rows.newRow();
Hbox hBox = new Hbox();
hBox.appendChild(lSaved);
fSavedName.addEventListener(Events.ON_CHANGE, this);
hBox.appendChild(fSavedName);
bSave.setEnabled(false);
bSave.addActionListener(this);
hBox.appendChild(bSave);
bDelete.setEnabled(false);
bDelete.addActionListener(this);
hBox.appendChild(bDelete);
row.appendChild(hBox);
if(!showLastRun)
hBox.setVisible(false);
Panel confParaPanel =new Panel();
confParaPanel.setAlign("right");
@SuppressWarnings("unused")
String label = Msg.getMsg(Env.getCtx(), "Start");
// Invert - Unify OK/Cancel IDEMPIERE-77
bOK = ButtonFactory.createNamedButton(ConfirmPanel.A_OK, true, true);
bOK.setId("Ok");
bOK.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(bOK);
confParaPanel.appendChild(bOK);
Button btn = ButtonFactory.createNamedButton(ConfirmPanel.A_CANCEL, true, true);
btn.setId("Cancel");
btn.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btn);
hbox.setStyle("padding: 10px; margin: auto; overflow: visible;");
hbox.setHflex("min");
bCancel = ButtonFactory.createNamedButton(ConfirmPanel.A_CANCEL, true, true);
bCancel.setId("Cancel");
bCancel.addEventListener(Events.ON_CLICK, this);
confParaPanel.appendChild(bCancel);
row.appendChild(confParaPanel);
South south = new South();
south.setSclass("dialog-footer");
layout.appendChild(south);
south.appendChild(hbox);
south.appendChild(southRowPanel);
this.appendChild(layout);
}
@ -209,6 +251,7 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
private Panel centerPanel = null;
private Html message = null;
private Button bOK = null;
private Button bCancel = null;
private boolean valid = true;
@ -229,6 +272,13 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
private static final String ON_STATUS_UPDATE = "onStatusUpdate";
private static final String ON_COMPLETE = "onComplete";
//saved parameters
private Combobox fSavedName=new Combobox();
private Button bSave=ButtonFactory.createNamedButton("Save");
private Button bDelete=ButtonFactory.createNamedButton("Delete");
private List<MPInstance> savedParams;
private Label lSaved=new Label(Msg.getMsg(Env.getCtx(), "SavedParameter"));
/**
* Set Visible
* (set focus to OK if visible)
@ -330,9 +380,24 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
{
startProcess();
}
querySaved();
return true;
} // init
private void querySaved()
{
//user query
savedParams = MPInstance.get(Env.getCtx(), m_AD_Process_ID, Env.getContextAsInt(Env.getCtx(), "#AD_User_ID"));
fSavedName.removeAllItems();
for (MPInstance instance : savedParams)
{
String queries = instance.get_ValueAsString("Name");
fSavedName.appendItem(queries);
}
fSavedName.setValue("");
}
public void startProcess()
{
m_pi.setPrintPreview(true);
@ -379,6 +444,14 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
public void onEvent(Event event) {
Component component = event.getTarget();
String saveName = null;
boolean lastRun = false;
if (fSavedName.getRawText() != null) {
saveName = fSavedName.getRawText();
lastRun = ("** " + Msg.getMsg(Env.getCtx(), "LastRun") + " **")
.equals(saveName);
}
if(component instanceof A && event.getName().equals((Events.ON_CLICK))){
doOnClick((A)component);
} else if (component instanceof Button) {
@ -393,6 +466,59 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
restart();
} else if ("Cancel".equalsIgnoreCase(element.getId())) {
this.dispose();
} else if (event.getTarget().equals(bSave) && fSavedName != null
&& !lastRun) {
// Update existing
if (fSavedName.getSelectedIndex() > -1 && savedParams != null) {
for (int i = 0; i < savedParams.size(); i++) {
if (savedParams.get(i).getName().equals(saveName)) {
m_pi.setAD_PInstance_ID(savedParams.get(i)
.getAD_PInstance_ID());
for (MPInstancePara para : savedParams.get(i)
.getParameters()) {
para.deleteEx(true);
}
parameterPanel.saveParameters();
}
}
}
// create new
else {
MPInstance instance = null;
try {
instance = new MPInstance(Env.getCtx(),
m_pi.getAD_Process_ID(), m_pi.getRecord_ID());
instance.setName(saveName);
instance.saveEx();
m_pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
// Get Parameters
if (parameterPanel != null) {
if (!parameterPanel.saveParameters()) {
throw new AdempiereSystemError(Msg.getMsg(
Env.getCtx(), "SaveParameterError"));
}
}
} catch (Exception ex) {
log.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
}
}
querySaved();
fSavedName.setSelectedItem(getComboItem(saveName));
}
else if (event.getTarget().equals(bDelete) && fSavedName != null
&& !lastRun) {
Object o = fSavedName.getSelectedItem();
if (savedParams != null && o != null) {
String selected = fSavedName.getSelectedItem().getLabel();
for (int i = 0; i < savedParams.size(); i++) {
if (savedParams.get(i).getName().equals(selected)) {
savedParams.get(i).deleteEx(true);
}
}
}
querySaved();
}
} else if (event.getName().equals(ON_STATUS_UPDATE)) {
onStatusUpdate(event);
@ -400,8 +526,36 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
onComplete();
} else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT)) {
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Process, m_AD_Process_ID);
} else if (event.getTarget().equals(fSavedName)) {
if (savedParams != null && saveName != null) {
for (int i = 0; i < savedParams.size(); i++) {
if (savedParams.get(i).getName().equals(saveName)) {
loadSavedParams(savedParams.get(i));
}
}
}
boolean enabled = !Util.isEmpty(saveName);
bSave.setEnabled(enabled && !lastRun);
bDelete.setEnabled(enabled && fSavedName.getSelectedIndex() > -1
&& !lastRun);
}
}
public Comboitem getComboItem( String value) {
Comboitem item = null;
for (int i = 0; i < fSavedName.getItems().size(); i++) {
if (fSavedName.getItems().get(i) != null) {
item = (Comboitem)fSavedName.getItems().get(i);
if (value.equals(item.getLabel().toString())) {
break;
}
}
}
return item;
}
private void loadSavedParams(MPInstance instance) {
parameterPanel.loadParameters(instance);
}
private void doOnClick(A btn) {

View File

@ -44,6 +44,7 @@ import org.compiere.model.GridField;
import org.compiere.model.GridFieldVO;
import org.compiere.model.MClient;
import org.compiere.model.MLookup;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.process.ProcessInfo;
import org.compiere.util.CLogger;
@ -71,7 +72,7 @@ public class ProcessParameterPanel extends Panel implements
/**
*
*/
private static final long serialVersionUID = -5996487688479454715L;
private static final long serialVersionUID = -6089753824709746119L;
private String width;
@ -429,6 +430,64 @@ public class ProcessParameterPanel extends Panel implements
return true;
} // validateParameters
/*
* load parameters from saved instance
*/
public boolean loadParameters(MPInstance instance)
{
log.config("");
MPInstancePara[] params = instance.getParameters();
for (int j = 0; j < m_mFields.size(); j++)
{
GridField mField = (GridField)m_mFields.get(j);
// Get Values
WEditor editor = (WEditor)m_wEditors.get(j);
WEditor editor2 = (WEditor)m_wEditors2.get(j);
editor.setValue(null);
if (editor2 != null)
editor2.setValue(null);
for ( int i = 0; i<params.length; i++)
{
MPInstancePara para = params[i];
para.getParameterName();
if ( mField.getColumnName().equals(para.getParameterName()) )
{
if (para.getP_Date() != null || para.getP_Date_To() != null )
{
editor.setValue(para.getP_Date());
if (editor2 != null )
editor2.setValue(para.getP_Date_To());
}
// String
else if ( para.getP_String() != null || para.getP_String_To() != null )
{
editor.setValue(para.getP_String());
if (editor2 != null)
editor2.setValue(para.getP_String_To());
}
else if ( !Env.ZERO.equals(para.getP_Number()) || !Env.ZERO.equals(para.getP_Number_To()) )
{
editor.setValue(para.getP_Number());
if (editor2 != null)
editor2.setValue(para.getP_Number_To());
}
log.fine(para.toString());
break;
}
} // for every saved parameter
} // for every field
return true;
} // loadParameters
/**
* Save Parameter values

View File

@ -69,6 +69,8 @@ import org.zkoss.zul.Center;
import org.zkoss.zul.Filedownload;
import org.zkoss.zul.South;
import com.lowagie.text.pdf.PdfReader;
/**
* Payment Print & Export
*
@ -379,7 +381,6 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
{
if (result)
{
// int lastDocumentNo =
MPaySelectionCheck.confirmPrint (m_checks, m_batch);
// document No not updated
}
@ -418,34 +419,52 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
log.info(PaymentRule);
if (!getChecks(PaymentRule))
return;
// Update BankAccountDoc
int lastDocumentNo = MPaySelectionCheck.confirmPrint (m_checks, m_batch);
// get document no
int startDocumentNo = ((Number)fDocumentNo.getValue()).intValue();
if (log.isLoggable(Level.CONFIG)) log.config("DocumentNo=" + startDocumentNo);
// for all checks
List<File> pdfList = new ArrayList<File>();
int lastDocumentNo = startDocumentNo;
for (int i = 0; i < m_checks.length; i++)
{
MPaySelectionCheck check = m_checks[i];
// Set new Check Document No
check.setDocumentNo(String.valueOf(lastDocumentNo));
check.saveEx();
// Update BankAccountDoc
MPaySelectionCheck.confirmPrint(m_checks[i], m_batch);
// ReportCtrl will check BankAccountDoc for PrintFormat
ReportEngine re = ReportEngine.get(Env.getCtx(), ReportEngine.CHECK, check.get_ID());
try
{
MPrintFormat format = re.getPrintFormat();
File pdfFile = null;
if (format.getJasperProcess_ID() > 0)
{
ProcessInfo pi = new ProcessInfo("", format.getJasperProcess_ID());
pi.setRecord_ID(check.get_ID());
pi.setIsBatch(true);
ServerProcessCtl.process(pi, null);
pdfList.add(pi.getPDFReport());
pdfFile = pi.getPDFReport();
}
else
{
File file = File.createTempFile("WPayPrint", null);
re.getPDF(file);
pdfList.add(file);
pdfFile = File.createTempFile("WPayPrint", null);
re.getPDF(pdfFile);
}
if (pdfFile != null)
{
// increase the check document no by the number of pages of the generated pdf file
PdfReader document = new PdfReader(pdfFile.getAbsolutePath());
lastDocumentNo += document.getNumberOfPages();
pdfList.add(pdfFile);
}
}
catch (Exception e)
@ -471,10 +490,11 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
}
final SimplePDFViewer chequeViewerRef = chequeViewer;
if (lastDocumentNo != 0)
// Update Check Next Document No
if (startDocumentNo != lastDocumentNo)
{
StringBuilder sb = new StringBuilder();
sb.append("UPDATE C_BankAccountDoc SET CurrentNext=").append(++lastDocumentNo)
sb.append("UPDATE C_BankAccountDoc SET CurrentNext=").append(lastDocumentNo)
.append(" WHERE C_BankAccount_ID=").append(m_C_BankAccount_ID)
.append(" AND PaymentRule='").append(PaymentRule).append("'");
DB.executeUpdate(sb.toString(), null);
@ -561,13 +581,10 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
return false;
}
// get data
int startDocumentNo = ((Number)fDocumentNo.getValue()).intValue();
if (log.isLoggable(Level.CONFIG)) log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule + ", DocumentNo=" + startDocumentNo);
//
// get Slecetions
m_checks = MPaySelectionCheck.get(m_C_PaySelection_ID, PaymentRule, startDocumentNo, null);
if (log.isLoggable(Level.CONFIG)) log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule);
// get payment selection checks without check no assignment
m_checks = MPaySelectionCheck.get(m_C_PaySelection_ID, PaymentRule, null);
//
if (m_checks == null || m_checks.length == 0)

View File

@ -71,23 +71,23 @@ public class WProcessParameter implements IFormController {
if (processPara.getColumnName().equals(para.getParameterName())) {
schedulerPara.setAD_Process_Para_ID(processPara.getAD_Process_Para_ID());
if (DisplayType.isNumeric(processPara.getAD_Reference_ID())) {
if (para.getP_Number() != null)
if (para.get_Value(MPInstancePara.COLUMNNAME_P_Number) != null)
schedulerPara.setParameterDefault(para.getP_Number().toString());
if (para.getP_Number_To() != null)
if (processPara.isRange() && para.get_Value(MPInstancePara.COLUMNNAME_P_Number_To) != null)
schedulerPara.setParameterToDefault(para.getP_Number_To().toString());
} else if (DisplayType.isID(processPara.getAD_Reference_ID())) {
if (para.getP_Number() != null)
if (para.get_Value(MPInstancePara.COLUMNNAME_P_Number) != null)
schedulerPara.setParameterDefault(Integer.toString(para.getP_Number().intValue()));
if (para.getP_Number_To() != null)
if (processPara.isRange() && para.get_Value(MPInstancePara.COLUMNNAME_P_Number_To) != null)
schedulerPara.setParameterToDefault(Integer.toString(para.getP_Number_To().intValue()));
} else if (DisplayType.isDate(processPara.getAD_Reference_ID())) {
if (para.getP_Date() != null)
schedulerPara.setParameterDefault(para.getP_Date().toString());
if (para.getP_Date_To() != null)
if (processPara.isRange() && para.getP_Date_To() != null)
schedulerPara.setParameterToDefault(para.getP_Date_To().toString());
} else {
schedulerPara.setParameterDefault(para.getP_String());
if (para.getP_String_To() != null)
if (processPara.isRange() && para.getP_String_To() != null)
schedulerPara.setParameterToDefault(para.getP_String_To());
}
if (!Util.isEmpty(para.getInfo())) {

View File

@ -18,6 +18,8 @@
package org.adempiere.webui.editor;
import java.beans.PropertyChangeEvent;
import java.math.BigDecimal;
import java.sql.Timestamp;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
@ -255,7 +257,7 @@ ContextMenuListener, IZoomableEditor
return;
}
if (value != null && (value instanceof Integer || value instanceof String))
if (value != null && (value instanceof Integer || value instanceof String || value instanceof Timestamp || value instanceof BigDecimal))
{
getComponent().setValue(value);

View File

@ -401,6 +401,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
Vector<String> columnNames = new Vector<String>();
columnNames.add(Msg.translate(Env.getCtx(), m_C_BPartner_ID == 0 ? "C_BPartner_ID" : "M_Product_ID"));
columnNames.add(Msg.translate(Env.getCtx(), "PriceActual"));
columnNames.add(Msg.translate(Env.getCtx(), "C_Currency_ID"));
columnNames.add(Msg.translate(Env.getCtx(), reserved ? "QtyReserved" : "QtyOrdered"));
columnNames.add(Msg.translate(Env.getCtx(), "Discount"));
columnNames.add(Msg.translate(Env.getCtx(), "DocumentNo"));
@ -411,7 +412,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
Vector<Vector<Object>> data = null;
if (m_C_BPartner_ID == 0)
{
String sql = "SELECT bp.Name, ol.PriceActual,ol.PriceList,ol.QtyReserved,"
String sql = "SELECT bp.Name, ol.PriceActual,c.Iso_Code,ol.PriceList,ol.QtyReserved,"
+ "o.DateOrdered,dt.PrintName || ' ' || o.DocumentNo As DocumentNo, "
+ "w.Name,"
+ "ol.Discount, 0 " // 8,9=M_PriceList_ID
@ -420,6 +421,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
+ " INNER JOIN C_DocType dt ON (o.C_DocType_ID=dt.C_DocType_ID)"
+ " INNER JOIN M_Warehouse w ON (ol.M_Warehouse_ID=w.M_Warehouse_ID)"
+ " INNER JOIN C_BPartner bp ON (o.C_BPartner_ID=bp.C_BPartner_ID) "
+ " INNER JOIN C_Currency c ON (o.C_Currency_ID=c.C_Currency_ID) "
+ "WHERE ol.QtyReserved<>0"
+ " AND ol.M_Product_ID=?"
+ " AND o.IsSOTrx=" + (reserved ? "'Y'" : "'N'")
@ -428,7 +430,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
}
else
{
String sql = "SELECT p.Name, ol.PriceActual,ol.PriceList,ol.QtyReserved,"
String sql = "SELECT p.Name, ol.PriceActual,c.Iso_Code,ol.PriceList,ol.QtyReserved,"
+ "o.DateOrdered,dt.PrintName || ' ' || o.DocumentNo As DocumentNo, "
+ "w.Name,"
+ "ol.Discount, 0 " // 8,9=M_PriceList_ID
@ -437,6 +439,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
+ " INNER JOIN C_DocType dt ON (o.C_DocType_ID=dt.C_DocType_ID)"
+ " INNER JOIN M_Warehouse w ON (ol.M_Warehouse_ID=w.M_Warehouse_ID)"
+ " INNER JOIN M_Product p ON (ol.M_Product_ID=p.M_Product_ID) "
+ " INNER JOIN C_Currency c ON (o.C_Currency_ID=c.C_Currency_ID) "
+ "WHERE ol.QtyReserved<>0"
+ " AND o.C_BPartner_ID=?"
+ " AND o.IsSOTrx=" + (reserved ? "'Y'" : "'N'")
@ -452,11 +455,12 @@ public class InvoiceHistory extends Window implements EventListener<Event>
//
m_tableReserved.setColumnClass(0, String.class, true); // Product/Partner
m_tableReserved.setColumnClass(1, BigDecimal.class, true); // Price
m_tableReserved.setColumnClass(2, Double.class, true); // Quantity
m_tableReserved.setColumnClass(3, BigDecimal.class, true); // Discount (%)
m_tableReserved.setColumnClass(4, String.class, true); // DocNo
m_tableReserved.setColumnClass(5, Timestamp.class, true); // Date
m_tableReserved.setColumnClass(6, String.class, true); // Warehouse
m_tableReserved.setColumnClass(2, String.class, true); // Currency
m_tableReserved.setColumnClass(3, Double.class, true); // Quantity
m_tableReserved.setColumnClass(4, BigDecimal.class, true); // Discount (%)
m_tableReserved.setColumnClass(5, String.class, true); // DocNo
m_tableReserved.setColumnClass(6, Timestamp.class, true); // Date
m_tableReserved.setColumnClass(7, String.class, true); // Warehouse
//
m_tableReserved.autoSize();
}
@ -467,11 +471,12 @@ public class InvoiceHistory extends Window implements EventListener<Event>
//
m_tableOrdered.setColumnClass(0, String.class, true); // Product/Partner
m_tableOrdered.setColumnClass(1, BigDecimal.class, true); // Price
m_tableOrdered.setColumnClass(2, Double.class, true); // Quantity
m_tableOrdered.setColumnClass(3, BigDecimal.class, true); // Discount (%)
m_tableOrdered.setColumnClass(4, String.class, true); // DocNo
m_tableOrdered.setColumnClass(5, Timestamp.class, true); // Date
m_tableOrdered.setColumnClass(6, String.class, true); // Warehouse
m_tableOrdered.setColumnClass(2, String.class, true); // Currency
m_tableOrdered.setColumnClass(3, Double.class, true); // Quantity
m_tableOrdered.setColumnClass(4, BigDecimal.class, true); // Discount (%)
m_tableOrdered.setColumnClass(5, String.class, true); // DocNo
m_tableOrdered.setColumnClass(6, Timestamp.class, true); // Date
m_tableOrdered.setColumnClass(7, String.class, true); // Warehouse
//
m_tableOrdered.autoSize();
}

View File

@ -1,5 +1,19 @@
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
<%@ taglib uri="http://www.idempiere.org/dsp/web/util" prefix="u" %>
.z-grid tbody tr.grid-inactive-row td.z-cell {
background-image: none !important;
background-color: #DCDAD4 !important;
}
.z-grid tbody tr.grid-inactive-row td.row-indicator-selected {
background-color: #DCDAD4 !important;
background-image: url(${c:encodeURL('/theme/default/images/EditRecord16.png')}) !important;
background-position: center;
background-repeat: no-repeat;
background-size: 16px 16px;
cursor: pointer;
}
.z-grid tbody tr.highlight td.z-cell {
background-color: #FFFFCC !important;
background-image: none !important;