FS03 - Approval Amount by Period
http://www.adempiere.com/index.php/FS03_Approval_Amount_By_Period https://sourceforge.net/tracker/?func=detail&aid=3123769&group_id=176962&atid=879335
This commit is contained in:
parent
27e8db31ed
commit
aebc2c85ca
|
@ -0,0 +1,205 @@
|
||||||
|
-- Aug 16, 2010 6:30:05 PM COT
|
||||||
|
-- Prevent invoice split to circumvent role approval amount
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54266,0,'AmtApprovalAccum',TO_TIMESTAMP('2010-08-16 18:30:04','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period','D','The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','Approval Amount Accumulated','Approval Amt Accumulated',TO_TIMESTAMP('2010-08-16 18:30:04','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:30:05 PM COT
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54266 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:31:43 PM COT
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54267,0,'DaysApprovalAccum',TO_TIMESTAMP('2010-08-16 18:31:43','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.','D','The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','Days Approval Accumulated','Days Approval Accumulated',TO_TIMESTAMP('2010-08-16 18:31:43','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:31:43 PM COT
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54267 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:38 PM COT
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59665,54266,0,12,156,'AmtApprovalAccum',TO_TIMESTAMP('2010-08-16 18:32:37','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period','D',22,'The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','N','N','N','N','N','N','N','N','N','Y','Approval Amount Accumulated',0,TO_TIMESTAMP('2010-08-16 18:32:37','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:38 PM COT
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59665 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:43 PM COT
|
||||||
|
ALTER TABLE AD_Role ADD AmtApprovalAccum NUMBER(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:14 PM COT
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59666,54267,0,11,156,'DaysApprovalAccum',TO_TIMESTAMP('2010-08-16 18:33:13','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.','D',10,'The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','N','N','N','N','N','N','N','N','N','Y','Days Approval Accumulated',0,TO_TIMESTAMP('2010-08-16 18:33:13','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:14 PM COT
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59666 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:17 PM COT
|
||||||
|
ALTER TABLE AD_Role ADD DaysApprovalAccum NUMBER(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:34:56 PM COT
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59665,134,59591,0,119,TO_TIMESTAMP('2010-08-16 18:34:56','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period',14,'D','The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','Y','Y','N','N','N','N','N','Approval Amount Accumulated',380,0,TO_TIMESTAMP('2010-08-16 18:34:56','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:34:56 PM COT
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=59591 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:35:17 PM COT
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59666,59592,0,119,TO_TIMESTAMP('2010-08-16 18:35:16','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.',10,'D','The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','Y','Y','N','N','N','N','Y','Days Approval Accumulated',390,0,TO_TIMESTAMP('2010-08-16 18:35:16','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:35:17 PM COT
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=59592 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=59592
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=59591
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=10126
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=52018
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=8740
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=5227
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=11006
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=11003
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=11002
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=8311
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=10813
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=11256
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=11257
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=8313
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=8314
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=8312
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=8310
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=12367
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=12368
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=12641
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=50168
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=50169
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=50170
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=50171
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=50172
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=50173
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=50174
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=50175
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=50176
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=50177
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=50178
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=55432
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=55433
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:23 PM COT
|
||||||
|
UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2010-08-16 18:41:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59592
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:25 PM COT
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2010-08-16 18:41:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59591
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 30, 2010 2:34:58 PM COT
|
||||||
|
UPDATE AD_Element_Trl SET IsTranslated='Y',Name='Total Aprobación Acumulado',PrintName='Total Aprobación Acumulado',Description='Total límite de aprobación para este perfil acumulados en un período',Help='El campo total aprobación acumulado indica el total límite que este perfil tiene para aprobación de documentos durante un período limitado.',Updated=TO_DATE('2010-11-30 14:34:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54266 AND AD_Language LIKE 'es_%'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 30, 2010 2:36:02 PM COT
|
||||||
|
UPDATE AD_Element_Trl SET IsTranslated='Y',Name='Días Aprobación Acumulado',PrintName='Días Aprobación Acumulado',Description='Los días de aprobación acumulados indican los días a tener en cuenta para verificar el total de aprobación acumulado.',Help='El campo días de aprobación acumulado indican los días a tener en cuenta para verificar el total de aprobación acumulado.',Updated=TO_DATE('2010-11-30 14:36:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54267 AND AD_Language LIKE 'es_%'
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,207 @@
|
||||||
|
SET CLIENT_ENCODING TO 'UTF8';
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:30:05 PM COT
|
||||||
|
-- Prevent invoice split to circumvent role approval amount
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54266,0,'AmtApprovalAccum',TO_DATE('2010-08-16 18:30:04','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period','D','The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','Approval Amount Accumulated','Approval Amt Accumulated',TO_DATE('2010-08-16 18:30:04','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:30:05 PM COT
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54266 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:31:43 PM COT
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54267,0,'DaysApprovalAccum',TO_DATE('2010-08-16 18:31:43','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.','D','The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','Days Approval Accumulated','Days Approval Accumulated',TO_DATE('2010-08-16 18:31:43','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:31:43 PM COT
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54267 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:38 PM COT
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59665,54266,0,12,156,'AmtApprovalAccum',TO_DATE('2010-08-16 18:32:37','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period','D',22,'The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','N','N','N','N','N','N','N','N','N','Y','Approval Amount Accumulated',0,TO_DATE('2010-08-16 18:32:37','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:38 PM COT
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59665 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:32:43 PM COT
|
||||||
|
ALTER TABLE AD_Role ADD COLUMN AmtApprovalAccum NUMERIC
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:14 PM COT
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59666,54267,0,11,156,'DaysApprovalAccum',TO_DATE('2010-08-16 18:33:13','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.','D',10,'The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','N','N','N','N','N','N','N','N','N','Y','Days Approval Accumulated',0,TO_DATE('2010-08-16 18:33:13','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:14 PM COT
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59666 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:33:17 PM COT
|
||||||
|
ALTER TABLE AD_Role ADD COLUMN DaysApprovalAccum NUMERIC(10)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:34:56 PM COT
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59665,134,59591,0,119,TO_DATE('2010-08-16 18:34:56','YYYY-MM-DD HH24:MI:SS'),100,'The approval amount limit for this role accumulated on a period',14,'D','The Approval Amount field indicates the amount limit this Role has for approval of documents within a period limit.','Y','Y','Y','N','N','N','N','N','Approval Amount Accumulated',380,0,TO_DATE('2010-08-16 18:34:56','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:34:56 PM COT
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=59591 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:35:17 PM COT
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59666,59592,0,119,TO_DATE('2010-08-16 18:35:16','YYYY-MM-DD HH24:MI:SS'),100,'The days approval indicates the days to take into account to verify the accumulated approval amount.',10,'D','The Days Approval Accumulated field indicates the days to take into account to verify the accumulated approval amount.','Y','Y','Y','N','N','N','N','Y','Days Approval Accumulated',390,0,TO_DATE('2010-08-16 18:35:16','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:35:17 PM COT
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=59592 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=59592
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=59591
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=10126
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=52018
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=8740
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=5227
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=11006
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=11003
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=11002
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=8311
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=10813
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=11256
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=11257
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=8313
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=8314
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=8312
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=8310
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=12367
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=12368
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=12641
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=50168
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=50169
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=50170
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:12 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=50171
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=50172
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=50173
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=50174
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=50175
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=50176
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=50177
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=50178
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=55432
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:13 PM COT
|
||||||
|
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=55433
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:23 PM COT
|
||||||
|
UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2010-08-16 18:41:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59592
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 16, 2010 6:41:25 PM COT
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2010-08-16 18:41:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59591
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 30, 2010 2:34:58 PM COT
|
||||||
|
UPDATE AD_Element_Trl SET IsTranslated='Y',Name='Total Aprobación Acumulado',PrintName='Total Aprobación Acumulado',Description='Total límite de aprobación para este perfil acumulados en un período',Help='El campo total aprobación acumulado indica el total límite que este perfil tiene para aprobación de documentos durante un período limitado.',Updated=TO_TIMESTAMP('2010-11-30 14:34:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54266 AND AD_Language LIKE 'es_%'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 30, 2010 2:36:02 PM COT
|
||||||
|
UPDATE AD_Element_Trl SET IsTranslated='Y',Name='Días Aprobación Acumulado',PrintName='Días Aprobación Acumulado',Description='Los días de aprobación acumulados indican los días a tener en cuenta para verificar el total de aprobación acumulado.',Help='El campo días de aprobación acumulado indican los días a tener en cuenta para verificar el total de aprobación acumulado.',Updated=TO_TIMESTAMP('2010-11-30 14:36:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54267 AND AD_Language LIKE 'es_%'
|
||||||
|
;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ModelGeneratorDialog extends JDialog implements ActionListener {
|
||||||
|
|
||||||
Panel filePanel = new Panel();
|
Panel filePanel = new Panel();
|
||||||
filePanel.setLayout(new BorderLayout());
|
filePanel.setLayout(new BorderLayout());
|
||||||
fFolderName = new JTextField();
|
fFolderName = new JTextField("/home/carlos/hgAdempiere/localosgi/org.adempiere.base/src");
|
||||||
filePanel.add(fFolderName, BorderLayout.CENTER);
|
filePanel.add(fFolderName, BorderLayout.CENTER);
|
||||||
bFolder = new JButton("...");
|
bFolder = new JButton("...");
|
||||||
bFolder.setMargin(new Insets(0, 0, 0, 0));
|
bFolder.setMargin(new Insets(0, 0, 0, 0));
|
||||||
|
@ -73,22 +73,22 @@ public class ModelGeneratorDialog extends JDialog implements ActionListener {
|
||||||
bFolder.addActionListener(this);
|
bFolder.addActionListener(this);
|
||||||
|
|
||||||
mainPanel.add(new JLabel("Package Name"));
|
mainPanel.add(new JLabel("Package Name"));
|
||||||
fPackageName = new JTextField("org.adempiere.model");
|
fPackageName = new JTextField("org.compiere.model");
|
||||||
mainPanel.add(fPackageName);
|
mainPanel.add(fPackageName);
|
||||||
|
|
||||||
mainPanel.add(new JLabel("Table Name"));
|
mainPanel.add(new JLabel("Table Name"));
|
||||||
fTableName = new JTextField("%");
|
fTableName = new JTextField("AD_Role");
|
||||||
mainPanel.add(fTableName);
|
mainPanel.add(fTableName);
|
||||||
|
|
||||||
mainPanel.add(new JLabel("Entity Type"));
|
mainPanel.add(new JLabel("Entity Type"));
|
||||||
fEntityType = new JTextField("U,A");
|
fEntityType = new JTextField("D");
|
||||||
mainPanel.add(fEntityType);
|
mainPanel.add(fEntityType);
|
||||||
|
|
||||||
fGenerateInterface = new JCheckBox("Generate Interface");
|
fGenerateInterface = new JCheckBox("Generate Interface");
|
||||||
fGenerateInterface.setSelected(true);
|
fGenerateInterface.setSelected(true);
|
||||||
mainPanel.add(fGenerateInterface);
|
mainPanel.add(fGenerateInterface);
|
||||||
fGenerateClass = new JCheckBox("Generate Class");
|
fGenerateClass = new JCheckBox("Generate Class");
|
||||||
fGenerateClass.setSelected(false);
|
fGenerateClass.setSelected(true);
|
||||||
mainPanel.add(fGenerateClass);
|
mainPanel.add(fGenerateClass);
|
||||||
|
|
||||||
bGenerate = new JButton("Generate Source");
|
bGenerate = new JButton("Generate Source");
|
||||||
|
|
|
@ -31,7 +31,7 @@ public interface I_AD_Role
|
||||||
public static final String Table_Name = "AD_Role";
|
public static final String Table_Name = "AD_Role";
|
||||||
|
|
||||||
/** AD_Table_ID=156 */
|
/** AD_Table_ID=156 */
|
||||||
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
public static final int Table_ID = 156;
|
||||||
|
|
||||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public int getAD_Tree_Menu_ID();
|
public int getAD_Tree_Menu_ID();
|
||||||
|
|
||||||
public I_AD_Tree getAD_Tree_Menu() throws RuntimeException;
|
public org.compiere.model.I_AD_Tree getAD_Tree_Menu() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name AD_Tree_Org_ID */
|
/** Column name AD_Tree_Org_ID */
|
||||||
public static final String COLUMNNAME_AD_Tree_Org_ID = "AD_Tree_Org_ID";
|
public static final String COLUMNNAME_AD_Tree_Org_ID = "AD_Tree_Org_ID";
|
||||||
|
@ -103,7 +103,7 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public int getAD_Tree_Org_ID();
|
public int getAD_Tree_Org_ID();
|
||||||
|
|
||||||
public I_AD_Tree getAD_Tree_Org() throws RuntimeException;
|
public org.compiere.model.I_AD_Tree getAD_Tree_Org() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name Allow_Info_Account */
|
/** Column name Allow_Info_Account */
|
||||||
public static final String COLUMNNAME_Allow_Info_Account = "Allow_Info_Account";
|
public static final String COLUMNNAME_Allow_Info_Account = "Allow_Info_Account";
|
||||||
|
@ -235,6 +235,19 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public BigDecimal getAmtApproval();
|
public BigDecimal getAmtApproval();
|
||||||
|
|
||||||
|
/** Column name AmtApprovalAccum */
|
||||||
|
public static final String COLUMNNAME_AmtApprovalAccum = "AmtApprovalAccum";
|
||||||
|
|
||||||
|
/** Set Approval Amount Accumulated.
|
||||||
|
* The approval amount limit for this role accumulated on a period
|
||||||
|
*/
|
||||||
|
public void setAmtApprovalAccum (BigDecimal AmtApprovalAccum);
|
||||||
|
|
||||||
|
/** Get Approval Amount Accumulated.
|
||||||
|
* The approval amount limit for this role accumulated on a period
|
||||||
|
*/
|
||||||
|
public BigDecimal getAmtApprovalAccum();
|
||||||
|
|
||||||
/** Column name C_Currency_ID */
|
/** Column name C_Currency_ID */
|
||||||
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
|
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
|
||||||
|
|
||||||
|
@ -248,7 +261,7 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public int getC_Currency_ID();
|
public int getC_Currency_ID();
|
||||||
|
|
||||||
public I_C_Currency getC_Currency() throws RuntimeException;
|
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name ConfirmQueryRecords */
|
/** Column name ConfirmQueryRecords */
|
||||||
public static final String COLUMNNAME_ConfirmQueryRecords = "ConfirmQueryRecords";
|
public static final String COLUMNNAME_ConfirmQueryRecords = "ConfirmQueryRecords";
|
||||||
|
@ -292,6 +305,19 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public int getCreatedBy();
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name DaysApprovalAccum */
|
||||||
|
public static final String COLUMNNAME_DaysApprovalAccum = "DaysApprovalAccum";
|
||||||
|
|
||||||
|
/** Set Days Approval Accumulated.
|
||||||
|
* The days approval indicates the days to take into account to verify the accumulated approval amount.
|
||||||
|
*/
|
||||||
|
public void setDaysApprovalAccum (int DaysApprovalAccum);
|
||||||
|
|
||||||
|
/** Get Days Approval Accumulated.
|
||||||
|
* The days approval indicates the days to take into account to verify the accumulated approval amount.
|
||||||
|
*/
|
||||||
|
public int getDaysApprovalAccum();
|
||||||
|
|
||||||
/** Column name Description */
|
/** Column name Description */
|
||||||
public static final String COLUMNNAME_Description = "Description";
|
public static final String COLUMNNAME_Description = "Description";
|
||||||
|
|
||||||
|
@ -531,7 +557,7 @@ public interface I_AD_Role
|
||||||
*/
|
*/
|
||||||
public int getSupervisor_ID();
|
public int getSupervisor_ID();
|
||||||
|
|
||||||
public I_AD_User getSupervisor() throws RuntimeException;
|
public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name Updated */
|
/** Column name Updated */
|
||||||
public static final String COLUMNNAME_Updated = "Updated";
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20100614L;
|
private static final long serialVersionUID = 20110325L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_AD_Role (Properties ctx, int AD_Role_ID, String trxName)
|
public X_AD_Role (Properties ctx, int AD_Role_ID, String trxName)
|
||||||
|
@ -152,9 +152,9 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_Tree getAD_Tree_Menu() throws RuntimeException
|
public org.compiere.model.I_AD_Tree getAD_Tree_Menu() throws RuntimeException
|
||||||
{
|
{
|
||||||
return (I_AD_Tree)MTable.get(getCtx(), I_AD_Tree.Table_Name)
|
return (org.compiere.model.I_AD_Tree)MTable.get(getCtx(), org.compiere.model.I_AD_Tree.Table_Name)
|
||||||
.getPO(getAD_Tree_Menu_ID(), get_TrxName()); }
|
.getPO(getAD_Tree_Menu_ID(), get_TrxName()); }
|
||||||
|
|
||||||
/** Set Menu Tree.
|
/** Set Menu Tree.
|
||||||
|
@ -180,9 +180,9 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_Tree getAD_Tree_Org() throws RuntimeException
|
public org.compiere.model.I_AD_Tree getAD_Tree_Org() throws RuntimeException
|
||||||
{
|
{
|
||||||
return (I_AD_Tree)MTable.get(getCtx(), I_AD_Tree.Table_Name)
|
return (org.compiere.model.I_AD_Tree)MTable.get(getCtx(), org.compiere.model.I_AD_Tree.Table_Name)
|
||||||
.getPO(getAD_Tree_Org_ID(), get_TrxName()); }
|
.getPO(getAD_Tree_Org_ID(), get_TrxName()); }
|
||||||
|
|
||||||
/** Set Organization Tree.
|
/** Set Organization Tree.
|
||||||
|
@ -501,9 +501,29 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
return bd;
|
return bd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_C_Currency getC_Currency() throws RuntimeException
|
/** Set Approval Amount Accumulated.
|
||||||
|
@param AmtApprovalAccum
|
||||||
|
The approval amount limit for this role accumulated on a period
|
||||||
|
*/
|
||||||
|
public void setAmtApprovalAccum (BigDecimal AmtApprovalAccum)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_AmtApprovalAccum, AmtApprovalAccum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Approval Amount Accumulated.
|
||||||
|
@return The approval amount limit for this role accumulated on a period
|
||||||
|
*/
|
||||||
|
public BigDecimal getAmtApprovalAccum ()
|
||||||
|
{
|
||||||
|
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmtApprovalAccum);
|
||||||
|
if (bd == null)
|
||||||
|
return Env.ZERO;
|
||||||
|
return bd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException
|
||||||
{
|
{
|
||||||
return (I_C_Currency)MTable.get(getCtx(), I_C_Currency.Table_Name)
|
return (org.compiere.model.I_C_Currency)MTable.get(getCtx(), org.compiere.model.I_C_Currency.Table_Name)
|
||||||
.getPO(getC_Currency_ID(), get_TrxName()); }
|
.getPO(getC_Currency_ID(), get_TrxName()); }
|
||||||
|
|
||||||
/** Set Currency.
|
/** Set Currency.
|
||||||
|
@ -577,6 +597,26 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
return (String)get_Value(COLUMNNAME_ConnectionProfile);
|
return (String)get_Value(COLUMNNAME_ConnectionProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Days Approval Accumulated.
|
||||||
|
@param DaysApprovalAccum
|
||||||
|
The days approval indicates the days to take into account to verify the accumulated approval amount.
|
||||||
|
*/
|
||||||
|
public void setDaysApprovalAccum (int DaysApprovalAccum)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_DaysApprovalAccum, Integer.valueOf(DaysApprovalAccum));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Days Approval Accumulated.
|
||||||
|
@return The days approval indicates the days to take into account to verify the accumulated approval amount.
|
||||||
|
*/
|
||||||
|
public int getDaysApprovalAccum ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_DaysApprovalAccum);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Description.
|
/** Set Description.
|
||||||
@param Description
|
@param Description
|
||||||
Optional short description of the record
|
Optional short description of the record
|
||||||
|
@ -973,9 +1013,9 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
|
||||||
return (String)get_Value(COLUMNNAME_PreferenceType);
|
return (String)get_Value(COLUMNNAME_PreferenceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_User getSupervisor() throws RuntimeException
|
public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException
|
||||||
{
|
{
|
||||||
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
|
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||||
.getPO(getSupervisor_ID(), get_TrxName()); }
|
.getPO(getSupervisor_ID(), get_TrxName()); }
|
||||||
|
|
||||||
/** Set Supervisor.
|
/** Set Supervisor.
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.compiere.wf;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Savepoint;
|
import java.sql.Savepoint;
|
||||||
|
@ -55,6 +56,7 @@ import org.compiere.print.ReportEngine;
|
||||||
import org.compiere.process.DocAction;
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.process.ProcessInfo;
|
import org.compiere.process.ProcessInfo;
|
||||||
import org.compiere.process.StateEngine;
|
import org.compiere.process.StateEngine;
|
||||||
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -687,6 +689,23 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
||||||
log.fine("Approved=" + approved
|
log.fine("Approved=" + approved
|
||||||
+ " - User=" + user.getName() + ", Role=" + role.getName()
|
+ " - User=" + user.getName() + ", Role=" + role.getName()
|
||||||
+ ", ApprovalAmt=" + roleAmt);
|
+ ", ApprovalAmt=" + roleAmt);
|
||||||
|
if (approved) {
|
||||||
|
// Verify accumulated amount approval - FR [3123769] - Carlos Ruiz - GlobalQSS
|
||||||
|
BigDecimal roleAmtAcc = role.getAmtApprovalAccum();
|
||||||
|
Integer daysAmtAcc = role.getDaysApprovalAccum();
|
||||||
|
if ( roleAmtAcc != null && roleAmtAcc.signum() > 0
|
||||||
|
&& daysAmtAcc != null && daysAmtAcc.intValue() > 0) {
|
||||||
|
BigDecimal amtApprovedAccum = getAmtAccum(m_po, daysAmtAcc.intValue(), user.getAD_User_ID());
|
||||||
|
amtApprovedAccum = amtApprovedAccum.add(amount); // include amount of current doc
|
||||||
|
approved = amtApprovedAccum.compareTo(roleAmtAcc) <= 0;
|
||||||
|
log.info("ApprovedAccum=" + approved
|
||||||
|
+ " - User=" + user.getName() + ", Role=" + role.getName()
|
||||||
|
+ ", ApprovalAmtAccum=" + roleAmtAcc
|
||||||
|
+ ", AccumDocsApproved=" + amtApprovedAccum
|
||||||
|
+ " in past " + daysAmtAcc.intValue() + " days");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (approved)
|
if (approved)
|
||||||
return user.getAD_User_ID();
|
return user.getAD_User_ID();
|
||||||
}
|
}
|
||||||
|
@ -733,6 +752,74 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
||||||
return -1;
|
return -1;
|
||||||
} // getApproval
|
} // getApproval
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Amount of Accumulated Approvals of this same document within the indicated days
|
||||||
|
* @param po - the document being approved
|
||||||
|
* @param days - the days to check
|
||||||
|
* @param userid - user approving
|
||||||
|
* @return amount - approval amount of approved documents within the indicated days
|
||||||
|
*/
|
||||||
|
private BigDecimal getAmtAccum(PO po, int days, int userid) {
|
||||||
|
BigDecimal amtaccum = Env.ZERO;
|
||||||
|
String tablename = po.get_TableName();
|
||||||
|
MTable tablepo = MTable.get(getCtx(), po.get_Table_ID());
|
||||||
|
String checkSameSO = "";
|
||||||
|
if (po.get_ColumnIndex("IsSOTrx") > 0) {
|
||||||
|
checkSameSO = " AND doc.IsSOTrx='" + ((Boolean) po.get_Value("IsSOTrx") ? "Y" : "N") + "'";
|
||||||
|
}
|
||||||
|
String checkSameReceipt = "";
|
||||||
|
if (po.get_ColumnIndex("IsReceipt") > 0) {
|
||||||
|
checkSameReceipt = " AND doc.IsReceipt='" + ((Boolean) po.get_Value("IsReceipt") ? "Y" : "N") + "'";
|
||||||
|
}
|
||||||
|
String checkDocAction = "";
|
||||||
|
if (po.get_ColumnIndex("DocStatus") > 0) {
|
||||||
|
checkDocAction = " AND DocStatus IN ('CO','CL')";
|
||||||
|
}
|
||||||
|
String sql = ""
|
||||||
|
+ "SELECT DISTINCT doc." + tablename + "_ID "
|
||||||
|
+ " FROM " + tablename + " doc, "
|
||||||
|
+ " AD_WF_Activity a, "
|
||||||
|
+ " AD_WF_Node n, "
|
||||||
|
+ " AD_Column c "
|
||||||
|
+ " WHERE a.AD_WF_Node_ID = n.AD_WF_Node_ID "
|
||||||
|
+ " AND n.AD_Column_ID = c.AD_Column_ID "
|
||||||
|
+ " AND a.AD_Table_ID = " + po.get_Table_ID()
|
||||||
|
+ " AND a.Record_ID = doc." + tablename + "_ID "
|
||||||
|
+ " AND a.Record_ID != " + po.get_ID()
|
||||||
|
+ " AND c.ColumnName = 'IsApproved' "
|
||||||
|
+ " AND n.Action = 'C' "
|
||||||
|
+ " AND a.WFState = 'CC' "
|
||||||
|
+ " AND a.UpdatedBy = " + userid
|
||||||
|
+ " AND a.Updated > Trunc(SYSDATE) - " + (days-1)
|
||||||
|
+ checkSameSO
|
||||||
|
+ checkSameReceipt
|
||||||
|
+ checkDocAction;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
while (rs.next ()) {
|
||||||
|
int doc_id = rs.getInt(1);
|
||||||
|
PO doc = tablepo.getPO(doc_id, get_TrxName());
|
||||||
|
BigDecimal docamt = ((DocAction) doc).getApprovalAmt();
|
||||||
|
if (docamt != null)
|
||||||
|
amtaccum = amtaccum.add(docamt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null; pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return amtaccum;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Execute Work.
|
* Execute Work.
|
||||||
|
|
Loading…
Reference in New Issue