Merge with 8a571dacb86e47e42584969a5958b504c7616469

This commit is contained in:
Heng Sin Low 2012-08-23 12:18:04 +08:00
commit 1123aec6d1
20 changed files with 465 additions and 40 deletions

View File

@ -0,0 +1,63 @@
-- Aug 21, 2012
-- IDEMPIERE-217 Allocate Payment to Charge
UPDATE AD_Column SET AD_Val_Rule_ID=52032,Updated=TO_DATE('2011-07-05 11:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3050;
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52103,'(C_Charge.C_Charge_ID IN (
SELECT c.C_Charge_ID
FROM C_Charge c
JOIN C_ChargeType ct ON (ct.C_ChargeType_ID = c.C_ChargeType_ID)
JOIN C_ChargeType_Doctype ctd ON (ctd.C_ChargeType_ID = ct.C_ChargeType_ID)
JOIN C_DocType dt ON (dt.C_DocType_ID =ctd.C_DocType_ID AND dt.AD_Client_ID= ctd.AD_Client_ID AND dt.DocBaseType= ''CMA'')
) OR
(SELECT COUNT(*) FROM C_ChargeType_DocType WHERE AD_Client_ID=@AD_Client_ID@) = 0)',TO_DATE('2011-07-05 11:37:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Charge_ID by DocType Allocation','S',TO_DATE('2011-07-05 11:37:30','YYYY-MM-DD HH24:MI:SS'),100);
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,61804,968,0,19,390,52103,'C_Charge_ID',TO_DATE('2011-07-05 11:38:51','YYYY-MM-DD HH24:MI:SS'),100,'Additional document charges','D',22,'The Charge indicates a type of Charge (Handling, Shipping, Restocking)','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Charge',0,TO_DATE('2011-07-05 11:38:51','YYYY-MM-DD HH24:MI:SS'),100,0);
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=61804 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);
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,Updated,UpdatedBy) VALUES (0,61804,61876,0,349,TO_DATE('2011-07-05 11:39:36','YYYY-MM-DD HH24:MI:SS'),100,'Additional document charges',22,'D','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','Y','Y','Y','N','N','N','N','N','Charge',TO_DATE('2011-07-05 11:39:36','YYYY-MM-DD HH24:MI:SS'),100);
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=61876 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);
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=61876;
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=4368;
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=4387;
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=4375;
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=4380;
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=8931;
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2011-07-05 11:40:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=61876;
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53137,0,TO_DATE('2011-07-05 11:41:29','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Charge to apply difference amount to.','I',TO_DATE('2011-07-05 11:41:29','YYYY-MM-DD HH24:MI:SS'),100,'ChargeDifference');
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53137 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);
ALTER TABLE C_AllocationLine ADD C_Charge_ID NUMBER(10) DEFAULT NULL ;
UPDATE AD_System
SET LastMigrationScriptApplied='886_IDEMPIERE-217.sql'
WHERE LastMigrationScriptApplied<'886_IDEMPIERE-217.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,34 @@
-- Aug 22, 2012 8:14:29 PM COT
-- IDEMPIERE-370 Implement link from process ending message to next records
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid) VALUES (0,'N',665,10,'N','N',200320,70,'Y',200309,'N','The Database Table provides the information of the table definition','D','Database Table information','Table','Y','N','5188b164-3159-407e-bb6a-2fa18af5e5df',100,0,TO_DATE('2012-08-22 20:14:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-22 20:14:28','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70)
;
-- Aug 22, 2012 8:14:29 PM COT
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=200309 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)
;
-- Aug 22, 2012 8:14:49 PM COT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid) VALUES (0,'N',665,10,'Y','N',200321,80,'Y',200310,'N','The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.','D','Direct internal record ID','Record ID','Y','N','a2acffa8-7f2f-4b00-b425-51ee0d53a459',100,0,TO_DATE('2012-08-22 20:14:49','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-22 20:14:49','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80)
;
-- Aug 22, 2012 8:14:49 PM COT
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=200310 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)
;
-- Aug 22, 2012 8:15:58 PM COT
UPDATE AD_Column SET EntityType='D', AD_Reference_ID=28,Updated=TO_DATE('2012-08-22 20:15:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200321
;
-- Aug 22, 2012 8:16:35 PM COT
UPDATE AD_Field SET DisplayLogic='@Record_ID@>0',Updated=TO_DATE('2012-08-22 20:16:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200310
;
-- Aug 22, 2012 8:16:39 PM COT
UPDATE AD_Field SET DisplayLogic='@Record_ID@>0',Updated=TO_DATE('2012-08-22 20:16:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200309
;
UPDATE AD_System
SET LastMigrationScriptApplied='889_IDEMPIERE-370_LinkEndOfProcess.sql'
WHERE LastMigrationScriptApplied<'889_IDEMPIERE-370_LinkEndOfProcess.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,14 @@
-- Aug 22, 2012 8:29:01 PM COT
-- IDEMPIERE-377 Improve current search dialog box
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 ('I','Saved Query',200015,'D','5858f98d-e767-41a4-9691-6f762e8e1c71','SavedQuery','Y',TO_DATE('2012-08-22 20:29:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-08-22 20:29:00','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 22, 2012 8:29:01 PM COT
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=200015 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)
;
UPDATE AD_System
SET LastMigrationScriptApplied='890_IDEMPIERE-377.sql'
WHERE LastMigrationScriptApplied<'890_IDEMPIERE-377.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,14 @@
-- Aug 22, 2012 9:41:18 PM COT
-- IDEMPIERE-377 Improve current search dialog box
UPDATE PA_DashboardContent SET Description='Request Calendar',Updated=TO_DATE('2012-08-22 21:41:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DashboardContent_ID=50004
;
-- Aug 22, 2012 9:41:18 PM COT
UPDATE PA_DashboardContent_Trl SET Description='Request Calendar',Name='Calendar',IsTranslated='Y' WHERE PA_DashboardContent_ID=50004
;
UPDATE AD_System
SET LastMigrationScriptApplied='891_IDEMPIERE-357.sql'
WHERE LastMigrationScriptApplied<'891_IDEMPIERE-357.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,64 @@
-- Aug 21, 2012
-- IDEMPIERE-217 Allocate Payment to Charge
UPDATE AD_Column SET AD_Val_Rule_ID=52032,Updated=TO_TIMESTAMP('2011-07-05 11:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3050;
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52103,'(C_Charge.C_Charge_ID IN (
SELECT c.C_Charge_ID
FROM C_Charge c
JOIN C_ChargeType ct ON (ct.C_ChargeType_ID = c.C_ChargeType_ID)
JOIN C_ChargeType_Doctype ctd ON (ctd.C_ChargeType_ID = ct.C_ChargeType_ID)
JOIN C_DocType dt ON (dt.C_DocType_ID =ctd.C_DocType_ID AND dt.AD_Client_ID= ctd.AD_Client_ID AND dt.DocBaseType= ''CMA'')
) OR
(SELECT COUNT(*) FROM C_ChargeType_DocType WHERE AD_Client_ID=@AD_Client_ID@) = 0)',TO_TIMESTAMP('2011-07-05 11:37:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Charge_ID by DocType Allocation','S',TO_TIMESTAMP('2011-07-05 11:37:30','YYYY-MM-DD HH24:MI:SS'),100);
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName, Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted, IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy, Version) VALUES (0,61804,968,0,19,390,52103,'C_Charge_ID',TO_TIMESTAMP('2011-07-05 11:38:51','YYYY-MM-DD HH24:MI:SS'),100, 'Additional document charges','D',22,'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', 'Y','Y','N','N','N','N','N','N','N','N','N','N','N','Charge',0,TO_TIMESTAMP('2011-07-05 11:38:51','YYYY-MM-DD HH24:MI:SS'),100,0);
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=61804 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);
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,Updated, UpdatedBy) VALUES (0,61804,61876,0,349,TO_TIMESTAMP('2011-07-05 11:39:36','YYYY-MM-DD HH24:MI:SS'),100,'Additional document charges', 22,'D','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','Y','Y','Y','N','N','N','N','N','Charge', TO_TIMESTAMP('2011-07-05 11:39:36','YYYY-MM-DD HH24:MI:SS'),100);
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=61876 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);
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=61876;
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=4368;
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=4387;
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=4375;
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=4380;
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=8931;
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2011-07-05 11:40:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=61876;
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53137,0,TO_TIMESTAMP('2011-07-05 11:41:29','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Charge to apply difference amount to.','I',TO_TIMESTAMP('2011-07-05 11:41:29','YYYY-MM-DD HH24:MI:SS'),100,'ChargeDifference');
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53137 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);
ALTER TABLE C_AllocationLine ADD C_Charge_ID NUMERIC(10) DEFAULT NULL ;
UPDATE AD_System
SET LastMigrationScriptApplied='886_IDEMPIERE-217.sql'
WHERE LastMigrationScriptApplied<'886_IDEMPIERE-217.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,34 @@
-- Aug 22, 2012 8:14:29 PM COT
-- IDEMPIERE-370 Implement link from process ending message to next records
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid) VALUES (0,'N',665,10,'N','N',200320,70,'Y',200309,'N','The Database Table provides the information of the table definition','D','Database Table information','Table','Y','N','5188b164-3159-407e-bb6a-2fa18af5e5df',100,0,TO_TIMESTAMP('2012-08-22 20:14:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-22 20:14:28','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70)
;
-- Aug 22, 2012 8:14:29 PM COT
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=200309 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)
;
-- Aug 22, 2012 8:14:49 PM COT
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid) VALUES (0,'N',665,10,'Y','N',200321,80,'Y',200310,'N','The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.','D','Direct internal record ID','Record ID','Y','N','a2acffa8-7f2f-4b00-b425-51ee0d53a459',100,0,TO_TIMESTAMP('2012-08-22 20:14:49','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-22 20:14:49','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80)
;
-- Aug 22, 2012 8:14:49 PM COT
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=200310 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)
;
-- Aug 22, 2012 8:15:58 PM COT
UPDATE AD_Column SET EntityType='D', AD_Reference_ID=28,Updated=TO_TIMESTAMP('2012-08-22 20:15:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200321
;
-- Aug 22, 2012 8:16:35 PM COT
UPDATE AD_Field SET DisplayLogic='@Record_ID@>0',Updated=TO_TIMESTAMP('2012-08-22 20:16:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200310
;
-- Aug 22, 2012 8:16:39 PM COT
UPDATE AD_Field SET DisplayLogic='@Record_ID@>0',Updated=TO_TIMESTAMP('2012-08-22 20:16:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200309
;
UPDATE AD_System
SET LastMigrationScriptApplied='889_IDEMPIERE-370_LinkEndOfProcess.sql'
WHERE LastMigrationScriptApplied<'889_IDEMPIERE-370_LinkEndOfProcess.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,14 @@
-- Aug 22, 2012 8:29:01 PM COT
-- IDEMPIERE-377 Improve current search dialog box
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 ('I','Saved Query',200015,'D','5858f98d-e767-41a4-9691-6f762e8e1c71','SavedQuery','Y',TO_TIMESTAMP('2012-08-22 20:29:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-08-22 20:29:00','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 22, 2012 8:29:01 PM COT
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=200015 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)
;
UPDATE AD_System
SET LastMigrationScriptApplied='890_IDEMPIERE-377.sql'
WHERE LastMigrationScriptApplied<'890_IDEMPIERE-377.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,14 @@
-- Aug 22, 2012 9:41:18 PM COT
-- IDEMPIERE-377 Improve current search dialog box
UPDATE PA_DashboardContent SET Description='Request Calendar',Updated=TO_TIMESTAMP('2012-08-22 21:41:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DashboardContent_ID=50004
;
-- Aug 22, 2012 9:41:18 PM COT
UPDATE PA_DashboardContent_Trl SET Description='Request Calendar',Name='Calendar',IsTranslated='Y' WHERE PA_DashboardContent_ID=50004
;
UPDATE AD_System
SET LastMigrationScriptApplied='891_IDEMPIERE-357.sql'
WHERE LastMigrationScriptApplied<'891_IDEMPIERE-357.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -92,7 +92,7 @@ public class CopyColumnsFromTable extends SvrProcess
if (sourceColumns[i].getColumnName().equals(sourceTable.getTableName()+"_ID")) {
String targetColumnName = new String(targetTable.getTableName()+"_ID");
colTarget.setColumnName(targetColumnName);
// if the element don't exist, create it
// if the element doesn't exist, create it
M_Element element = M_Element.get (getCtx (), targetColumnName);
if (element == null)
{
@ -102,7 +102,28 @@ public class CopyColumnsFromTable extends SvrProcess
element.setName(targetTable.getName());
element.setPrintName(targetTable.getName());
}
element.save (get_TrxName());
element.saveEx(get_TrxName());
}
colTarget.setAD_Element_ID(element.getAD_Element_ID());
colTarget.setName(targetTable.getName());
colTarget.setDescription(targetTable.getDescription());
colTarget.setHelp(targetTable.getHelp());
}
// special case the UUID column -> sourceTable_UU
if (sourceColumns[i].getColumnName().equals(sourceTable.getTableName()+"_UU")) {
String targetColumnName = new String(targetTable.getTableName()+"_UU");
colTarget.setColumnName(targetColumnName);
// if the element doesn't exist, create it
M_Element element = M_Element.get (getCtx (), targetColumnName);
if (element == null)
{
element = new M_Element (getCtx (), targetColumnName, targetTable.getEntityType(), get_TrxName ());
if (targetColumnName.equalsIgnoreCase (targetTable.getTableName() + "_UU")) {
element.setColumnName(targetTable.getTableName() + "_UU");
element.setName(targetTable.getTableName() + "_UU");
element.setPrintName(targetTable.getTableName() + "_UU");
}
element.saveEx(get_TrxName());
}
colTarget.setAD_Element_ID(element.getAD_Element_ID());
colTarget.setName(targetTable.getName());

View File

@ -41,7 +41,12 @@ public class DocLine_Allocation extends DocLine
m_C_CashLine_ID = line.getC_CashLine_ID();
m_C_Invoice_ID = line.getC_Invoice_ID();
m_C_Order_ID = line.getC_Order_ID();
//
// adaxa-pb
Object obj = line.get_Value("C_Charge_ID");
if ( obj != null )
m_C_Charge_ID = (Integer) line.get_Value("C_Charge_ID");
else m_C_Charge_ID = 0;
// end adaxa-pb
setAmount(line.getAmount());
m_DiscountAmt = line.getDiscountAmt();
m_WriteOffAmt = line.getWriteOffAmt();
@ -52,6 +57,7 @@ public class DocLine_Allocation extends DocLine
private int m_C_Payment_ID;
private int m_C_CashLine_ID;
private int m_C_Order_ID;
private int m_C_Charge_ID; // adaxa-pb
private BigDecimal m_DiscountAmt;
private BigDecimal m_WriteOffAmt;
private BigDecimal m_OverUnderAmt;
@ -140,4 +146,11 @@ public class DocLine_Allocation extends DocLine
{
return m_C_Payment_ID;
}
/** adaxa-pb
* @return Returns the C_Charge_ID.
*/
public int getC_Charge_ID ()
{
return m_C_Charge_ID;
}
} // DocLine_Allocation

View File

@ -28,6 +28,7 @@ import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.MAllocationHdr;
import org.compiere.model.MAllocationLine;
import org.compiere.model.MCashLine;
import org.compiere.model.MCharge; // adaxa-pb
import org.compiere.model.MConversionRate;
import org.compiere.model.MFactAcct;
import org.compiere.model.MInvoice;
@ -215,8 +216,15 @@ public class Doc_AllocationHdr extends Doc
// No Invoice
if (invoice == null)
{
// adaxa-pb: allocate to charges
// Charge Only
if (line.getC_Invoice_ID() == 0 && line.getC_Payment_ID() == 0 && line.getC_Charge_ID() != 0 )
{
fl = fact.createLine (line, line.getChargeAccount(as, line.getAmtSource()),
getC_Currency_ID(), line.getAmtSource());
}
// Payment Only
if (line.getC_Invoice_ID() == 0 && line.getC_Payment_ID() != 0)
else if (line.getC_Invoice_ID() == 0 && line.getC_Payment_ID() != 0)
{
fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()),
getC_Currency_ID(), line.getAmtSource(), null);

View File

@ -116,6 +116,8 @@ public class VAllocation extends Allocation
private JButton allocateButton = new JButton();
private JLabel currencyLabel = new JLabel();
private VLookup currencyPick = null;
private JLabel chargeLabel = new JLabel();
private VLookup chargePick = null;
private JCheckBox multiCurrency = new JCheckBox();
private JLabel allocCurrencyLabel = new JLabel();
private StatusBar statusBar = new StatusBar();
@ -155,6 +157,8 @@ public class VAllocation extends Allocation
paymentInfo.setHorizontalAlignment(SwingConstants.RIGHT);
paymentInfo.setHorizontalTextPosition(SwingConstants.RIGHT);
paymentInfo.setText(".");
chargeLabel.setText(Msg.translate(Env.getCtx(), "C_Charge_ID"));
chargeLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "ChargeDifference", false));
differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference"));
differenceField.setBackground(AdempierePLAF.getFieldBackground_Inactive());
differenceField.setEditable(false);
@ -199,6 +203,10 @@ public class VAllocation extends Allocation
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
allocationPanel.add(differenceField, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
allocationPanel.add(chargeLabel, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
allocationPanel.add(chargePick, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
allocationPanel.add(allocateButton, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
allocationPanel.add(allocCurrencyLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
@ -267,6 +275,13 @@ public class VAllocation extends Allocation
// Date set to Login Date
dateField.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
dateField.addVetoableChangeListener(this);
// Charge
AD_Column_ID = 61804; // C_AllocationLine.C_Charge_ID
MLookup lookupCharge = MLookupFactory.get (Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir);
chargePick = new VLookup("C_Charge_ID", false, false, true, lookupCharge);
chargePick.setValue(new Integer(m_C_Charge_ID));
chargePick.addVetoableChangeListener(this);
} // dynInit
/**************************************************************************
@ -307,10 +322,19 @@ public class VAllocation extends Allocation
int row = e.getFirstRow();
int col = e.getColumn();
if (row < 0)
return;
boolean isInvoice = (e.getSource().equals(invoiceTable.getModel()));
boolean isAutoWriteOff = autoWriteOff.isSelected();
String msg = writeOff(row, col, isInvoice, paymentTable, invoiceTable, isAutoWriteOff);
//render row
DefaultTableModel model = (DefaultTableModel) (isInvoice ? invoiceTable.getModel() : paymentTable.getModel());
//model.fireTableRowsUpdated(row, row);
if(msg != null && msg.length() > 0)
ADialog.warn(m_WindowNo, panel, "AllocationWriteOffWarn");
@ -343,7 +367,17 @@ public class VAllocation extends Allocation
loadBPartner();
}
// Charge
else if (name.equals("C_Charge_ID") )
{
if ( value == null )
m_C_Charge_ID = 0;
else
m_C_Charge_ID = ((Integer) value).intValue();
setAllocateButton();
}
// BPartner
if (name.equals("C_BPartner_ID"))
{
@ -361,6 +395,25 @@ public class VAllocation extends Allocation
else if (name.equals("Date") && multiCurrency.isSelected())
loadBPartner();
} // vetoableChange
private void setAllocateButton() {
if (totalDiff.compareTo(new BigDecimal(0.0)) == 0 ^ m_C_Charge_ID > 0 )
{
allocateButton.setEnabled(true);
// chargePick.setValue(m_C_Charge_ID);
}
else
{
allocateButton.setEnabled(false);
}
if ( totalDiff.compareTo(new BigDecimal(0.0)) == 0 )
{
chargePick.setValue(null);
m_C_Charge_ID = 0;
}
}
public void loadBPartner()
{
@ -412,12 +465,10 @@ public class VAllocation extends Allocation
allocCurrencyLabel.setText(currencyPick.getDisplay());
// Difference
totalDiff = totalPay.subtract(totalInv);
differenceField.setText(format.format(totalDiff));
differenceField.setText(format.format(totalDiff));
setAllocateButton();
if (totalDiff.compareTo(new BigDecimal(0.0)) == 0)
allocateButton.setEnabled(true);
else
allocateButton.setEnabled(false);
}
/**************************************************************************

View File

@ -72,12 +72,7 @@ import org.zkoss.zul.Space;
public class WAllocation extends Allocation
implements IFormController, EventListener, WTableModelListener, ValueChangeListener
{
/**
*
*/
private static final long serialVersionUID = 7806119329546820204L;
private CustomForm form = new CustomForm();
/**
@ -128,6 +123,8 @@ public class WAllocation extends Allocation
private Label currencyLabel = new Label();
private WTableDirEditor currencyPick = null;
private Checkbox multiCurrency = new Checkbox();
private Label chargeLabel = new Label();
private WTableDirEditor chargePick = null;
private Label allocCurrencyLabel = new Label();
private StatusBarPanel statusBar = new StatusBarPanel();
private Label dateLabel = new Label();
@ -162,6 +159,7 @@ public class WAllocation extends Allocation
invoicePanel.appendChild(invoiceLayout);
invoiceInfo.setText(".");
paymentInfo.setText(".");
chargeLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Charge_ID"));
differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference"));
differenceField.setText("0");
allocateButton.setLabel(Msg.getMsg(Env.getCtx(), "Process"));
@ -213,13 +211,16 @@ public class WAllocation extends Allocation
south.appendChild(southPanel);
southPanel.appendChild(allocationPanel);
allocationPanel.appendChild(allocationLayout);
allocationLayout.setWidth("400px");
allocationLayout.setWidth("600px");
rows = allocationLayout.newRows();
row = rows.newRow();
row.appendChild(differenceLabel.rightAlign());
row.appendChild(allocCurrencyLabel.rightAlign());
row.appendChild(differenceField);
row.appendChild(new Space());
row.appendChild(chargeLabel.rightAlign());
row.appendChild(chargePick.getComponent());
row.appendChild(new Space());
row.appendChild(allocateButton);
paymentPanel.appendChild(paymentLayout);
@ -321,6 +322,14 @@ public class WAllocation extends Allocation
// Date set to Login Date
dateField.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
dateField.addValueChangeListener(this);
// Charge
AD_Column_ID = 61804; // C_AllocationLine.C_Charge_ID
MLookup lookupCharge = MLookupFactory.get (Env.getCtx(), form.getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir);
chargePick = new WTableDirEditor("C_Charge_ID", true, false, true, lookupCharge);
chargePick.setValue(new Integer(m_C_Charge_ID));
chargePick.addValueChangeListener(this);
} // dynInit
/**************************************************************************
@ -361,10 +370,19 @@ public class WAllocation extends Allocation
int row = e.getFirstRow();
int col = e.getColumn();
if (row < 0)
return;
boolean isInvoice = (e.getModel().equals(invoiceTable.getModel()));
boolean isAutoWriteOff = autoWriteOff.isSelected();
String msg = writeOff(row, col, isInvoice, paymentTable, invoiceTable, isAutoWriteOff);
//render row
ListModelTable model = isInvoice ? invoiceTable.getModel() : paymentTable.getModel();
model.updateComponent(row);
if(msg != null && msg.length() > 0)
FDialog.warn(form.getWindowNo(), "AllocationWriteOffWarn");
@ -396,6 +414,16 @@ public class WAllocation extends Allocation
loadBPartner();
}
// Charge
else if (name.equals("C_Charge_ID") )
{
if ( value == null )
m_C_Charge_ID = 0;
else
m_C_Charge_ID = ((Integer) value).intValue();
setAllocateButton();
}
// BPartner
if (name.equals("C_BPartner_ID"))
@ -415,6 +443,23 @@ public class WAllocation extends Allocation
loadBPartner();
} // vetoableChange
private void setAllocateButton() {
if (totalDiff.compareTo(new BigDecimal(0.0)) == 0 ^ m_C_Charge_ID > 0 )
{
allocateButton.setEnabled(true);
// chargePick.setValue(m_C_Charge_ID);
}
else
{
allocateButton.setEnabled(false);
}
if ( totalDiff.compareTo(new BigDecimal(0.0)) == 0 )
{
chargePick.setValue(null);
m_C_Charge_ID = 0;
}
}
/**
* Load Business Partner Info
* - Payments
@ -474,12 +519,9 @@ public class WAllocation extends Allocation
allocCurrencyLabel.setText(currencyPick.getDisplay());
// Difference
totalDiff = totalPay.subtract(totalInv);
differenceField.setText(format.format(totalDiff));
if (totalDiff.compareTo(new BigDecimal(0.0)) == 0)
allocateButton.setEnabled(true);
else
allocateButton.setEnabled(false);
differenceField.setText(format.format(totalDiff));
setAllocateButton();
}
/**************************************************************************

View File

@ -400,8 +400,14 @@ public class WWFActivity extends ADForm implements EventListener
WListItemRenderer renderer = new WListItemRenderer(Arrays.asList(columns));
ListHeader header = new ListHeader();
header.setWidth("30px");
header.setWidth("60px");
renderer.setListHeader(0, header);
header = new ListHeader();
header.setWidth(null);
renderer.setListHeader(1, header);
header = new ListHeader();
header.setWidth(null);
renderer.setListHeader(2, header);
renderer.addTableValueChangeListener(listbox);
model.setNoColumns(columns.length);
listbox.setModel(model);

View File

@ -42,7 +42,6 @@ import org.zkoss.zul.Vbox;
* CarlosRuiz - globalqss - Add unprocessed button to iDempiere
*/
public class DPActivities extends DashboardPanel implements EventListener<Event> {
/**
*
*/
@ -56,8 +55,6 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
private int noOfNotice, noOfRequest, noOfWorkflow, noOfUnprocessed;
private boolean isShowUnprocessed;
public DPActivities()
{
super();
@ -66,8 +63,6 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
private Box createActivitiesPanel()
{
isShowUnprocessed = (Env.getAD_Client_ID(Env.getCtx()) > 0);
Vbox vbox = new Vbox();
btnNotice = new Button();
@ -100,7 +95,7 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
btnWorkflow.setName(String.valueOf(AD_Menu_ID));
btnWorkflow.addEventListener(Events.ON_CLICK, this);
if (isShowUnprocessed) {
if (isShowUnprocessed()) {
btnUnprocessed = new Button();
vbox.appendChild(btnUnprocessed);
labelU = Util.cleanAmp(Msg.translate(Env.getCtx(), "UnprocessedDocs"));
@ -115,6 +110,10 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
return vbox;
}
private static boolean isShowUnprocessed() {
return (Env.getAD_Client_ID(Env.getCtx()) > 0);
}
/**
* Get notice count
* @return number of notice
@ -204,6 +203,9 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
*/
public static int getUnprocessedCount()
{
if (! isShowUnprocessed())
return 0;
String sql = "SELECT COUNT(1) FROM RV_Unprocessed "
+ "WHERE AD_Client_ID=? AND CreatedBy=?";
@ -217,7 +219,7 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
noOfNotice = getNoticeCount();
noOfRequest = getRequestCount();
noOfWorkflow = getWorkflowCount();
if (isShowUnprocessed) noOfUnprocessed = getUnprocessedCount();
noOfUnprocessed = getUnprocessedCount();
template.executeAsync(this);
}
@ -234,7 +236,7 @@ public class DPActivities extends DashboardPanel implements EventListener<Event>
btnNotice.setLabel(labelN + " : " + noOfNotice);
btnRequest.setLabel(labelR + " : " + noOfRequest);
btnWorkflow.setLabel(labelW + " : " + noOfWorkflow);
if (isShowUnprocessed) btnUnprocessed.setLabel(labelU + " : " + noOfUnprocessed);
if (isShowUnprocessed()) btnUnprocessed.setLabel(labelU + " : " + noOfUnprocessed);
}
public void onEvent(Event event)

View File

@ -79,6 +79,8 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
private int noOfWorkflow;
private int noOfUnprocessed;
private Tabpanel homeTab;
private DashboardController dashboardController, sideController;
@ -223,6 +225,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
noOfNotice = DPActivities.getNoticeCount();
noOfRequest = DPActivities.getRequestCount();
noOfWorkflow = DPActivities.getWorkflowCount();
noOfUnprocessed = DPActivities.getUnprocessedCount();
template.executeAsync(this);
}
@ -265,12 +268,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
}
public void updateUI() {
int total = noOfNotice + noOfRequest + noOfWorkflow;
int total = noOfNotice + noOfRequest + noOfWorkflow + noOfUnprocessed;
windowContainer.setTabTitle(0, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Home"))
+ " (" + total + ")",
Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
+ ", " + Util.cleanAmp(Msg.getMsg (Env.getCtx(), "WorkflowActivities")) + " : " + noOfWorkflow
+ (noOfUnprocessed>0 ? ", " + Msg.getMsg (Env.getCtx(), "UnprocessedDocs") + " : " + noOfUnprocessed : "")
);
}
private void autoHideMenu() {

View File

@ -79,6 +79,8 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
private int noOfWorkflow;
private int noOfUnprocessed;
private Tabpanel homeTab;
private DashboardController dashboardController, sideController;
@ -254,6 +256,7 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
noOfNotice = DPActivities.getNoticeCount();
noOfRequest = DPActivities.getRequestCount();
noOfWorkflow = DPActivities.getWorkflowCount();
noOfUnprocessed = DPActivities.getUnprocessedCount();
template.executeAsync(this);
}
@ -293,11 +296,13 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
}
public void updateUI() {
int total = noOfNotice + noOfRequest + noOfWorkflow;
int total = noOfNotice + noOfRequest + noOfWorkflow + noOfUnprocessed;
shortcutPanel.setLabel(1, "Activities (" + total + ")");
shortcutPanel.setTooltiptext(1, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow
+ (noOfUnprocessed>0 ? ", " + Msg.getMsg (Env.getCtx(), "UnprocessedDocs") + " : " + noOfUnprocessed : "")
);
}
private void autoHideMenu() {

View File

@ -89,6 +89,8 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
private int noOfWorkflow;
private int noOfUnprocessed;
private Tabpanel homeTab;
private DashboardController dashboardController;
@ -268,6 +270,7 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
noOfNotice = DPActivities.getNoticeCount();
noOfRequest = DPActivities.getRequestCount();
noOfWorkflow = DPActivities.getWorkflowCount();
noOfUnprocessed = DPActivities.getUnprocessedCount();
template.executeAsync(this);
}
@ -302,11 +305,13 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
}
public void updateUI() {
int total = noOfNotice + noOfRequest + noOfWorkflow;
int total = noOfNotice + noOfRequest + noOfWorkflow + noOfUnprocessed;
navigationPanel.setLabel(2, "Activities (" + total + ")");
navigationPanel.setTooltiptext(2, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow
+ (noOfUnprocessed>0 ? ", " + Msg.getMsg (Env.getCtx(), "UnprocessedDocs") + " : " + noOfUnprocessed : "")
);
}
private void autoHideMenu() {

View File

@ -474,6 +474,7 @@ public class RolePanel extends Window implements EventListener, Deferrable
MUser user = MUser.get (m_ctx, m_userName);
if (user != null) {
Env.setContext(m_ctx, "#AD_User_ID", user.getAD_User_ID() );
Env.setContext(m_ctx, "#AD_User_Name", user.getName() );
Env.setContext(m_ctx, "#SalesRep_ID", user.getAD_User_ID() );
}
}

View File

@ -49,6 +49,7 @@ public class Allocation
private boolean m_calculating = false;
public int m_C_Currency_ID = 0;
public int m_C_Charge_ID = 0;
public int m_C_BPartner_ID = 0;
private int m_noInvoices = 0;
private int m_noPayments = 0;
@ -523,8 +524,6 @@ public class Allocation
invoice.setValueAt(applied, row, i_applied);
invoice.setValueAt(writeOff, row, i_writeOff);
invoice.setValueAt(overUnder, row, i_overUnder);
invoice.repaint(); // update r/o
}
m_calculating = false;
@ -732,6 +731,22 @@ public class Allocation
unmatchedApplied = unmatchedApplied.subtract(payAmt);
}
// check for charge amount
if ( m_C_Charge_ID > 0 && unmatchedApplied.compareTo(Env.ZERO) != 0 )
{
BigDecimal chargeAmt = totalDiff;
// Allocation Line
MAllocationLine aLine = new MAllocationLine (alloc, chargeAmt.negate(),
Env.ZERO, Env.ZERO, Env.ZERO);
aLine.set_CustomColumn("C_Charge_ID", m_C_Charge_ID);
//aLine.set_CustomColumn("ChargeAmt", chargeAmt);
aLine.setC_BPartner_ID(m_C_BPartner_ID);
if (!aLine.save(trxName))
log.log(Level.SEVERE, "Allocation Line not saved - Charge=" + m_C_Charge_ID);
unmatchedApplied = unmatchedApplied.add(chargeAmt);
}
if ( unmatchedApplied.signum() != 0 )
log.log(Level.SEVERE, "Allocation not balanced -- out by " + unmatchedApplied );