Merge with fdeadc94d67201e8d02f497dfc34d054fd224c6b
This commit is contained in:
commit
6d7d975d22
|
@ -1,7 +1,8 @@
|
|||
CREATE OR REPLACE VIEW ad_sessioninfo_v AS
|
||||
SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive,
|
||||
SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive,
|
||||
s.created, s.createdby, s.updated, s.updatedby, s.websession,
|
||||
s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu,
|
||||
s.servername, s.ad_client_id AS login_client_id
|
||||
s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id,
|
||||
s.ad_session_uu as ad_sessioninfo_v_uu
|
||||
FROM ad_session s
|
||||
WHERE s.processed = 'N';
|
|
@ -1,7 +1,8 @@
|
|||
CREATE OR REPLACE VIEW ad_sessioninfo_v AS
|
||||
SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive,
|
||||
SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive,
|
||||
s.created, s.createdby, s.updated, s.updatedby, s.websession,
|
||||
s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu,
|
||||
s.servername, s.ad_client_id AS login_client_id
|
||||
s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id,
|
||||
s.ad_session_uu as ad_sessioninfo_v_uu
|
||||
FROM ad_session s
|
||||
WHERE s.processed = 'N'::bpchar;
|
|
@ -1,8 +1,9 @@
|
|||
CREATE OR REPLACE VIEW ad_sessioninfo_v AS
|
||||
SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive,
|
||||
SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive,
|
||||
s.created, s.createdby, s.updated, s.updatedby, s.websession,
|
||||
s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu,
|
||||
s.servername, s.ad_client_id AS login_client_id
|
||||
s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id,
|
||||
s.ad_session_uu as ad_sessioninfo_v_uu
|
||||
FROM ad_session s
|
||||
WHERE s.processed = 'N';
|
||||
|
||||
|
@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien
|
|||
|
||||
-- Oct 11, 2012 6:13:32 PM PDT
|
||||
-- IDEMPIERE-293-List of logged users
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 11, 2012 6:13:32 PM PDT
|
||||
|
@ -804,6 +805,404 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013
|
|||
DELETE FROM AD_Reference WHERE AD_Reference_ID=200013
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:35:06 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:35:07 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:53 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:53 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:59 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:59 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_DATE('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:03 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_PrintFormatItem pi SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200189)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_DATE('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_PrintFormatItem pi SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200186)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:13 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_DATE('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:39 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:39 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:40 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:40 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
-- Oct 19, 2012 2:02:21 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:04:08 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_DATE('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:04:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_DATE('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:05:16 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_DATE('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:54 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:54 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:12:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:12:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:33:58 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:33:58 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:34:16 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653
|
||||
;
|
||||
|
||||
|
||||
|
||||
SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
-- Oct 19, 2012 4:08:01 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:05 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:20 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:20 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:32 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:32 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:57 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_DATE('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:57 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:18 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:18 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:55 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:55 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual
|
||||
;
|
|
@ -1,8 +1,9 @@
|
|||
CREATE OR REPLACE VIEW ad_sessioninfo_v AS
|
||||
SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive,
|
||||
SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive,
|
||||
s.created, s.createdby, s.updated, s.updatedby, s.websession,
|
||||
s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu,
|
||||
s.servername, s.ad_client_id AS login_client_id
|
||||
s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id,
|
||||
s.ad_session_uu as ad_sessioninfo_v_uu
|
||||
FROM ad_session s
|
||||
WHERE s.processed = 'N'::bpchar;
|
||||
|
||||
|
@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien
|
|||
|
||||
-- Oct 11, 2012 6:13:32 PM PDT
|
||||
-- IDEMPIERE-293-List of logged users
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 11, 2012 6:13:32 PM PDT
|
||||
|
@ -805,7 +806,399 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013
|
|||
DELETE FROM AD_Reference WHERE AD_Reference_ID=200013
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:35:06 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:35:07 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:53 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:53 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:59 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:40:59 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_TIMESTAMP('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:02 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:03 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_PrintFormatItem SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200189)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_TIMESTAMP('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:44:52 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_PrintFormatItem SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200186)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:13 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:39 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:39 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:40 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:46:40 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:50:04 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 1:51:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:01:01 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:02:21 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:04:08 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_TIMESTAMP('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:04:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_TIMESTAMP('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:05:16 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_TIMESTAMP('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:54 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:54 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:10:55 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:12:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:12:49 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:32:50 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:33:58 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:33:58 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 2:34:16 PM IST
|
||||
-- IDEMPIERE-293 List of Active Session
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653
|
||||
|
||||
SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual
|
||||
;
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
-- Oct 19, 2012 4:08:01 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:05 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:20 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:08:20 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:32 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:32 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:57 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_TIMESTAMP('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:09:57 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:18 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:18 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:55 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Oct 19, 2012 4:10:55 PM SGT
|
||||
-- IDEMPIERE-392 Redesign payment button
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual
|
||||
;
|
|
@ -249,7 +249,7 @@ public class ImmediateBankTransfer extends SvrProcess
|
|||
MCash cash = createCash();
|
||||
MCashLine cashLines[]= createCashLines(cash);
|
||||
|
||||
StringBuilder processMsg = new StringBuilder(cash.getDocumentNo());
|
||||
StringBuilder processMsg = new StringBuilder().append(cash.getDocumentNo());
|
||||
|
||||
cash.setDocAction(p_docAction);
|
||||
if (!cash.processIt(p_docAction))
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.ResultSet;
|
|||
import java.sql.Timestamp;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MAcctSchema;
|
||||
import org.compiere.model.MAttributeSet;
|
||||
import org.compiere.model.MAttributeSetInstance;
|
||||
|
@ -29,6 +30,7 @@ import org.compiere.model.MCost;
|
|||
import org.compiere.model.MInventory;
|
||||
import org.compiere.model.MInventoryLine;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MProductCategoryAcct;
|
||||
import org.compiere.model.X_I_Inventory;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.TimeUtil;
|
||||
|
@ -356,12 +358,12 @@ public class ImportInventory extends SvrProcess
|
|||
x_isInternalUse = isInternalUse;
|
||||
noInsert++;
|
||||
}
|
||||
|
||||
MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID());
|
||||
// Line
|
||||
int M_AttributeSetInstance_ID = 0;
|
||||
if ((imp.getLot() != null && imp.getLot().length() > 0) || (imp.getSerNo() != null && imp.getSerNo().length() > 0))
|
||||
{
|
||||
MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID());
|
||||
|
||||
if (product.isInstanceAttribute())
|
||||
{
|
||||
MAttributeSet mas = product.getAttributeSet();
|
||||
|
@ -394,15 +396,28 @@ public class ImportInventory extends SvrProcess
|
|||
noInsertLine++;
|
||||
//@Trifon update Product cost record if Update costing is enabled
|
||||
if (p_UpdateCosting) {
|
||||
MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), /*M_AttributeSetInstance_ID*/ 0
|
||||
, acctSchema, p_AD_OrgTrx_ID, p_M_CostElement_ID, get_TrxName());
|
||||
cost.setCurrentCostPrice( imp.getCurrentCostPrice() );
|
||||
if (cost.save()) {
|
||||
// nothing here.
|
||||
} else {
|
||||
log.log(Level.SEVERE, "Cost not saved!");
|
||||
break;
|
||||
String costingLevel = null;
|
||||
if(product.getM_Product_Category_ID() > 0){
|
||||
MProductCategoryAcct pca = MProductCategoryAcct.get(getCtx(), product.getM_Product_Category_ID(), p_C_AcctSchema_ID, get_TrxName());
|
||||
costingLevel = pca.getCostingLevel();
|
||||
if (costingLevel == null) {
|
||||
costingLevel = acctSchema.getCostingLevel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int costOrgID = p_AD_OrgTrx_ID;
|
||||
int costASI = line.getM_AttributeSetInstance_ID();
|
||||
if (MAcctSchema.COSTINGLEVEL_Client.equals(costingLevel)){
|
||||
costOrgID = 0;
|
||||
costASI = 0;
|
||||
} else if (MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel)) {
|
||||
costASI = 0;
|
||||
}
|
||||
MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), costASI
|
||||
, acctSchema, costOrgID, p_M_CostElement_ID, get_TrxName());
|
||||
cost.setCurrentCostPrice( imp.getCurrentCostPrice() );
|
||||
cost.saveEx();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -412,7 +427,7 @@ public class ImportInventory extends SvrProcess
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, sql.toString(), e);
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
|
||||
// Set Error to indicator to not imported
|
||||
|
|
|
@ -90,7 +90,7 @@ public class ImportOrder extends SvrProcess
|
|||
{
|
||||
StringBuilder sql = null;
|
||||
int no = 0;
|
||||
String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID;
|
||||
StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID);
|
||||
|
||||
// **** Prepare ****
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ProjectPhaseGenOrder extends SvrProcess
|
|||
{
|
||||
MOrderLine ol = new MOrderLine(order);
|
||||
ol.setLine(fromPhase.getSeqNo());
|
||||
StringBuilder sb = new StringBuilder (fromPhase.getName());
|
||||
StringBuilder sb = new StringBuilder ().append(fromPhase.getName());
|
||||
if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0)
|
||||
sb.append(" - ").append(fromPhase.getDescription());
|
||||
ol.setDescription(sb.toString());
|
||||
|
@ -122,7 +122,7 @@ public class ProjectPhaseGenOrder extends SvrProcess
|
|||
{
|
||||
MOrderLine ol = new MOrderLine(order);
|
||||
ol.setLine(tasks[i].getSeqNo());
|
||||
StringBuilder sb = new StringBuilder (tasks[i].getName());
|
||||
StringBuilder sb = new StringBuilder ().append(tasks[i].getName());
|
||||
if (tasks[i].getDescription() != null && tasks[i].getDescription().length() > 0)
|
||||
sb.append(" - ").append(tasks[i].getDescription());
|
||||
ol.setDescription(sb.toString());
|
||||
|
|
|
@ -746,7 +746,7 @@ public class RequestEMailProcessor extends SvrProcess
|
|||
String deliveryMessage = null;
|
||||
if (content instanceof InputStream)
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
InputStream is = (InputStream)content;
|
||||
int c;
|
||||
while ((c = is.read()) != -1)
|
||||
|
|
|
@ -92,7 +92,7 @@ public class TaxNotFoundException extends AdempiereException
|
|||
return "?";
|
||||
}
|
||||
MLocation loc = MLocation.get(Env.getCtx(), C_Location_ID, null);
|
||||
if (loc == null | loc.get_ID() != C_Location_ID)
|
||||
if (loc == null || loc.get_ID() != C_Location_ID)
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ public class PromotionRule {
|
|||
//optional promotion code filter
|
||||
String promotionCode = (String)order.get_Value("PromotionCode");
|
||||
|
||||
StringBuffer sql = new StringBuffer();
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append(select)
|
||||
.append(" WHERE")
|
||||
.append(" (" + bpFilter + ")")
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.util;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -12,6 +25,11 @@ import org.compiere.model.MBPartner;
|
|||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class PaymentUtil {
|
||||
|
||||
private static final CLogger logger = CLogger.getCLogger(PaymentUtil.class);
|
||||
|
|
|
@ -70,7 +70,7 @@ public class Doc_AllocationHdr extends Doc
|
|||
} // Doc_Allocation
|
||||
|
||||
/** Tolerance G&L */
|
||||
private static final BigDecimal TOLERANCE = new BigDecimal (0.02);
|
||||
private static final BigDecimal TOLERANCE = BigDecimal.valueOf(0.02);
|
||||
/** Facts */
|
||||
private ArrayList<Fact> m_facts = null;
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ public class CreateAdempiere
|
|||
if (def != null)
|
||||
{
|
||||
//jz: replace '' to \', otherwise exception
|
||||
def.replaceAll("''", "\\'");
|
||||
def = def.replaceAll("''", "\\'");
|
||||
sb.append(" DEFAULT ").append(def);
|
||||
}
|
||||
// Null
|
||||
|
|
|
@ -214,8 +214,8 @@ public class GridTabVO implements Evaluatee, Serializable
|
|||
if (vo.WhereClause == null)
|
||||
vo.WhereClause = "";
|
||||
//jz col=null not good for Derby
|
||||
if (vo.WhereClause.indexOf("=null")>0)
|
||||
vo.WhereClause.replaceAll("=null", " IS NULL ");
|
||||
if (vo.WhereClause.indexOf("=null")>0)
|
||||
vo.WhereClause = vo.WhereClause.replaceAll("=null", " IS NULL ");
|
||||
// Where Clauses should be surrounded by parenthesis - teo_sarca, BF [ 1982327 ]
|
||||
if (vo.WhereClause.trim().length() > 0) {
|
||||
vo.WhereClause = "("+vo.WhereClause+")";
|
||||
|
|
|
@ -442,7 +442,7 @@ public class MAsset extends X_A_Asset
|
|||
MAssetGroupAcct assetgrpacct = new MAssetGroupAcct (getCtx(), rs, get_TrxName());
|
||||
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
|
||||
isdepreciate = assetgrpacct.isProcessing();
|
||||
if (isDepreciated()== true | isdepreciate == true)
|
||||
if (isDepreciated()== true || isdepreciate == true)
|
||||
{
|
||||
assetacct.setPostingType(assetgrpacct.getPostingType());
|
||||
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
|
||||
|
@ -454,7 +454,7 @@ public class MAsset extends X_A_Asset
|
|||
assetacct.setA_Period_Start(1);
|
||||
|
||||
|
||||
if (getUseLifeMonths() == 0 & getUseLifeYears() == 0){
|
||||
if (getUseLifeMonths() == 0 && getUseLifeYears() == 0){
|
||||
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
|
||||
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
|
||||
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
|
||||
|
@ -541,7 +541,7 @@ public class MAsset extends X_A_Asset
|
|||
if (DB.getSQLValue(get_TrxName(), sql2, asset.getA_Asset_ID(),assetgrpacct.getPostingType())== 0)
|
||||
{
|
||||
|
||||
if (isDepreciated()== true | isdepreciate == true)
|
||||
if (isDepreciated()== true || isdepreciate == true)
|
||||
{
|
||||
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
|
||||
assetwk.setA_Asset_ID(p_A_Asset_ID);
|
||||
|
|
|
@ -217,7 +217,7 @@ public class MBPGroup extends X_C_BP_Group
|
|||
BigDecimal bd = super.getCreditWatchPercent();
|
||||
if (bd.compareTo(Env.ZERO) != 0)
|
||||
return bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
||||
return new BigDecimal(0.90);
|
||||
return BigDecimal.valueOf(0.90);
|
||||
} // getCreditWatchRatio
|
||||
|
||||
|
||||
|
|
|
@ -270,12 +270,12 @@ public class MDistribution extends X_GL_Distribution
|
|||
*/
|
||||
public String validate()
|
||||
{
|
||||
StringBuilder retValue = null;
|
||||
String retValue = null;
|
||||
getLines(true);
|
||||
if (m_lines.length == 0)
|
||||
retValue = new StringBuilder("@NoLines@");
|
||||
retValue = "@NoLines@";
|
||||
else if (getPercentTotal().compareTo(Env.ONEHUNDRED) != 0)
|
||||
retValue = new StringBuilder("@PercentTotal@ <> 100");
|
||||
retValue = "@PercentTotal@ <> 100";
|
||||
else
|
||||
{
|
||||
// More then one line with 0
|
||||
|
@ -286,8 +286,8 @@ public class MDistribution extends X_GL_Distribution
|
|||
{
|
||||
if (lineFound >= 0 && m_lines[i].getPercent().compareTo(Env.ZERO) == 0)
|
||||
{
|
||||
retValue = new StringBuilder("@Line@ ").append(lineFound)
|
||||
.append(" + ").append(m_lines[i].getLine()).append(": == 0");
|
||||
retValue = "@Line@ " + lineFound
|
||||
+ " + " + m_lines[i].getLine() + ": == 0";
|
||||
break;
|
||||
}
|
||||
lineFound = m_lines[i].getLine();
|
||||
|
@ -296,7 +296,7 @@ public class MDistribution extends X_GL_Distribution
|
|||
}
|
||||
|
||||
setIsValid (retValue == null);
|
||||
return retValue.toString();
|
||||
return retValue;
|
||||
} // validate
|
||||
|
||||
|
||||
|
|
|
@ -850,7 +850,10 @@ public final class MPayment extends X_C_Payment
|
|||
}
|
||||
}
|
||||
if (m_mBankAccountProcessor != null)
|
||||
{
|
||||
setC_BankAccount_ID (m_mBankAccountProcessor.getC_BankAccount_ID());
|
||||
setC_PaymentProcessor_ID (m_mBankAccountProcessor.getC_PaymentProcessor_ID());
|
||||
}
|
||||
//
|
||||
return m_mBankAccountProcessor != null;
|
||||
} // setPaymentProcessor
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -14,8 +27,18 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.NamePair;
|
||||
import org.compiere.util.ValueNamePair;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class MPaymentLookup extends Lookup implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -6863672221350217533L;
|
||||
|
||||
private static final int PAYMENT_RULE_REFERENCE_ID = 195;
|
||||
|
||||
/** Context */
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MPaymentProcessor extends X_C_PaymentProcessor
|
|||
* @param trxName transaction
|
||||
* @return Array of BankAccount[0] & PaymentProcessor[1] or null
|
||||
*/
|
||||
protected static MBankAccountProcessor[] find (Properties ctx,
|
||||
public static MBankAccountProcessor[] find (Properties ctx,
|
||||
String tender, String CCType,
|
||||
int AD_Client_ID, int C_Currency_ID, BigDecimal Amt, String trxName)
|
||||
{
|
||||
|
|
|
@ -229,145 +229,145 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
|||
if (from.isMinute())
|
||||
{
|
||||
if (to.isHour())
|
||||
return new BigDecimal(1.0/60.0);
|
||||
return BigDecimal.valueOf(1.0/60.0);
|
||||
if (to.isDay())
|
||||
return new BigDecimal(1.0/1440.0); // 24 * 60
|
||||
return BigDecimal.valueOf(1.0/1440.0); // 24 * 60
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(1.0/480.0); // 8 * 60
|
||||
return BigDecimal.valueOf(1.0/480.0); // 8 * 60
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(1.0/10080.0); // 7 * 24 * 60
|
||||
return BigDecimal.valueOf(1.0/10080.0); // 7 * 24 * 60
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(1.0/43200.0); // 30 * 24 * 60
|
||||
return BigDecimal.valueOf(1.0/43200.0); // 30 * 24 * 60
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.0/9600.0); // 4 * 5 * 8 * 60
|
||||
return BigDecimal.valueOf(1.0/9600.0); // 4 * 5 * 8 * 60
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/525600.0); // 365 * 24 * 60
|
||||
return BigDecimal.valueOf(1.0/525600.0); // 365 * 24 * 60
|
||||
}
|
||||
// Time - Hour
|
||||
if (from.isHour())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(60.0);
|
||||
return BigDecimal.valueOf(60.0);
|
||||
if (to.isDay())
|
||||
return new BigDecimal(1.0/24.0);
|
||||
return BigDecimal.valueOf(1.0/24.0);
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(1.0/8.0);
|
||||
return BigDecimal.valueOf(1.0/8.0);
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(1.0/168.0); // 7 * 24
|
||||
return BigDecimal.valueOf(1.0/168.0); // 7 * 24
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(1.0/720.0); // 30 * 24
|
||||
return BigDecimal.valueOf(1.0/720.0); // 30 * 24
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.0/160.0); // 4 * 5 * 8
|
||||
return BigDecimal.valueOf(1.0/160.0); // 4 * 5 * 8
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/8760.0); // 365 * 24
|
||||
return BigDecimal.valueOf(1.0/8760.0); // 365 * 24
|
||||
}
|
||||
// Time - Day
|
||||
if (from.isDay())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(1440.0); // 24 * 60
|
||||
return BigDecimal.valueOf(1440.0); // 24 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(24.0);
|
||||
return BigDecimal.valueOf(24.0);
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(3.0); // 24 / 8
|
||||
return BigDecimal.valueOf(3.0); // 24 / 8
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(1.0/7.0); // 7
|
||||
return BigDecimal.valueOf(1.0/7.0); // 7
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(1.0/30.0); // 30
|
||||
return BigDecimal.valueOf(1.0/30.0); // 30
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/365.0); // 365
|
||||
return BigDecimal.valueOf(1.0/365.0); // 365
|
||||
}
|
||||
// Time - WorkDay
|
||||
if (from.isWorkDay())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(480.0); // 8 * 60
|
||||
return BigDecimal.valueOf(480.0); // 8 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(8.0); // 8
|
||||
return BigDecimal.valueOf(8.0); // 8
|
||||
if (to.isDay())
|
||||
return new BigDecimal(1.0/3.0); // 24 / 8
|
||||
return BigDecimal.valueOf(1.0/3.0); // 24 / 8
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(1.0/5); // 5
|
||||
return BigDecimal.valueOf(1.0/5); // 5
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/240.0); // 4 * 5 * 12
|
||||
return BigDecimal.valueOf(1.0/240.0); // 4 * 5 * 12
|
||||
}
|
||||
// Time - Week
|
||||
if (from.isWeek())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(10080.0); // 7 * 24 * 60
|
||||
return BigDecimal.valueOf(10080.0); // 7 * 24 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(168.0); // 7 * 24
|
||||
return BigDecimal.valueOf(168.0); // 7 * 24
|
||||
if (to.isDay())
|
||||
return new BigDecimal(7.0);
|
||||
return BigDecimal.valueOf(7.0);
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(5.0);
|
||||
return BigDecimal.valueOf(5.0);
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(1.0/4.0); // 4
|
||||
return BigDecimal.valueOf(1.0/4.0); // 4
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.0/4.0); // 4
|
||||
return BigDecimal.valueOf(1.0/4.0); // 4
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/50.0); // 50
|
||||
return BigDecimal.valueOf(1.0/50.0); // 50
|
||||
}
|
||||
// Time - Month
|
||||
if (from.isMonth())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(43200.0); // 30 * 24 * 60
|
||||
return BigDecimal.valueOf(43200.0); // 30 * 24 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(720.0); // 30 * 24
|
||||
return BigDecimal.valueOf(720.0); // 30 * 24
|
||||
if (to.isDay())
|
||||
return new BigDecimal(30.0); // 30
|
||||
return BigDecimal.valueOf(30.0); // 30
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(4.0); // 4
|
||||
return BigDecimal.valueOf(4.0); // 4
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(1.5); // 30 / 20
|
||||
return BigDecimal.valueOf(1.5); // 30 / 20
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/12.0); // 12
|
||||
return BigDecimal.valueOf(1.0/12.0); // 12
|
||||
}
|
||||
// Time - WorkMonth
|
||||
if (from.isWorkMonth())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(9600.0); // 4 * 5 * 8 * 60
|
||||
return BigDecimal.valueOf(9600.0); // 4 * 5 * 8 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(160.0); // 4 * 5 * 8
|
||||
return BigDecimal.valueOf(160.0); // 4 * 5 * 8
|
||||
if (to.isDay())
|
||||
return new BigDecimal(20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(20.0); // 4 * 5
|
||||
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(4.0); // 4
|
||||
return BigDecimal.valueOf(4.0); // 4
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(20.0/30.0); // 20 / 30
|
||||
return BigDecimal.valueOf(20.0/30.0); // 20 / 30
|
||||
if (to.isYear())
|
||||
return new BigDecimal(1.0/12.0); // 12
|
||||
return BigDecimal.valueOf(1.0/12.0); // 12
|
||||
}
|
||||
// Time - Year
|
||||
if (from.isYear())
|
||||
{
|
||||
if (to.isMinute())
|
||||
return new BigDecimal(518400.0); // 12 * 30 * 24 * 60
|
||||
return BigDecimal.valueOf(518400.0); // 12 * 30 * 24 * 60
|
||||
if (to.isHour())
|
||||
return new BigDecimal(8640.0); // 12 * 30 * 24
|
||||
return BigDecimal.valueOf(8640.0); // 12 * 30 * 24
|
||||
if (to.isDay())
|
||||
return new BigDecimal(365.0); // 365
|
||||
return BigDecimal.valueOf(365.0); // 365
|
||||
if (to.isWorkDay())
|
||||
return new BigDecimal(240.0); // 12 * 4 * 5
|
||||
return BigDecimal.valueOf(240.0); // 12 * 4 * 5
|
||||
if (to.isWeek())
|
||||
return new BigDecimal(50.0); // 52
|
||||
return BigDecimal.valueOf(50.0); // 52
|
||||
if (to.isMonth())
|
||||
return new BigDecimal(12.0); // 12
|
||||
return BigDecimal.valueOf(12.0); // 12
|
||||
if (to.isWorkMonth())
|
||||
return new BigDecimal(12.0); // 12
|
||||
return BigDecimal.valueOf(12.0); // 12
|
||||
}
|
||||
//
|
||||
return null;
|
||||
|
@ -620,7 +620,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
|||
/** Static Logger */
|
||||
private static final CLogger s_log = CLogger.getCLogger(MUOMConversion.class);
|
||||
/** Indicator for Rate */
|
||||
private static final BigDecimal GETRATE = new BigDecimal(123.456);
|
||||
private static final BigDecimal GETRATE = BigDecimal.valueOf(123.456);
|
||||
/** Conversion Map: Key=Point(from,to) Value=BigDecimal */
|
||||
private static CCache<Point,BigDecimal> s_conversions = null;
|
||||
/** Product Conversion Map */
|
||||
|
|
|
@ -291,13 +291,13 @@ public class MWFProcess extends X_AD_WF_Process
|
|||
//
|
||||
if (closedState == null)
|
||||
closedState = activityWFState;
|
||||
else if (!closedState.equals(activityState))
|
||||
else if (!closedState.equals(activityState.getState()))
|
||||
{
|
||||
// Overwrite if terminated
|
||||
if (WFSTATE_Terminated.equals(activityState))
|
||||
if (activityState.isTerminated())
|
||||
closedState = activityWFState;
|
||||
// Overwrite if activity aborted and no other terminated
|
||||
else if (WFSTATE_Aborted.equals(activityState) && !WFSTATE_Terminated.equals(closedState))
|
||||
else if (activityState.isAborted() && !WFSTATE_Terminated.equals(closedState))
|
||||
closedState = activityWFState;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ public class CashFlow extends SvrProcess {
|
|||
open = open.subtract(paid);
|
||||
}
|
||||
if (open.scale() > curr.getStdPrecision())
|
||||
open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
open = open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal invoiced = order.getGrandTotal().subtract(open);
|
||||
if (isPaySchedule) {
|
||||
MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule(getCtx(), order_id, 0, get_TrxName());
|
||||
|
|
|
@ -420,7 +420,7 @@ public class ExportHelper {
|
|||
whereClause.append(" AND ").append(embeddedFormat.getWhereClause());
|
||||
}
|
||||
String columnName = "";
|
||||
if(formatLine.getAD_Reference_ID()== DisplayType.Table | formatLine.getAD_Reference_ID()==DisplayType.Search)
|
||||
if(formatLine.getAD_Reference_ID()== DisplayType.Table || formatLine.getAD_Reference_ID()==DisplayType.Search)
|
||||
{
|
||||
MColumn column = MColumn.get(masterPO.getCtx(), formatLine.getAD_Column_ID());
|
||||
columnName = column.getColumnName();
|
||||
|
|
|
@ -1206,7 +1206,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
|
|||
{
|
||||
CTabbedPane tab = (CTabbedPane) e.getSource();
|
||||
|
||||
if(tab.getSelectedIndex() == 4 & warehouseTbl.getRowCount() > 0)
|
||||
if(tab.getSelectedIndex() == 4 && warehouseTbl.getRowCount() > 0)
|
||||
{
|
||||
// If no warehouse row is selected in the warehouse tab, use the first warehouse
|
||||
// row to prevent array index out of bounds. BF 3051361
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
|
@ -23,7 +36,11 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormCash extends PaymentFormCash implements ActionListener {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
@ -209,7 +226,7 @@ public class VPaymentFormCash extends PaymentFormCash implements ActionListener
|
|||
else if (processMsg != null)
|
||||
ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg);
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.Dimension;
|
||||
|
@ -6,6 +19,8 @@ import java.awt.GridBagLayout;
|
|||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
|
@ -14,6 +29,7 @@ import org.adempiere.plaf.AdempierePLAF;
|
|||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.grid.ed.VNumber;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MConversionRate;
|
||||
import org.compiere.model.MPaymentValidate;
|
||||
import org.compiere.swing.CButton;
|
||||
|
@ -24,7 +40,12 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener {
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener, FocusListener {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
||||
|
@ -64,6 +85,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene
|
|||
sRoutingField.setPreferredSize(new Dimension(70, 21));
|
||||
sStatus.setText(" ");
|
||||
sOnline.setText(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
sOnline.addActionListener(this);
|
||||
dialog.getPanel().add(sBankAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 2, 0), 0, 0));
|
||||
dialog.getPanel().add(sBankAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
|
||||
|
@ -76,6 +98,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene
|
|||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0));
|
||||
dialog.getPanel().add(sAmountField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0));
|
||||
sAmountField.addFocusListener(this);
|
||||
dialog.getPanel().add(sRoutingLabel, new GridBagConstraints(0, 3, 1, 2, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 2, 0), 0, 0));
|
||||
dialog.getPanel().add(sRoutingField, new GridBagConstraints(1, 3, 2, 1, 0.0, 0.0
|
||||
|
@ -133,19 +156,63 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene
|
|||
// Set Selection
|
||||
if (selectedBankAccount != null)
|
||||
sBankAccountCombo.setSelectedItem(selectedBankAccount);
|
||||
|
||||
boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue());
|
||||
sOnline.setVisible(exist);
|
||||
|
||||
if (exist)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
if (e.getSource() == sCurrencyCombo)
|
||||
{
|
||||
int C_Currency_ID = 0;
|
||||
KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem();
|
||||
if (pp != null)
|
||||
C_Currency_ID = pp.getKey();
|
||||
|
||||
BigDecimal amt = MConversionRate.convert(Env.getCtx(),
|
||||
m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID);
|
||||
m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID);
|
||||
sAmountField.setValue(amt);
|
||||
|
||||
updateOnlineButton();
|
||||
}
|
||||
else if (e.getSource() == sOnline)
|
||||
processOnline();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
if (e.getSource() == sAmountField)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
private void updateOnlineButton()
|
||||
{
|
||||
int C_Currency_ID = 0;
|
||||
KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem();
|
||||
if (pp != null)
|
||||
C_Currency_ID = pp.getKey();
|
||||
|
||||
BigDecimal PayAmt = (BigDecimal) sAmountField.getValue();
|
||||
|
||||
if (C_Currency_ID > 0 && PayAmt != null)
|
||||
{
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt);
|
||||
sOnline.setEnabled(bankAccountProcessor != null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
else
|
||||
{
|
||||
sOnline.setEnabled(false);
|
||||
setBankAccountProcessor(null);
|
||||
}
|
||||
// else if (e.getSource() == sOnline)
|
||||
// processOnline();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -203,7 +270,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene
|
|||
else if (processMsg != null)
|
||||
ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.Dimension;
|
||||
|
@ -6,11 +19,15 @@ import java.awt.GridBagLayout;
|
|||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.grid.ed.VNumber;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MPaymentProcessor;
|
||||
import org.compiere.swing.CButton;
|
||||
import org.compiere.swing.CComboBox;
|
||||
import org.compiere.swing.CLabel;
|
||||
|
@ -19,7 +36,12 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.ValueNamePair;
|
||||
|
||||
public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener {
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener, FocusListener {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
||||
|
@ -65,6 +87,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
|
|||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0));
|
||||
dialog.getPanel().add(kTypeCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
|
||||
kTypeCombo.addActionListener(this);
|
||||
dialog.getPanel().add(kNumberLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0));
|
||||
dialog.getPanel().add(kNumberField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
|
||||
|
@ -81,6 +104,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
|
|||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0));
|
||||
dialog.getPanel().add(kAmountField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0));
|
||||
kAmountField.addFocusListener(this);
|
||||
dialog.getPanel().add(kApprovalLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
|
||||
dialog.getPanel().add(kApprovalField, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0
|
||||
|
@ -124,12 +148,66 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
|
|||
// Set Selection
|
||||
if (selectedCreditCard != null)
|
||||
kTypeCombo.setSelectedItem(selectedCreditCard);
|
||||
|
||||
if (m_mPayment.isApproved())
|
||||
{
|
||||
kOnline.setVisible(true);
|
||||
kOnline.setEnabled(false);
|
||||
|
||||
MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue());
|
||||
kOnline.setVisible(exist);
|
||||
|
||||
if (exist)
|
||||
updateOnlineButton();
|
||||
}
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
if (e.getSource() == kOnline)
|
||||
processOnline();
|
||||
else if (e.getSource() == kTypeCombo)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
if (e.getSource() == kAmountField)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
private void updateOnlineButton()
|
||||
{
|
||||
String CCType = null;
|
||||
ValueNamePair vp = (ValueNamePair)kTypeCombo.getSelectedItem();
|
||||
if (vp != null)
|
||||
CCType = vp.getValue();
|
||||
|
||||
BigDecimal PayAmt = (BigDecimal) kAmountField.getValue();
|
||||
|
||||
if (CCType != null && PayAmt != null)
|
||||
{
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt);
|
||||
kOnline.setEnabled(bankAccountProcessor != null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
|
||||
MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null);
|
||||
kApprovalField.setReadWrite(paymentProcessor.isRequireVV());
|
||||
}
|
||||
else
|
||||
{
|
||||
kOnline.setEnabled(false);
|
||||
setBankAccountProcessor(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,7 +228,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
|
|||
else if (processMsg != null)
|
||||
ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg);
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
|
@ -15,10 +28,19 @@ import org.compiere.swing.CPanel;
|
|||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormDialog extends CDialog implements ActionListener
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6249016140530436885L;
|
||||
private PaymentForm paymentForm;
|
||||
private int windowNo;
|
||||
// private int windowNo;
|
||||
|
||||
private CPanel mainPanel = new CPanel();
|
||||
private BorderLayout mainLayout = new BorderLayout();
|
||||
|
@ -32,7 +54,7 @@ public class VPaymentFormDialog extends CDialog implements ActionListener
|
|||
super(AEnv.getWindow(windowNo), Msg.getMsg(Env.getCtx(), "Payment"), true);
|
||||
|
||||
this.paymentForm = paymentForm;
|
||||
this.windowNo = windowNo;
|
||||
// this.windowNo = windowNo;
|
||||
|
||||
try {
|
||||
jbInit();
|
||||
|
|
|
@ -0,0 +1,159 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.adempiere.plaf.AdempierePLAF;
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.swing.CButton;
|
||||
import org.compiere.swing.CComboBox;
|
||||
import org.compiere.swing.CLabel;
|
||||
import org.compiere.swing.CTextField;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class VPaymentFormDirect extends PaymentFormDirect implements ActionListener {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
||||
private CLabel tAccountLabel = new CLabel();
|
||||
private CComboBox tAccountCombo = new CComboBox();
|
||||
private CButton tOnline = new CButton();
|
||||
private CTextField tRoutingField = new CTextField();
|
||||
private CTextField tNumberField = new CTextField();
|
||||
private CLabel tStatus = new CLabel();
|
||||
private CLabel tRoutingText = new CLabel();
|
||||
private CLabel tNumberText = new CLabel();
|
||||
|
||||
public VPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) {
|
||||
super(windowNo, mTab, isDebit);
|
||||
dialog = new VPaymentFormDialog(this, windowNo);
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
GridBagLayout tPanelLayout = new GridBagLayout();
|
||||
dialog.getPanel().setLayout(tPanelLayout);
|
||||
tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID"));
|
||||
tRoutingField.setColumns(8);
|
||||
tNumberField.setColumns(10);
|
||||
tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo"));
|
||||
tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo"));
|
||||
tOnline.setText(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
tOnline.addActionListener(this);
|
||||
tStatus.setText(" ");
|
||||
dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
|
||||
dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
|
||||
dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
|
||||
dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
|
||||
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
|
||||
dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
|
||||
dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
if (m_C_Payment_ID != 0)
|
||||
{
|
||||
tRoutingField.setText(m_mPayment.getRoutingNo());
|
||||
tNumberField.setText(m_mPayment.getAccountNo());
|
||||
tStatus.setText(m_mPayment.getR_PnRef());
|
||||
}
|
||||
|
||||
ArrayList<KeyNamePair> list = getBPBankAccountList();
|
||||
for (KeyNamePair pp : list)
|
||||
tAccountCombo.addItem(pp);
|
||||
|
||||
boolean exist = isBankAccountProcessorExist();
|
||||
tOnline.setVisible(exist);
|
||||
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor();
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
if (e.getSource() == tOnline)
|
||||
processOnline();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMandatory() {
|
||||
/***********************
|
||||
* Mandatory Data Check
|
||||
*/
|
||||
boolean dataOK = true;
|
||||
KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem();
|
||||
if (bpba == null)
|
||||
{
|
||||
tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error());
|
||||
ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound");
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
log.config("OK=" + dataOK);
|
||||
return dataOK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveChangesInTrx(String trxName) {
|
||||
boolean ok = save(0, tRoutingField.getText(), tNumberField.getText());
|
||||
if (!ok)
|
||||
ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow()
|
||||
{
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow()
|
||||
{
|
||||
dialog.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getWindow() {
|
||||
return dialog;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,29 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
|
||||
public class VPaymentFormDirectDebit extends VPaymentFormDirectDeposit {
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormDirectDebit extends VPaymentFormDirect {
|
||||
|
||||
public VPaymentFormDirectDebit(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
public VPaymentFormDirectDebit(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,125 +1,28 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.adempiere.plaf.AdempierePLAF;
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.swing.CButton;
|
||||
import org.compiere.swing.CComboBox;
|
||||
import org.compiere.swing.CLabel;
|
||||
import org.compiere.swing.CTextField;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
public class VPaymentFormDirectDeposit extends PaymentFormDirectDeposit {
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormDirectDeposit extends VPaymentFormDirect {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
||||
private CLabel tAccountLabel = new CLabel();
|
||||
private CComboBox tAccountCombo = new CComboBox();
|
||||
private CButton tOnline = new CButton();
|
||||
private CTextField tRoutingField = new CTextField();
|
||||
private CTextField tNumberField = new CTextField();
|
||||
private CLabel tStatus = new CLabel();
|
||||
private CLabel tRoutingText = new CLabel();
|
||||
private CLabel tNumberText = new CLabel();
|
||||
|
||||
public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab);
|
||||
dialog = new VPaymentFormDialog(this, windowNo);
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
GridBagLayout tPanelLayout = new GridBagLayout();
|
||||
dialog.getPanel().setLayout(tPanelLayout);
|
||||
tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID"));
|
||||
tRoutingField.setColumns(8);
|
||||
tNumberField.setColumns(10);
|
||||
tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo"));
|
||||
tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo"));
|
||||
tOnline.setText(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
tStatus.setText(" ");
|
||||
dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
|
||||
dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
|
||||
dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
|
||||
dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
|
||||
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
|
||||
dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
|
||||
dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
if (m_C_Payment_ID != 0)
|
||||
{
|
||||
tRoutingField.setText(m_mPayment.getRoutingNo());
|
||||
tNumberField.setText(m_mPayment.getAccountNo());
|
||||
tStatus.setText(m_mPayment.getR_PnRef());
|
||||
}
|
||||
|
||||
ArrayList<KeyNamePair> list = getBankAccountList();
|
||||
for (KeyNamePair pp : list)
|
||||
tAccountCombo.addItem(pp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMandatory() {
|
||||
/***********************
|
||||
* Mandatory Data Check
|
||||
*/
|
||||
boolean dataOK = true;
|
||||
KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem();
|
||||
if (bpba == null)
|
||||
{
|
||||
tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error());
|
||||
ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound");
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
log.config("OK=" + dataOK);
|
||||
return dataOK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveChangesInTrx(String trxName) {
|
||||
boolean ok = save();
|
||||
if (!ok)
|
||||
ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow()
|
||||
{
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow()
|
||||
{
|
||||
dialog.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getWindow() {
|
||||
return dialog;
|
||||
super(windowNo, mTab, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,30 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.util.CLogger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormFactory {
|
||||
/** Static Logger */
|
||||
private static CLogger s_log = CLogger.getCLogger (VPaymentFormFactory.class);
|
||||
|
@ -27,13 +46,13 @@ public class VPaymentFormFactory {
|
|||
{
|
||||
// Register defaults:
|
||||
s_registeredClasses = new HashMap<String, Class<? extends IPaymentForm>>();
|
||||
s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, VPaymentFormCash.class);
|
||||
s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, VPaymentFormCheck.class);
|
||||
s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, VPaymentFormCreditCard.class);
|
||||
s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, VPaymentFormDirectDebit.class);
|
||||
s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, VPaymentFormDirectDeposit.class);
|
||||
s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, VPaymentFormMixedPOS.class);
|
||||
s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, VPaymentFormOnCredit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, VPaymentFormCash.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, VPaymentFormCheck.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, VPaymentFormCreditCard.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, VPaymentFormDirectDebit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, VPaymentFormDirectDeposit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, VPaymentFormMixedPOS.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, VPaymentFormOnCredit.class);
|
||||
}
|
||||
|
||||
public static IPaymentForm create (int windowNo, GridTab mTab, String paymentRule)
|
||||
|
|
|
@ -1,7 +1,25 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormMixedPOS extends PaymentFormMixedPOS {
|
||||
private VPaymentFormDialog dialog;
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
|
@ -12,6 +25,11 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentFormOnCredit extends PaymentFormOnCredit {
|
||||
|
||||
private VPaymentFormDialog dialog;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid.ed;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
|
@ -27,8 +40,17 @@ import org.compiere.util.DisplayType;
|
|||
import org.compiere.util.Env;
|
||||
import org.compiere.util.NamePair;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class VPaymentEditor extends JComponent implements VEditor, ActionListener, FocusListener {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1840246214698245287L;
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(VPaymentEditor.class);
|
||||
/** Search: The Button to open Editor */
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -28,6 +41,11 @@ import org.compiere.util.Msg;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormCash extends PaymentFormCash implements EventListener<Event> {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
@ -224,7 +242,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener<E
|
|||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg);
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -14,6 +27,7 @@ import org.adempiere.webui.component.Label;
|
|||
import org.adempiere.webui.component.ListItem;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
|
@ -21,16 +35,24 @@ import org.adempiere.webui.editor.WNumberEditor;
|
|||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.grid.PaymentFormCheck;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MConversionRate;
|
||||
import org.compiere.model.MPaymentValidate;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.au.out.AuEcho;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Cell;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Space;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormCheck extends PaymentFormCheck implements EventListener<Event> {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
@ -39,6 +61,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
private Listbox sBankAccountCombo = ListboxFactory.newDropdownListbox();
|
||||
private Label sCurrencyLabel = new Label();
|
||||
private Listbox sCurrencyCombo = ListboxFactory.newDropdownListbox();
|
||||
private Space sCurrencySpace = new Space();
|
||||
private Label sAmountLabel = new Label();
|
||||
private WNumberEditor sAmountField = new WNumberEditor();
|
||||
private Label sRoutingLabel = new Label();
|
||||
|
@ -49,6 +72,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
private Label sCheckLabel = new Label();
|
||||
private Button sOnline = new Button();
|
||||
private Label sStatus = new Label();
|
||||
private Panel customizePanel = new Panel();
|
||||
|
||||
public WPaymentFormCheck(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab);
|
||||
|
@ -71,7 +95,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
sStatus.setText(" ");
|
||||
sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
LayoutUtils.addSclass("action-text-button", sOnline);
|
||||
// sOnline.addActionListener(this);
|
||||
sOnline.addActionListener(this);
|
||||
window.getPanel().setId("sPanel");
|
||||
|
||||
Columns columns = new Columns();
|
||||
|
@ -79,15 +103,11 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("30%");
|
||||
column.setWidth("40%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("50%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("20%");
|
||||
column.setWidth("60%");
|
||||
|
||||
sAmountField.getComponent().setWidth("150px");
|
||||
|
||||
|
@ -95,38 +115,37 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
Row row = rows.newRow();
|
||||
row.appendChild(sBankAccountLabel.rightAlign());
|
||||
row.appendChild(sBankAccountCombo);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(sCurrencyLabel.rightAlign());
|
||||
row.appendChild(sCurrencyCombo);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(sAmountLabel.rightAlign());
|
||||
row.appendChild(sAmountField.getComponent());
|
||||
row.appendChild(new Space());
|
||||
sAmountField.getComponent().addEventListener(Events.ON_BLUR, this);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(sRoutingLabel.rightAlign());
|
||||
row.appendChild(sRoutingField);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(sNumberLabel.rightAlign());
|
||||
row.appendChild(sNumberField);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(sCheckLabel.rightAlign());
|
||||
row.appendChild(sCheckField);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(customizePanel, 2);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(new Space());
|
||||
row.appendChild(sOnline);
|
||||
|
||||
row = rows.newRow();
|
||||
Cell cell = new Cell();
|
||||
row.appendChild(cell);
|
||||
cell.appendChild(sStatus);
|
||||
cell.setColspan(3);
|
||||
row.appendCellChild(sStatus, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -159,6 +178,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
{
|
||||
sCurrencyLabel.setVisible(false); // Check
|
||||
sCurrencyCombo.setVisible(false);
|
||||
sCurrencySpace.setVisible(false);
|
||||
}
|
||||
|
||||
ArrayList<KeyNamePair> list = getBankAccountList();
|
||||
|
@ -168,21 +188,59 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
// Set Selection
|
||||
if (selectedBankAccount != null)
|
||||
sBankAccountCombo.setSelectedKeyNamePair(selectedBankAccount);
|
||||
|
||||
boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue());
|
||||
sOnline.setVisible(exist);
|
||||
|
||||
if (exist)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
public void onEvent(Event e)
|
||||
{
|
||||
if (e.getTarget() == sCurrencyCombo)
|
||||
if (e.getTarget() == sCurrencyCombo || e.getTarget() == sAmountField)
|
||||
{
|
||||
int C_Currency_ID = 0;
|
||||
KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair();
|
||||
BigDecimal amt = MConversionRate.convert(Env.getCtx(),
|
||||
m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID);
|
||||
sAmountField.setValue(amt);
|
||||
if (pp != null)
|
||||
C_Currency_ID = pp.getKey();
|
||||
|
||||
if (e.getTarget() == sCurrencyCombo)
|
||||
{
|
||||
BigDecimal amt = MConversionRate.convert(Env.getCtx(),
|
||||
m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID);
|
||||
sAmountField.setValue(amt);
|
||||
}
|
||||
|
||||
updateOnlineButton();
|
||||
}
|
||||
else if (e.getTarget() == sOnline)
|
||||
{
|
||||
window.lockUI();
|
||||
Clients.response(new AuEcho(window, "runProcessOnline", null));
|
||||
}
|
||||
}
|
||||
|
||||
private void updateOnlineButton()
|
||||
{
|
||||
int C_Currency_ID = 0;
|
||||
KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair();
|
||||
if (pp != null)
|
||||
C_Currency_ID = pp.getKey();
|
||||
|
||||
BigDecimal PayAmt = (BigDecimal) sAmountField.getValue();
|
||||
|
||||
if (C_Currency_ID > 0 && PayAmt != null)
|
||||
{
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt);
|
||||
sOnline.setEnabled(bankAccountProcessor != null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
else
|
||||
{
|
||||
sOnline.setEnabled(false);
|
||||
setBankAccountProcessor(null);
|
||||
}
|
||||
// else if (e.getTarget() == sOnline) {
|
||||
// window.lockUI();
|
||||
// Clients.response(new AuEcho(window, "runProcessOnline", null));
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -240,7 +298,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -257,4 +315,9 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
public Object getWindow() {
|
||||
return window;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCustomizePanel() {
|
||||
return customizePanel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -12,6 +25,7 @@ import org.adempiere.webui.component.Label;
|
|||
import org.adempiere.webui.component.ListItem;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
|
@ -19,15 +33,23 @@ import org.adempiere.webui.editor.WNumberEditor;
|
|||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.grid.PaymentFormCreditCard;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MPaymentProcessor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.ValueNamePair;
|
||||
import org.zkoss.zk.au.out.AuEcho;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Space;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormCreditCard extends PaymentFormCreditCard implements EventListener<Event> {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
@ -44,6 +66,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
private Textbox kApprovalField = new Textbox();
|
||||
private Button kOnline = new Button();
|
||||
private Label kStatus = new Label();
|
||||
private Panel customizePanel = new Panel();
|
||||
|
||||
public WPaymentFormCreditCard(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab);
|
||||
|
@ -73,15 +96,11 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("30%");
|
||||
column.setWidth("40%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("50%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("20%");
|
||||
column.setWidth("60%");
|
||||
|
||||
kAmountField.getComponent().setWidth("150px");
|
||||
|
||||
|
@ -89,30 +108,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
Row row = rows.newRow();
|
||||
row.appendChild(kTypeLabel.rightAlign());
|
||||
row.appendChild(kTypeCombo);
|
||||
row.appendChild(new Space());
|
||||
kTypeCombo.addEventListener(Events.ON_SELECT, this);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(kNumberLabel.rightAlign());
|
||||
row.appendChild(kNumberField);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(kExpLabel.rightAlign());
|
||||
row.appendChild(kExpField);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(kAmountLabel.rightAlign());
|
||||
row.appendChild(kAmountField.getComponent());
|
||||
row.appendChild(new Space());
|
||||
kAmountField.getComponent().addEventListener(Events.ON_BLUR, this);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(kApprovalLabel.rightAlign());
|
||||
row.appendChild(kApprovalField);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(customizePanel, 2);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(new Space());
|
||||
row.appendChild(kOnline);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(kStatus, 3);
|
||||
row.appendCellChild(kStatus, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -146,6 +169,23 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
// Set Selection
|
||||
if (selectedCreditCard != null)
|
||||
kTypeCombo.setSelectedValueNamePair(selectedCreditCard);
|
||||
|
||||
if (m_mPayment.isApproved())
|
||||
{
|
||||
kOnline.setVisible(true);
|
||||
kOnline.setEnabled(false);
|
||||
|
||||
MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue());
|
||||
kOnline.setVisible(exist);
|
||||
|
||||
if (exist)
|
||||
updateOnlineButton();
|
||||
}
|
||||
}
|
||||
|
||||
public void onEvent(Event e)
|
||||
|
@ -154,6 +194,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
window.lockUI();
|
||||
Clients.response(new AuEcho(window, "runProcessOnline", null));
|
||||
}
|
||||
else if (e.getTarget() == kTypeCombo || e.getTarget() == kAmountField)
|
||||
updateOnlineButton();
|
||||
}
|
||||
|
||||
private void updateOnlineButton()
|
||||
{
|
||||
String CCType = null;
|
||||
ListItem selected = kTypeCombo.getSelectedItem();
|
||||
ValueNamePair vp = selected != null ? selected.toValueNamePair() : null;
|
||||
if (vp != null)
|
||||
CCType = vp.getValue();
|
||||
|
||||
BigDecimal PayAmt = (BigDecimal) kAmountField.getValue();
|
||||
|
||||
if (CCType != null && PayAmt != null)
|
||||
{
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt);
|
||||
kOnline.setEnabled(bankAccountProcessor != null);
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
|
||||
MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null);
|
||||
kApprovalField.setReadonly(!paymentProcessor.isRequireVV());
|
||||
}
|
||||
else
|
||||
{
|
||||
kOnline.setEnabled(false);
|
||||
setBankAccountProcessor(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -175,7 +243,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg);
|
||||
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -190,7 +258,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
|
||||
boolean ok = processOnline(CCType, kNumberField.getText(), kExpField.getText());
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentProcessed", processMsg);
|
||||
} // online
|
||||
|
@ -209,4 +277,9 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
public Object getWindow() {
|
||||
return window;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCustomizePanel() {
|
||||
return customizePanel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Column;
|
||||
import org.adempiere.webui.component.Columns;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.ListItem;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.grid.PaymentFormDirect;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.au.out.AuEcho;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Space;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class WPaymentFormDirect extends PaymentFormDirect implements EventListener<Event> {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
||||
private Label tAccountLabel = new Label();
|
||||
private Listbox tAccountCombo = ListboxFactory.newDropdownListbox();
|
||||
private Button tOnline = new Button();
|
||||
private Textbox tRoutingField = new Textbox();
|
||||
private Textbox tNumberField = new Textbox();
|
||||
private Label tStatus = new Label();
|
||||
private Label tRoutingText = new Label();
|
||||
private Label tNumberText = new Label();
|
||||
private Panel customizePanel = new Panel();
|
||||
|
||||
public WPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) {
|
||||
super(windowNo, mTab, isDebit);
|
||||
window = new WPaymentFormWindow(this, windowNo);
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Grid tPanelLayout = GridFactory.newGridLayout();
|
||||
window.getPanel().appendChild(tPanelLayout);
|
||||
tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID"));
|
||||
tRoutingField.setCols(8);
|
||||
tNumberField.setCols(10);
|
||||
tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo"));
|
||||
tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo"));
|
||||
tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
LayoutUtils.addSclass("action-text-button", tOnline);
|
||||
tOnline.addActionListener(this);
|
||||
tStatus.setText(" ");
|
||||
window.getPanel().setId("tPanel");
|
||||
|
||||
Columns columns = new Columns();
|
||||
tPanelLayout.appendChild(columns);
|
||||
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("40%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("60%");
|
||||
|
||||
Rows rows = tPanelLayout.newRows();
|
||||
Row row = rows.newRow();
|
||||
row.appendChild(tAccountLabel.rightAlign());
|
||||
row.appendChild(tAccountCombo);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(tRoutingText.rightAlign());
|
||||
row.appendChild(tRoutingField);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(tNumberText.rightAlign());
|
||||
row.appendChild(tNumberField);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(customizePanel, 2);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(new Space());
|
||||
row.appendChild(tOnline);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(tStatus, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
if (m_C_Payment_ID != 0)
|
||||
{
|
||||
tRoutingField.setText(m_mPayment.getRoutingNo());
|
||||
tNumberField.setText(m_mPayment.getAccountNo());
|
||||
tStatus.setText(m_mPayment.getR_PnRef());
|
||||
}
|
||||
|
||||
ArrayList<KeyNamePair> list = getBPBankAccountList();
|
||||
for (KeyNamePair pp : list)
|
||||
tAccountCombo.addItem(pp);
|
||||
|
||||
boolean exist = isBankAccountProcessorExist();
|
||||
tOnline.setVisible(exist);
|
||||
|
||||
MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor();
|
||||
setBankAccountProcessor(bankAccountProcessor);
|
||||
}
|
||||
|
||||
public void onEvent(Event e)
|
||||
{
|
||||
if (e.getTarget() == tOnline)
|
||||
{
|
||||
window.lockUI();
|
||||
Clients.response(new AuEcho(window, "runProcessOnline", null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMandatory() {
|
||||
/***********************
|
||||
* Mandatory Data Check
|
||||
*/
|
||||
boolean dataOK = true;
|
||||
ListItem selected = tAccountCombo.getSelectedItem();
|
||||
KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null;
|
||||
if (bpba == null)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound");
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
log.config("OK=" + dataOK);
|
||||
return dataOK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveChangesInTrx(final String trxName) {
|
||||
boolean ok = save(0, tRoutingField.getText(), tNumberField.getText());
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow() {
|
||||
window.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
window.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getWindow() {
|
||||
return window;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCustomizePanel() {
|
||||
return customizePanel;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,28 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
|
||||
public class WPaymentFormDirectDebit extends WPaymentFormDirectDeposit {
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormDirectDebit extends WPaymentFormDirect {
|
||||
|
||||
public WPaymentFormDirectDebit(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab);
|
||||
super(windowNo, mTab, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,150 +1,28 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Column;
|
||||
import org.adempiere.webui.component.Columns;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.ListItem;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.grid.PaymentFormDirectDeposit;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zul.Space;
|
||||
|
||||
public class WPaymentFormDirectDeposit extends PaymentFormDirectDeposit {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
||||
private Label tAccountLabel = new Label();
|
||||
private Listbox tAccountCombo = ListboxFactory.newDropdownListbox();
|
||||
private Button tOnline = new Button();
|
||||
private Textbox tRoutingField = new Textbox();
|
||||
private Textbox tNumberField = new Textbox();
|
||||
private Label tStatus = new Label();
|
||||
private Label tRoutingText = new Label();
|
||||
private Label tNumberText = new Label();
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormDirectDeposit extends WPaymentFormDirect {
|
||||
|
||||
public WPaymentFormDirectDeposit(int windowNo, GridTab mTab) {
|
||||
super(windowNo, mTab);
|
||||
window = new WPaymentFormWindow(this, windowNo);
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Grid tPanelLayout = GridFactory.newGridLayout();
|
||||
window.getPanel().appendChild(tPanelLayout);
|
||||
tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID"));
|
||||
tRoutingField.setCols(8);
|
||||
tNumberField.setCols(10);
|
||||
tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo"));
|
||||
tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo"));
|
||||
tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
|
||||
LayoutUtils.addSclass("action-text-button", tOnline);
|
||||
tStatus.setText(" ");
|
||||
window.getPanel().setId("tPanel");
|
||||
|
||||
Columns columns = new Columns();
|
||||
tPanelLayout.appendChild(columns);
|
||||
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("30%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("50%");
|
||||
|
||||
column = new Column();
|
||||
columns.appendChild(column);
|
||||
column.setWidth("20%");
|
||||
|
||||
Rows rows = tPanelLayout.newRows();
|
||||
Row row = rows.newRow();
|
||||
row.appendChild(tAccountLabel.rightAlign());
|
||||
row.appendChild(tAccountCombo);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(tRoutingText.rightAlign());
|
||||
row.appendChild(tRoutingField);
|
||||
row.appendChild(new Space());
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(tNumberText.rightAlign());
|
||||
row.appendChild(tNumberField);
|
||||
row.appendChild(tOnline);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendCellChild(tStatus, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
if (m_C_Payment_ID != 0)
|
||||
{
|
||||
tRoutingField.setText(m_mPayment.getRoutingNo());
|
||||
tNumberField.setText(m_mPayment.getAccountNo());
|
||||
tStatus.setText(m_mPayment.getR_PnRef());
|
||||
}
|
||||
|
||||
ArrayList<KeyNamePair> list = getBankAccountList();
|
||||
for (KeyNamePair pp : list)
|
||||
tAccountCombo.addItem(pp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMandatory() {
|
||||
/***********************
|
||||
* Mandatory Data Check
|
||||
*/
|
||||
boolean dataOK = true;
|
||||
ListItem selected = tAccountCombo.getSelectedItem();
|
||||
KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null;
|
||||
if (bpba == null)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound");
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
log.config("OK=" + dataOK);
|
||||
return dataOK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveChangesInTrx(final String trxName) {
|
||||
boolean ok = save();
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow() {
|
||||
window.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
window.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getWindow() {
|
||||
return window;
|
||||
super(windowNo, mTab, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.grid.IPaymentForm;
|
||||
import org.compiere.grid.PaymentFormCash;
|
||||
import org.compiere.grid.PaymentFormCheck;
|
||||
import org.compiere.grid.PaymentFormCreditCard;
|
||||
import org.compiere.grid.PaymentFormDirectDebit;
|
||||
import org.compiere.grid.PaymentFormDirectDeposit;
|
||||
import org.compiere.grid.PaymentFormMixedPOS;
|
||||
import org.compiere.grid.PaymentFormOnCredit;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.util.CLogger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormFactory {
|
||||
|
||||
/** Static Logger */
|
||||
|
@ -36,13 +48,13 @@ public class WPaymentFormFactory {
|
|||
{
|
||||
// Register defaults:
|
||||
s_registeredClasses = new HashMap<String, Class<? extends IPaymentForm>>();
|
||||
s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, WPaymentFormCash.class);
|
||||
s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, WPaymentFormCheck.class);
|
||||
s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, WPaymentFormCreditCard.class);
|
||||
s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, WPaymentFormDirectDebit.class);
|
||||
s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, WPaymentFormDirectDeposit.class);
|
||||
s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, WPaymentFormMixedPOS.class);
|
||||
s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, WPaymentFormOnCredit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, WPaymentFormCash.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, WPaymentFormCheck.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, WPaymentFormCreditCard.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, WPaymentFormDirectDebit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, WPaymentFormDirectDeposit.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, WPaymentFormMixedPOS.class);
|
||||
s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, WPaymentFormOnCredit.class);
|
||||
}
|
||||
|
||||
public static IPaymentForm create(int windowNo, GridTab mTab, String paymentRule)
|
||||
|
|
|
@ -1,8 +1,26 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import org.compiere.grid.PaymentFormMixedPOS;
|
||||
import org.compiere.model.GridTab;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormMixedPOS extends PaymentFormMixedPOS {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -18,6 +31,11 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormOnCredit extends PaymentFormOnCredit {
|
||||
|
||||
private WPaymentFormWindow window;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.apps.form;
|
||||
|
||||
import org.adempiere.webui.apps.BusyDialog;
|
||||
|
@ -15,10 +28,20 @@ import org.zkoss.zul.Borderlayout;
|
|||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.South;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentFormWindow extends Window implements EventListener<Event>, DialogEvents {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2710316463655831868L;
|
||||
|
||||
private PaymentForm paymentForm;
|
||||
private int windowNo;
|
||||
// private int windowNo;
|
||||
|
||||
private Panel mainPanel = new Panel();
|
||||
private Panel centerPanel = new Panel();
|
||||
|
@ -34,7 +57,7 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
|
|||
super();
|
||||
|
||||
this.paymentForm = paymentForm;
|
||||
this.windowNo = windowNo;
|
||||
// this.windowNo = windowNo;
|
||||
|
||||
try {
|
||||
zkInit();
|
||||
|
@ -59,6 +82,9 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
|
|||
Center center = new Center();
|
||||
mainLayout.appendChild(center);
|
||||
center.appendChild(centerPanel = getPanel());
|
||||
centerPanel.setHflex("1");
|
||||
centerPanel.setVflex("1");
|
||||
center.setAutoscroll(true);
|
||||
//
|
||||
South south = new South();
|
||||
south.setStyle("border: none");
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
|
@ -10,8 +23,17 @@ import org.zkoss.zul.Comboitem;
|
|||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Hlayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class Paymentbox extends Div {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1807586169091171780L;
|
||||
protected PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this);
|
||||
protected Combobox combo;
|
||||
protected Button btn;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.editor;
|
||||
|
||||
import javax.swing.event.ListDataListener;
|
||||
|
@ -25,6 +38,11 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public class WPaymentEditor extends WEditor implements ListDataListener {
|
||||
|
||||
public final static String ON_SAVE_PAYMENT = "onSavePayment";
|
||||
|
|
|
@ -281,7 +281,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
|
||||
Integer C_BPartner_ID = null;
|
||||
|
||||
if (fBPartner_ID.getDisplay() != "")
|
||||
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||
C_BPartner_ID = (Integer)fBPartner_ID.getValue();
|
||||
|
||||
if (C_BPartner_ID != null)
|
||||
|
@ -291,7 +291,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
|
||||
Integer M_Product_ID = null;
|
||||
|
||||
if (fProduct_ID.getDisplay() != "")
|
||||
if (!"".equals(fProduct_ID.getDisplay()))
|
||||
M_Product_ID = (Integer)fProduct_ID.getValue();
|
||||
|
||||
if (M_Product_ID != null)
|
||||
|
|
|
@ -318,10 +318,10 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
if (fName.getText().length() > 0)
|
||||
sql.append(" AND UPPER(c.Name) LIKE ?");
|
||||
|
||||
if (fCashBook_ID.getDisplay() != "")
|
||||
if (!"".equals(fCashBook_ID.getDisplay()))
|
||||
sql.append(" AND c.C_CashBook_ID=?");
|
||||
|
||||
if (fInvoice_ID.getDisplay() != "")
|
||||
if (!"".equals(fInvoice_ID.getDisplay()))
|
||||
sql.append(" AND cl.C_Invoice_ID=?");
|
||||
|
||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||
|
|
|
@ -299,7 +299,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
if (fPOReference.getText().length() > 0)
|
||||
sql.append(" AND UPPER(i.POReference) LIKE ?");
|
||||
|
||||
if (fBPartner_ID.getDisplay() != "")
|
||||
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||
sql.append(" AND i.C_BPartner_ID=?");
|
||||
|
||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||
|
@ -343,7 +343,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
if (fPOReference.getText().length() > 0)
|
||||
pstmt.setString(index++, getSQLText(fPOReference));
|
||||
|
||||
if (fBPartner_ID.getDisplay() != "")
|
||||
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||
{
|
||||
Integer bp = (Integer)fBPartner_ID.getValue();
|
||||
pstmt.setInt(index++, bp.intValue());
|
||||
|
|
|
@ -1093,6 +1093,9 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
contentPanel.setSelectedIndex(0);
|
||||
}
|
||||
}
|
||||
else if (event.getName().equals(Events.ON_CHANGE))
|
||||
{
|
||||
}
|
||||
//default
|
||||
else
|
||||
{
|
||||
|
@ -1108,9 +1111,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
progressWindow.doHighlighted();
|
||||
}
|
||||
|
||||
private void hideBusyDialog() {
|
||||
progressWindow.dispose();
|
||||
progressWindow = null;
|
||||
private void hideBusyDialog() {
|
||||
if (progressWindow != null) {
|
||||
progressWindow.dispose();
|
||||
progressWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void onQueryCallback()
|
||||
|
|
|
@ -306,16 +306,22 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
if (fDocumentNo.getText().length() > 0)
|
||||
sql.append(" AND UPPER(p.DocumentNo) LIKE ?");
|
||||
|
||||
if (fBPartner_ID.getDisplay() != "")
|
||||
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||
sql.append(" AND p.C_BPartner_ID=?");
|
||||
|
||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||
{
|
||||
Date f = fDateFrom.getValue();
|
||||
Timestamp from = new Timestamp(f.getTime());
|
||||
Timestamp from = null;
|
||||
if (fDateFrom.getValue() != null) {
|
||||
Date f = fDateFrom.getValue();
|
||||
from = new Timestamp(f.getTime());
|
||||
}
|
||||
|
||||
Date t = fDateTo.getValue();
|
||||
Timestamp to = new Timestamp(t.getTime());
|
||||
Timestamp to = null;
|
||||
if (fDateTo.getValue() != null) {
|
||||
Date t = fDateTo.getValue();
|
||||
to = new Timestamp(t.getTime());
|
||||
}
|
||||
|
||||
if (from == null && to != null)
|
||||
sql.append(" AND TRUNC(p.DateTrx) <= ?");
|
||||
|
@ -325,7 +331,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
sql.append(" AND TRUNC(p.DateTrx) BETWEEN ? AND ?");
|
||||
}
|
||||
|
||||
if (fAmtFrom.getText() != "" || fAmtTo.getText() != "")
|
||||
if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText()))
|
||||
{
|
||||
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
||||
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
||||
|
@ -359,7 +365,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
if (fDocumentNo.getText().length() > 0)
|
||||
pstmt.setString(index++, getSQLText(fDocumentNo));
|
||||
|
||||
if (fBPartner_ID.getDisplay() != "")
|
||||
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||
{
|
||||
Integer bp = (Integer)fBPartner_ID.getValue();
|
||||
pstmt.setInt(index++, bp.intValue());
|
||||
|
@ -368,11 +374,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
|
||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||
{
|
||||
Date f = fDateFrom.getValue();
|
||||
Timestamp from = new Timestamp(f.getTime());
|
||||
Timestamp from = null;
|
||||
if (fDateFrom.getValue() != null) {
|
||||
Date f = fDateFrom.getValue();
|
||||
from = new Timestamp(f.getTime());
|
||||
}
|
||||
|
||||
Date t = fDateTo.getValue();
|
||||
Timestamp to = new Timestamp(t.getTime());
|
||||
Timestamp to = null;
|
||||
if (fDateTo.getValue() != null) {
|
||||
Date t = fDateTo.getValue();
|
||||
to = new Timestamp(t.getTime());
|
||||
}
|
||||
|
||||
log.fine("Date From=" + from + ", To=" + to);
|
||||
|
||||
|
@ -387,7 +399,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
}
|
||||
}
|
||||
|
||||
if (fAmtFrom.getText() != "" || fAmtTo.getText() != "")
|
||||
if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText()))
|
||||
{
|
||||
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
||||
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
||||
|
|
|
@ -34,6 +34,7 @@ import java.util.logging.Level;
|
|||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Combobox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
|
@ -47,6 +48,7 @@ import org.adempiere.webui.theme.ITheme;
|
|||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.util.BrowserToken;
|
||||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MClient;
|
||||
|
@ -236,8 +238,14 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(false);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel();
|
||||
pnlButtons.addActionListener(this);
|
||||
|
||||
Button helpButton = pnlButtons.createButton(ConfirmPanel.A_HELP);
|
||||
helpButton.addEventListener(Events.ON_CLICK, this);
|
||||
helpButton.setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
pnlButtons.addComponentsRight(helpButton);
|
||||
|
||||
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
||||
pnlButtons.setWidth(null);
|
||||
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
|
@ -372,6 +380,10 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
{
|
||||
validateLogin();
|
||||
}
|
||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_HELP))
|
||||
{
|
||||
openLoginHelp();
|
||||
}
|
||||
else if (event.getName().equals(Events.ON_SELECT))
|
||||
{
|
||||
if(eventComp.getId().equals(lstLanguage.getId())) {
|
||||
|
@ -405,6 +417,17 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
//
|
||||
}
|
||||
|
||||
private void openLoginHelp() {
|
||||
String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/wiki/Login_Help");
|
||||
try {
|
||||
Executions.getCurrent().sendRedirect(helpURL, "_blank");
|
||||
}
|
||||
catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
FDialog.warn(0, this, "URLnotValid", message);
|
||||
}
|
||||
}
|
||||
|
||||
private void onUserIdChange(int AD_User_ID) {
|
||||
String userName = txtUserId.getValue();
|
||||
if (userName != null && userName.length() > 0 && AD_User_ID < 0)
|
||||
|
|
|
@ -1385,7 +1385,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
|||
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
|
||||
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
|
||||
}
|
||||
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) {
|
||||
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator)) {
|
||||
if (!(parsedValue instanceof Integer)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -803,12 +803,12 @@ div.simileAjax-bubble-container {
|
|||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.grid-layout .z-row-inner {
|
||||
.grid-layout .z-row-inner, .grid-layout .z-cell {
|
||||
border: none !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.grid-layout tr.z-row-over>td.z-row-inner {
|
||||
.grid-layout tr.z-row-over>td.z-row-inner, .grid-layout tr.z-row-over>.z-cell {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -24,48 +24,40 @@ Copyright (C) 2009 Idalica Corporation
|
|||
<span class="section-head">Initially you can log into the system with the following users:
|
||||
</span>
|
||||
|
||||
<table border="thin" cellpadding="5" cellspacing="0" style="margin-top: 10px; font-size: 8pt; background-color: transparent; border: 1px solid lightgray; border-collapse: collapse;">
|
||||
<table cellpadding="5" cellspacing="0" style="margin-top: 10px; font-size: 8pt; background-color: transparent;">
|
||||
|
||||
<tbody><tr valign="top">
|
||||
<th ><i><b>Usage</b></i>
|
||||
</th><th><i><b>User</b></i>
|
||||
</th><th><i><b>EMail</b></i>
|
||||
</th><th><i><b>Password</b></i>
|
||||
</th></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td>System Management
|
||||
</td><td>System
|
||||
</td><td>System
|
||||
</td><td>GardenAdmin
|
||||
</td><td>admin @ gardenworld.com
|
||||
</td><td>GardenAdmin
|
||||
</td></tr>
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
</td><td>GardenUser
|
||||
</td><td>user @ gardenworld.com
|
||||
</td><td>GardenUser
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td>System Management or any role/company
|
||||
</td><td>SuperUser
|
||||
</td><td>superuser @ idempiere.com
|
||||
</td><td>System
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td>Sample Client Administration
|
||||
</td><td>GardenAdmin
|
||||
</td><td>GardenAdmin
|
||||
</td><td>System
|
||||
</td><td>system @ idempiere.com
|
||||
</td><td>System
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td>Sample Client User
|
||||
</td><td>GardenUser
|
||||
</td><td>GardenUser
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
]]>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -9,7 +9,7 @@ Copyright (C) 2009 Idalica Corporation
|
|||
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
||||
<div>
|
||||
<vendorLogo/>
|
||||
<loginInfo if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}"/>
|
||||
<loginInfo if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"/>
|
||||
<versionInfo/>
|
||||
<loginLinks/>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation
|
|||
}
|
||||
</style>
|
||||
|
||||
<div class="loginLinksBox" if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}"
|
||||
<div class="loginLinksBox" if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"
|
||||
style="position: absolute; bottom: 5px;">
|
||||
|
||||
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
||||
|
@ -25,11 +25,11 @@ Copyright (C) 2009 Idalica Corporation
|
|||
image="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"
|
||||
target="_blank"
|
||||
/>
|
||||
<button href="http://www.adempiere.org" image="images/AD32.png"
|
||||
tooltiptext="ADempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||
<button href="http://www.idempiere.org" image="images/AD32.png"
|
||||
tooltiptext="iDempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||
</div>
|
||||
|
||||
<zscript if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}">
|
||||
<zscript if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}">
|
||||
<![CDATA[
|
||||
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
||||
]]>
|
||||
|
|
|
@ -14,7 +14,16 @@ Copyright (C) 2009 Idalica Corporation
|
|||
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1em; font-weight: bold;" />
|
||||
</hbox>
|
||||
</div>
|
||||
<div style="height: 90px" if="${desktop.execution.localName != "ip-10-8-0-1.ec2.internal"}">
|
||||
<div style="background-color: #E5E5E5; margin: 5px;"
|
||||
if="${desktop.execution.localName.startsWith("demo.")}">
|
||||
<hbox align="center">
|
||||
<toolbarbutton
|
||||
href="http://www.idempiere.org" image="http://www.idempiere.org/_/rsrc/1341897488671/config/customLogo.gif?revision=2" target="_blank"/>
|
||||
<label value="iDempiere Online Demonstration"
|
||||
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1.5em; font-weight: bold;" />
|
||||
</hbox>
|
||||
</div>
|
||||
<div style="height: 90px" if="${desktop.execution.localName != "ip-10-8-0-1.ec2.internal" and ! desktop.execution.localName.startsWith("demo.")}">
|
||||
<space/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
|
||||
public interface IPaymentForm {
|
||||
|
||||
public boolean checkMandatory();
|
||||
|
@ -13,4 +28,10 @@ public interface IPaymentForm {
|
|||
public void closeWindow();
|
||||
|
||||
public Object getWindow();
|
||||
|
||||
public Object getCustomizePanel();
|
||||
|
||||
public void setCustomizeValues();
|
||||
|
||||
public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor);
|
||||
}
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -6,20 +19,29 @@ import java.sql.ResultSet;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MCashLine;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.model.MPaymentProcessor;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.TrxRunnable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentForm implements IPaymentForm {
|
||||
|
||||
/** Logger */
|
||||
|
@ -198,6 +220,9 @@ public abstract class PaymentForm implements IPaymentForm {
|
|||
};
|
||||
try {
|
||||
Trx.run(r);
|
||||
} catch (AdempiereException ae) {
|
||||
success[0] = false;
|
||||
throw ae;
|
||||
} catch (Throwable e) {
|
||||
success[0] = false;
|
||||
throw new AdempiereException("PaymentError", e);
|
||||
|
@ -277,7 +302,43 @@ public abstract class PaymentForm implements IPaymentForm {
|
|||
|
||||
public void processOnline()
|
||||
{
|
||||
|
||||
throw new AdempiereException(Msg.getMsg(Env.getCtx(), "ActionNotSupported"));
|
||||
}
|
||||
|
||||
public boolean isBankAccountProcessorExist(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName)
|
||||
{
|
||||
MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName);
|
||||
// Relax Amount
|
||||
if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0)
|
||||
m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName);
|
||||
if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public MBankAccountProcessor getBankAccountProcessor(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName)
|
||||
{
|
||||
MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName);
|
||||
// Relax Amount
|
||||
if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0)
|
||||
m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName);
|
||||
if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0)
|
||||
return null;
|
||||
|
||||
MBankAccountProcessor m_mBankAccountProcessor = null;
|
||||
// Find the first right one
|
||||
for (int i = 0; i < m_mBankAccountProcessors.length; i++)
|
||||
{
|
||||
MBankAccountProcessor bankAccountProcessor = m_mBankAccountProcessors[i];
|
||||
MPaymentProcessor paymentProcessor = new MPaymentProcessor(bankAccountProcessor.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), bankAccountProcessor.get_TrxName());
|
||||
if (paymentProcessor.accepts (tender, CCType))
|
||||
{
|
||||
m_mBankAccountProcessor = m_mBankAccountProcessors[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
return m_mBankAccountProcessor;
|
||||
}
|
||||
|
||||
public GridTab getGridTab()
|
||||
|
@ -299,4 +360,19 @@ public abstract class PaymentForm implements IPaymentForm {
|
|||
{
|
||||
return m_WindowNo;
|
||||
}
|
||||
|
||||
public Object getCustomizePanel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setCustomizeValues()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -8,6 +21,7 @@ import java.sql.Timestamp;
|
|||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MCash;
|
||||
import org.compiere.model.MCashLine;
|
||||
|
@ -20,10 +34,16 @@ import org.compiere.util.CLogger;
|
|||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.TimeUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormCash extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash;
|
||||
private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash;
|
||||
|
||||
public PaymentFormCash(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
|
@ -116,7 +136,6 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
public boolean save(int newC_BankAccount_ID, int newC_CashBook_ID, Timestamp newDateAcct, BigDecimal newAmount, String trxName)
|
||||
{
|
||||
processMsg = null;
|
||||
boolean error = false;
|
||||
int newC_CashLine_ID = m_C_CashLine_ID;
|
||||
|
||||
/***********************
|
||||
|
@ -134,8 +153,8 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
log.config( "CashCancelled");
|
||||
else
|
||||
{
|
||||
processMsg = "CashNotCancelled";
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "CashNotCancelled");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
newC_CashLine_ID = 0; // reset
|
||||
|
@ -177,8 +196,8 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
if (C_Invoice_ID == 0 && order == null)
|
||||
{
|
||||
log.config("No Invoice!");
|
||||
processMsg = "CashNotCreated";
|
||||
error = false;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "CashNotCreated");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -219,7 +238,7 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
if (cash == null || cash.get_ID() == 0)
|
||||
{
|
||||
processMsg = CLogger.retrieveErrorString("CashNotCreated");
|
||||
error = true;
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -290,8 +309,8 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
processMsg = m_mPayment.getDocumentNo();
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCreated";
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -321,6 +340,6 @@ public abstract class PaymentFormCash extends PaymentForm {
|
|||
else
|
||||
getGridTab().setValue("C_CashLine_ID", new Integer(newC_CashLine_ID));
|
||||
}
|
||||
return !error;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -7,7 +20,9 @@ import java.sql.SQLException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MPayment;
|
||||
|
@ -16,9 +31,15 @@ import org.compiere.process.DocAction;
|
|||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormCheck extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check;
|
||||
private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check;
|
||||
|
||||
public PaymentFormCheck(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
|
@ -68,7 +89,6 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
public boolean save(int newC_BankAccount_ID, String routing, String number, String check, BigDecimal amount)
|
||||
{
|
||||
processMsg = null;
|
||||
boolean error = false;
|
||||
String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD";
|
||||
|
||||
/***********************
|
||||
|
@ -85,11 +105,11 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok)
|
||||
log.info( "Payment Canecelled - " + m_mPaymentOriginal);
|
||||
log.info( "Payment Cancelled - " + m_mPaymentOriginal);
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo();
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
m_mPayment.resetNew();
|
||||
}
|
||||
|
@ -111,8 +131,8 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
}
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo();
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -163,6 +183,7 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
}
|
||||
m_mPayment.setDateTrx(m_DateAcct);
|
||||
m_mPayment.setDateAcct(m_DateAcct);
|
||||
setCustomizeValues();
|
||||
m_mPayment.saveEx();
|
||||
|
||||
// Save/Post
|
||||
|
@ -174,8 +195,8 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
processMsg = m_mPayment.getDocumentNo();
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCreated";
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -193,6 +214,16 @@ public abstract class PaymentFormCheck extends PaymentForm {
|
|||
else
|
||||
getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID()));
|
||||
}
|
||||
return !error;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isBankAccountProcessorExist(int C_Currency_ID, BigDecimal PayAmt)
|
||||
{
|
||||
return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null);
|
||||
}
|
||||
|
||||
public MBankAccountProcessor getBankAccountProcessor(int C_Currency_ID, BigDecimal PayAmt)
|
||||
{
|
||||
return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,39 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.ValueNamePair;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormCreditCard extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard;
|
||||
|
||||
private final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard;
|
||||
|
||||
public PaymentFormCreditCard(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
}
|
||||
|
@ -34,7 +55,6 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
public boolean save(String newCCType, String newCCNumber, String newCCExp, BigDecimal newAmount)
|
||||
{
|
||||
processMsg = null;
|
||||
boolean error = false;
|
||||
String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD";
|
||||
|
||||
/***********************
|
||||
|
@ -51,11 +71,11 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok)
|
||||
log.info( "Payment Canecelled - " + m_mPaymentOriginal);
|
||||
log.info( "Payment Cancelled - " + m_mPaymentOriginal);
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo();
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
m_mPayment.resetNew();
|
||||
}
|
||||
|
@ -77,8 +97,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
}
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo();
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +150,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
}
|
||||
m_mPayment.setDateTrx(m_DateAcct);
|
||||
m_mPayment.setDateAcct(m_DateAcct);
|
||||
setCustomizeValues();
|
||||
|
||||
if (!m_mPayment.isApproved())
|
||||
{
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "CardNotProcessed");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
|
||||
m_mPayment.saveEx();
|
||||
|
||||
// Save/Post
|
||||
|
@ -141,8 +169,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
processMsg = m_mPayment.getDocumentNo();
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCreated";
|
||||
error = true;
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -161,7 +189,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID()));
|
||||
}
|
||||
|
||||
return !error;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean processOnline(String CCType, String CCNumber, String CCExp)
|
||||
|
@ -188,8 +216,9 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
m_mPayment.setDateTrx(m_DateAcct);
|
||||
// Set Amount
|
||||
m_mPayment.setAmount(m_C_Currency_ID, m_Amount);
|
||||
setCustomizeValues();
|
||||
if (!m_mPayment.save()) {
|
||||
processMsg = "PaymentNotCreated";
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
return false;
|
||||
} else {
|
||||
approved = m_mPayment.processOnline();
|
||||
|
@ -205,7 +234,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
processMsg = info + "\n" + m_mPayment.getDocumentNo();
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCreated";
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
error = true;
|
||||
}
|
||||
saveChanges();
|
||||
|
@ -218,4 +247,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
|
|||
}
|
||||
return !error;
|
||||
}
|
||||
|
||||
public boolean isBankAccountProcessorExist(String CCType, BigDecimal PayAmt)
|
||||
{
|
||||
return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null);
|
||||
}
|
||||
|
||||
public MBankAccountProcessor getBankAccountProcessor(String CCType, BigDecimal PayAmt)
|
||||
{
|
||||
return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormDirect extends PaymentForm {
|
||||
private String PAYMENTRULE;
|
||||
|
||||
public PaymentFormDirect(int WindowNo, GridTab mTab, boolean isDebit) {
|
||||
super(WindowNo, mTab);
|
||||
PAYMENTRULE = isDebit ? MInvoice.PAYMENTRULE_DirectDebit : MInvoice.PAYMENTRULE_DirectDeposit;
|
||||
}
|
||||
|
||||
public ArrayList<KeyNamePair> getBPBankAccountList() {
|
||||
ArrayList<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
|
||||
/**
|
||||
* Load Accounts
|
||||
*/
|
||||
String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct "
|
||||
+ "FROM C_BP_BankAccount a"
|
||||
+ " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) "
|
||||
+ "WHERE C_BPartner_ID=?"
|
||||
+ "AND a.IsActive='Y' AND a.IsACH='Y'";
|
||||
try
|
||||
{
|
||||
PreparedStatement pstmt = DB.prepareStatement(SQL, null);
|
||||
pstmt.setInt(1, m_C_BPartner_ID);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
int key = rs.getInt(1);
|
||||
String name = rs.getString(2);
|
||||
KeyNamePair pp = new KeyNamePair(key, name);
|
||||
list.add(pp);
|
||||
}
|
||||
rs.close();
|
||||
pstmt.close();
|
||||
}
|
||||
catch (SQLException eac)
|
||||
{
|
||||
log.log(Level.SEVERE, SQL, eac);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public String processMsg;
|
||||
public boolean save(int newC_BankAccount_ID, String routing, String number)
|
||||
{
|
||||
processMsg = null;
|
||||
|
||||
String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD";
|
||||
|
||||
/***********************
|
||||
* Changed PaymentRule
|
||||
*/
|
||||
if (!PAYMENTRULE.equals(m_PaymentRule))
|
||||
{
|
||||
log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE);
|
||||
// We had a change in Payment type (e.g. Check to CC)
|
||||
if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null)
|
||||
{
|
||||
log.fine("Old Payment(1) - " + m_mPaymentOriginal);
|
||||
m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok)
|
||||
log.info( "Payment Cancelled - " + m_mPaymentOriginal);
|
||||
else
|
||||
{
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
m_mPayment.resetNew();
|
||||
}
|
||||
// We had a Payment and something else (e.g. Check to Cash)
|
||||
else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1)
|
||||
{
|
||||
log.fine("Old Payment(2) - " + m_mPaymentOriginal);
|
||||
if (m_mPaymentOriginal != null)
|
||||
{
|
||||
m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok) // Cancel Payment
|
||||
{
|
||||
log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ());
|
||||
getGridTab().getTableModel().dataSave(true);
|
||||
m_mPayment.resetNew();
|
||||
m_mPayment.setAmount(m_C_Currency_ID, m_Amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo();
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get Order and optionally Invoice
|
||||
int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Order_ID");
|
||||
int C_Invoice_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Invoice_ID");
|
||||
if (C_Invoice_ID == 0 && m_DocStatus.equals("CO"))
|
||||
C_Invoice_ID = getInvoiceID (C_Order_ID);
|
||||
|
||||
// Amount sign negative, if ARC (Credit Memo) or API (AP Invoice)
|
||||
boolean negateAmt = false;
|
||||
MInvoice invoice = null;
|
||||
if (C_Invoice_ID != 0)
|
||||
{
|
||||
invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null);
|
||||
negateAmt = invoice.isCreditMemo();
|
||||
}
|
||||
MOrder order = null;
|
||||
if (invoice == null && C_Order_ID != 0)
|
||||
order = new MOrder (Env.getCtx(), C_Order_ID, null);
|
||||
|
||||
BigDecimal payAmount = m_Amount;
|
||||
|
||||
|
||||
if (negateAmt)
|
||||
payAmount = m_Amount.negate();
|
||||
// Info
|
||||
log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt);
|
||||
|
||||
/***********************
|
||||
* Payments
|
||||
*/
|
||||
m_mPayment.setBankACH(newC_BankAccount_ID, m_isSOTrx, PAYMENTRULE, routing, number);
|
||||
m_mPayment.setAmount(m_C_Currency_ID, payAmount);
|
||||
m_mPayment.setC_BPartner_ID(m_C_BPartner_ID);
|
||||
m_mPayment.setC_Invoice_ID(C_Invoice_ID);
|
||||
if (order != null)
|
||||
{
|
||||
m_mPayment.setC_Order_ID(C_Order_ID);
|
||||
m_needSave = true;
|
||||
}
|
||||
m_mPayment.setDateTrx(m_DateAcct);
|
||||
m_mPayment.setDateAcct(m_DateAcct);
|
||||
setCustomizeValues();
|
||||
m_mPayment.saveEx();
|
||||
|
||||
// Save/Post
|
||||
if (m_mPayment.get_ID() > 0 && MPayment.DOCSTATUS_Drafted.equals(m_mPayment.getDocStatus()))
|
||||
{
|
||||
boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete);
|
||||
m_mPayment.saveEx();
|
||||
if (ok)
|
||||
processMsg = m_mPayment.getDocumentNo();
|
||||
else
|
||||
{
|
||||
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
|
||||
throw new AdempiereException(processMsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
log.fine("NotDraft " + m_mPayment);
|
||||
|
||||
/**********************
|
||||
* Save Values to mTab
|
||||
*/
|
||||
log.config("Saving changes");
|
||||
// Set Payment
|
||||
if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID)
|
||||
{
|
||||
if (m_mPayment.getC_Payment_ID() == 0)
|
||||
getGridTab().setValue("C_Payment_ID", null);
|
||||
else
|
||||
getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID()));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isBankAccountProcessorExist()
|
||||
{
|
||||
String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit;
|
||||
return isBankAccountProcessorExist(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null);
|
||||
}
|
||||
|
||||
public MBankAccountProcessor getBankAccountProcessor()
|
||||
{
|
||||
String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit;
|
||||
return getBankAccountProcessor(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package org.compiere.grid;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
|
||||
public abstract class PaymentFormDirectDebit extends PaymentFormDirectDeposit {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDebit;
|
||||
|
||||
public PaymentFormDirectDebit(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
}
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
package org.compiere.grid;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
public abstract class PaymentFormDirectDeposit extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDeposit;
|
||||
|
||||
public PaymentFormDirectDeposit(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
}
|
||||
|
||||
public ArrayList<KeyNamePair> getBankAccountList() {
|
||||
ArrayList<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
|
||||
/**
|
||||
* Load Accounts
|
||||
*/
|
||||
String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct "
|
||||
+ "FROM C_BP_BankAccount a"
|
||||
+ " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) "
|
||||
+ "WHERE C_BPartner_ID=?"
|
||||
+ "AND a.IsActive='Y' AND a.IsACH='Y'";
|
||||
try
|
||||
{
|
||||
PreparedStatement pstmt = DB.prepareStatement(SQL, null);
|
||||
pstmt.setInt(1, m_C_BPartner_ID);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
int key = rs.getInt(1);
|
||||
String name = rs.getString(2);
|
||||
KeyNamePair pp = new KeyNamePair(key, name);
|
||||
list.add(pp);
|
||||
}
|
||||
rs.close();
|
||||
pstmt.close();
|
||||
}
|
||||
catch (SQLException eac)
|
||||
{
|
||||
log.log(Level.SEVERE, SQL, eac);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public String processMsg;
|
||||
public boolean save()
|
||||
{
|
||||
processMsg = null;
|
||||
boolean error = false;
|
||||
|
||||
String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD";
|
||||
|
||||
/***********************
|
||||
* Changed PaymentRule
|
||||
*/
|
||||
if (!PAYMENTRULE.equals(m_PaymentRule))
|
||||
{
|
||||
log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE);
|
||||
// We had a change in Payment type (e.g. Check to CC)
|
||||
if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null)
|
||||
{
|
||||
log.fine("Old Payment(1) - " + m_mPaymentOriginal);
|
||||
m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok)
|
||||
log.info( "Payment Canecelled - " + m_mPaymentOriginal);
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo();
|
||||
error = true;
|
||||
}
|
||||
m_mPayment.resetNew();
|
||||
}
|
||||
// We had a Payment and something else (e.g. Check to Cash)
|
||||
else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1)
|
||||
{
|
||||
log.fine("Old Payment(2) - " + m_mPaymentOriginal);
|
||||
if (m_mPaymentOriginal != null)
|
||||
{
|
||||
m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct);
|
||||
m_mPaymentOriginal.saveEx();
|
||||
if (ok) // Cancel Payment
|
||||
{
|
||||
log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ());
|
||||
getGridTab().getTableModel().dataSave(true);
|
||||
m_mPayment.resetNew();
|
||||
m_mPayment.setAmount(m_C_Currency_ID, m_Amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo();
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**********************
|
||||
* Save Values to mTab
|
||||
*/
|
||||
log.config("Saving changes");
|
||||
// Set Payment
|
||||
if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID)
|
||||
{
|
||||
if (m_mPayment.getC_Payment_ID() == 0)
|
||||
getGridTab().setValue("C_Payment_ID", null);
|
||||
else
|
||||
getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID()));
|
||||
}
|
||||
|
||||
return !error;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,26 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormMixedPOS extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_MixedPOSPayment;
|
||||
|
||||
public PaymentFormMixedPOS(int WindowNo, GridTab mTab) {
|
||||
super(WindowNo, mTab);
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.compiere.grid;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -7,13 +20,16 @@ import java.util.ArrayList;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Elaine
|
||||
*
|
||||
*/
|
||||
public abstract class PaymentFormOnCredit extends PaymentForm {
|
||||
public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_OnCredit;
|
||||
|
||||
/** Start Payment Term */
|
||||
public int m_C_PaymentTerm_ID = 0;
|
||||
|
|
Loading…
Reference in New Issue