IDEMPIERE-5445 Implement multiplier and rounding for financial reports (#1524)

* IDEMPIERE-5445 Implement multiplier and rounding for financial reports

* - Improve loop
This commit is contained in:
Carlos Ruiz 2022-10-16 11:29:12 +02:00 committed by GitHub
parent 93e42e43e4
commit d421dba94e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 664 additions and 47 deletions

View File

@ -0,0 +1,238 @@
-- IDEMPIERE-5445 Fin Report - Percentage lines - Rounding
SELECT register_migration_script('202210111720_IDEMPIERE-5445.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Oct 11, 2022, 5:20:53 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215623,0,'Multiplier','Type Multiplier (Credit = -1)',446,'Multiplier',14,'N','N','N','N','N',0,'N',22,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,1525,'N','N','D','N','N','N','Y','5aadeabd-11a2-4c72-816d-b29742744481','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:04 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215624,0,'Multiplier','Type Multiplier (Credit = -1)',448,'Multiplier',14,'N','N','N','N','N',0,'N',22,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:04','YYYY-MM-DD HH24:MI:SS'),100,1525,'N','N','D','N','N','N','Y','714062d2-e95a-41e1-af63-3b61c2a7c3c3','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:18 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215625,0,'Round Factor',446,'RoundFactor',14,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:17','YYYY-MM-DD HH24:MI:SS'),100,200145,'Y','N','D','N','N','N','Y','4afbd87d-edf2-4dea-932e-9b9fabd13fed','Y',0,'N','N','N')
;
-- Oct 11, 2022, 5:21:25 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215626,0,'Round Factor',448,'RoundFactor',14,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:24','YYYY-MM-DD HH24:MI:SS'),100,200145,'Y','N','D','N','N','N','Y','827ddc6d-2b3c-42b3-a921-2f3d13c34c35','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:32 PM CEST
ALTER TABLE PA_ReportColumn ADD RoundFactor NUMBER(10) DEFAULT NULL
;
-- Oct 11, 2022, 5:21:44 PM CEST
ALTER TABLE PA_ReportColumn ADD Multiplier NUMBER DEFAULT NULL
;
-- Oct 11, 2022, 5:21:52 PM CEST
ALTER TABLE PA_ReportLine ADD RoundFactor NUMBER(10) DEFAULT NULL
;
-- Oct 11, 2022, 5:21:59 PM CEST
ALTER TABLE PA_ReportLine ADD Multiplier NUMBER DEFAULT NULL
;
-- Oct 11, 2022, 5:22:43 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207399,'Multiplier','Type Multiplier (Credit = -1)',374,215623,'Y',14,470,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5b2a762b-7aa1-4c1e-be69-8bbaa80d44f9','Y',490,2)
;
-- Oct 11, 2022, 5:22:44 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207400,'Round Factor',374,215625,'Y',14,480,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','abf762bb-a4f7-4e44-b824-36de7ce06649','Y',500,2)
;
-- Oct 11, 2022, 5:23:53 PM CEST
UPDATE AD_Field SET IsDisplayed='N', IsActive='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2022-10-11 17:23:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56376
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=150,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206213
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=160,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4759
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=170,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4761
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=180,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4762
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=190,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201868
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4763
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4764
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=220,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56301
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=230,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56518
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=240,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56517
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=250,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4765
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=260,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56296
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=270,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4766
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=280,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56302
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=290,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4777
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=300,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56299
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=310,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4776
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=320,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56298
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=330,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4775
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=340,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56303
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=350,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4767
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=360,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56300
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=370,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4768
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=380,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56304
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=390,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4769
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=400,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56297
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=410,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56281
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=420,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56305
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=430,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56282
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=440,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56306
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=450,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56375
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=460, XPosition=5,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206181
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=480, XPosition=4,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207400
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204993
;
-- Oct 11, 2022, 5:24:51 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207401,'Multiplier','Type Multiplier (Credit = -1)',376,215624,'Y',14,220,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','149a6131-75df-4214-9707-d4c515c4d507','Y',235,2)
;
-- Oct 11, 2022, 5:24:52 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207402,'Round Factor',376,215626,'Y',14,230,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','54046543-2dda-423b-9dcf-8a695bf29936','Y',245,2)
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=180,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206182
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=190,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206214
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206215
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207401
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=220, XPosition=4,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207402
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204996
;
-- Oct 11, 2022, 5:58:30 PM CEST
UPDATE AD_Column SET DefaultValue='NULL', IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-10-11 17:58:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215623
;
-- Oct 11, 2022, 5:58:44 PM CEST
UPDATE AD_Column SET DefaultValue='NULL',Updated=TO_TIMESTAMP('2022-10-11 17:58:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215625
;
-- Oct 11, 2022, 5:59:19 PM CEST
UPDATE AD_Column SET DefaultValue='NULL', IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-10-11 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215624
;
-- Oct 11, 2022, 5:59:34 PM CEST
UPDATE AD_Column SET DefaultValue='NULL',Updated=TO_TIMESTAMP('2022-10-11 17:59:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215626
;
UPDATE pa_reportcolumn SET multiplier=0.001 WHERE factor='k';
UPDATE pa_reportcolumn SET multiplier=0.000001 WHERE factor='M';

View File

@ -0,0 +1,235 @@
-- IDEMPIERE-5445 Fin Report - Percentage lines - Rounding
SELECT register_migration_script('202210111720_IDEMPIERE-5445.sql') FROM dual;
-- Oct 11, 2022, 5:20:53 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215623,0,'Multiplier','Type Multiplier (Credit = -1)',446,'Multiplier',14,'N','N','N','N','N',0,'N',22,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,1525,'N','N','D','N','N','N','Y','5aadeabd-11a2-4c72-816d-b29742744481','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:04 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215624,0,'Multiplier','Type Multiplier (Credit = -1)',448,'Multiplier',14,'N','N','N','N','N',0,'N',22,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:04','YYYY-MM-DD HH24:MI:SS'),100,1525,'N','N','D','N','N','N','Y','714062d2-e95a-41e1-af63-3b61c2a7c3c3','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:18 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215625,0,'Round Factor',446,'RoundFactor',14,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:17','YYYY-MM-DD HH24:MI:SS'),100,200145,'Y','N','D','N','N','N','Y','4afbd87d-edf2-4dea-932e-9b9fabd13fed','Y',0,'N','N','N')
;
-- Oct 11, 2022, 5:21:25 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215626,0,'Round Factor',448,'RoundFactor',14,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2022-10-11 17:21:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:21:24','YYYY-MM-DD HH24:MI:SS'),100,200145,'Y','N','D','N','N','N','Y','827ddc6d-2b3c-42b3-a921-2f3d13c34c35','Y',0,'N','N','N','N')
;
-- Oct 11, 2022, 5:21:32 PM CEST
ALTER TABLE PA_ReportColumn ADD COLUMN RoundFactor NUMERIC(10) DEFAULT NULL
;
-- Oct 11, 2022, 5:21:44 PM CEST
ALTER TABLE PA_ReportColumn ADD COLUMN Multiplier NUMERIC DEFAULT NULL
;
-- Oct 11, 2022, 5:21:52 PM CEST
ALTER TABLE PA_ReportLine ADD COLUMN RoundFactor NUMERIC(10) DEFAULT NULL
;
-- Oct 11, 2022, 5:21:59 PM CEST
ALTER TABLE PA_ReportLine ADD COLUMN Multiplier NUMERIC DEFAULT NULL
;
-- Oct 11, 2022, 5:22:43 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207399,'Multiplier','Type Multiplier (Credit = -1)',374,215623,'Y',14,470,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5b2a762b-7aa1-4c1e-be69-8bbaa80d44f9','Y',490,2)
;
-- Oct 11, 2022, 5:22:44 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207400,'Round Factor',374,215625,'Y',14,480,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:22:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','abf762bb-a4f7-4e44-b824-36de7ce06649','Y',500,2)
;
-- Oct 11, 2022, 5:23:53 PM CEST
UPDATE AD_Field SET IsDisplayed='N', IsActive='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2022-10-11 17:23:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56376
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=150,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206213
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=160,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4759
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=170,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4761
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=180,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4762
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=190,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201868
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4763
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4764
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=220,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56301
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=230,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56518
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=240,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56517
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=250,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4765
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=260,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56296
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=270,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4766
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=280,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56302
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=290,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4777
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=300,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56299
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=310,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4776
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=320,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56298
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=330,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4775
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=340,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56303
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=350,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4767
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=360,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56300
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=370,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4768
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=380,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56304
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=390,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4769
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=400,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56297
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=410,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56281
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=420,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56305
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=430,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56282
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=440,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56306
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=450,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56375
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=460, XPosition=5,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206181
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=480, XPosition=4,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207400
;
-- Oct 11, 2022, 5:24:28 PM CEST
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2022-10-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204993
;
-- Oct 11, 2022, 5:24:51 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207401,'Multiplier','Type Multiplier (Credit = -1)',376,215624,'Y',14,220,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','149a6131-75df-4214-9707-d4c515c4d507','Y',235,2)
;
-- Oct 11, 2022, 5:24:52 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207402,'Round Factor',376,215626,'Y',14,230,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-10-11 17:24:51','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','54046543-2dda-423b-9dcf-8a695bf29936','Y',245,2)
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=180,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206182
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=190,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206214
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206215
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207401
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=220, XPosition=4,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207402
;
-- Oct 11, 2022, 5:25:08 PM CEST
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2022-10-11 17:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204996
;
-- Oct 11, 2022, 5:58:30 PM CEST
UPDATE AD_Column SET DefaultValue='NULL', IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-10-11 17:58:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215623
;
-- Oct 11, 2022, 5:58:44 PM CEST
UPDATE AD_Column SET DefaultValue='NULL',Updated=TO_TIMESTAMP('2022-10-11 17:58:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215625
;
-- Oct 11, 2022, 5:59:19 PM CEST
UPDATE AD_Column SET DefaultValue='NULL', IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-10-11 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215624
;
-- Oct 11, 2022, 5:59:34 PM CEST
UPDATE AD_Column SET DefaultValue='NULL',Updated=TO_TIMESTAMP('2022-10-11 17:59:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215626
;
UPDATE pa_reportcolumn SET multiplier=0.001 WHERE factor='k';
UPDATE pa_reportcolumn SET multiplier=0.000001 WHERE factor='M';

View File

@ -22,7 +22,7 @@ import org.compiere.util.KeyNamePair;
/** Generated Interface for PA_ReportColumn
* @author iDempiere (generated)
* @version Release 9
* @version Release 10
*/
public interface I_PA_ReportColumn
{
@ -44,8 +44,8 @@ public interface I_PA_ReportColumn
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
/** Get Tenant.
* Tenant for this installation.
*/
public int getAD_Client_ID();
@ -53,12 +53,12 @@ public interface I_PA_ReportColumn
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public int getAD_Org_ID();
@ -528,6 +528,19 @@ public interface I_PA_ReportColumn
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;
/** Column name Multiplier */
public static final String COLUMNNAME_Multiplier = "Multiplier";
/** Set Multiplier.
* Type Multiplier (Credit = -1)
*/
public void setMultiplier (BigDecimal Multiplier);
/** Get Multiplier.
* Type Multiplier (Credit = -1)
*/
public BigDecimal getMultiplier();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
@ -588,12 +601,12 @@ public interface I_PA_ReportColumn
public static final String COLUMNNAME_Org_ID = "Org_ID";
/** Set Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public void setOrg_ID (int Org_ID);
/** Get Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public int getOrg_ID();
@ -699,6 +712,15 @@ public interface I_PA_ReportColumn
*/
public BigDecimal getRelativePeriodTo();
/** Column name RoundFactor */
public static final String COLUMNNAME_RoundFactor = "RoundFactor";
/** Set Round Factor */
public void setRoundFactor (int RoundFactor);
/** Get Round Factor */
public int getRoundFactor();
/** Column name SeqNo */
public static final String COLUMNNAME_SeqNo = "SeqNo";

View File

@ -22,7 +22,7 @@ import org.compiere.util.KeyNamePair;
/** Generated Interface for PA_ReportLine
* @author iDempiere (generated)
* @version Release 9
* @version Release 10
*/
public interface I_PA_ReportLine
{
@ -44,8 +44,8 @@ public interface I_PA_ReportLine
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
/** Get Tenant.
* Tenant for this installation.
*/
public int getAD_Client_ID();
@ -53,12 +53,12 @@ public interface I_PA_ReportLine
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
* Organizational entity within tenant
*/
public int getAD_Org_ID();
@ -176,6 +176,19 @@ public interface I_PA_ReportLine
/** Get Line Type */
public String getLineType();
/** Column name Multiplier */
public static final String COLUMNNAME_Multiplier = "Multiplier";
/** Set Multiplier.
* Type Multiplier (Credit = -1)
*/
public void setMultiplier (BigDecimal Multiplier);
/** Get Multiplier.
* Type Multiplier (Credit = -1)
*/
public BigDecimal getMultiplier();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
@ -296,6 +309,15 @@ public interface I_PA_ReportLine
*/
public String getPostingType();
/** Column name RoundFactor */
public static final String COLUMNNAME_RoundFactor = "RoundFactor";
/** Set Round Factor */
public void setRoundFactor (int RoundFactor);
/** Get Round Factor */
public int getRoundFactor();
/** Column name SeqNo */
public static final String COLUMNNAME_SeqNo = "SeqNo";

View File

@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair;
/** Generated Model for PA_ReportColumn
* @author iDempiere (generated)
* @version Release 9 - $Id$ */
* @version Release 10 - $Id$ */
@org.adempiere.base.Model(table="PA_ReportColumn")
public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persistent
{
@ -33,7 +33,7 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
/**
*
*/
private static final long serialVersionUID = 20220116L;
private static final long serialVersionUID = 20221011L;
/** Standard Constructor */
public X_PA_ReportColumn (Properties ctx, int PA_ReportColumn_ID, String trxName)
@ -978,6 +978,25 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
return ii.intValue();
}
/** Set Multiplier.
@param Multiplier Type Multiplier (Credit = -1)
*/
public void setMultiplier (BigDecimal Multiplier)
{
set_ValueNoCheck (COLUMNNAME_Multiplier, Multiplier);
}
/** Get Multiplier.
@return Type Multiplier (Credit = -1)
*/
public BigDecimal getMultiplier()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Multiplier);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Name.
@param Name Alphanumeric identifier of the entity
*/
@ -1075,7 +1094,7 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
}
/** Set Organization.
@param Org_ID Organizational entity within client
@param Org_ID Organizational entity within tenant
*/
public void setOrg_ID (int Org_ID)
{
@ -1086,7 +1105,7 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
}
/** Get Organization.
@return Organizational entity within client
@return Organizational entity within tenant
*/
public int getOrg_ID()
{
@ -1286,6 +1305,24 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
return bd;
}
/** Set Round Factor.
@param RoundFactor Round Factor
*/
public void setRoundFactor (int RoundFactor)
{
set_Value (COLUMNNAME_RoundFactor, Integer.valueOf(RoundFactor));
}
/** Get Round Factor.
@return Round Factor */
public int getRoundFactor()
{
Integer ii = (Integer)get_Value(COLUMNNAME_RoundFactor);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sequence.
@param SeqNo Method of ordering records; lowest number comes first
*/

View File

@ -17,13 +17,15 @@
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for PA_ReportLine
* @author iDempiere (generated)
* @version Release 9 - $Id$ */
* @version Release 10 - $Id$ */
@org.adempiere.base.Model(table="PA_ReportLine")
public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent
{
@ -31,7 +33,7 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20220116L;
private static final long serialVersionUID = 20221011L;
/** Standard Constructor */
public X_PA_ReportLine (Properties ctx, int PA_ReportLine_ID, String trxName)
@ -262,6 +264,25 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent
return (String)get_Value(COLUMNNAME_LineType);
}
/** Set Multiplier.
@param Multiplier Type Multiplier (Credit = -1)
*/
public void setMultiplier (BigDecimal Multiplier)
{
set_ValueNoCheck (COLUMNNAME_Multiplier, Multiplier);
}
/** Get Multiplier.
@return Type Multiplier (Credit = -1)
*/
public BigDecimal getMultiplier()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Multiplier);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Name.
@param Name Alphanumeric identifier of the entity
*/
@ -522,6 +543,24 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent
return (String)get_Value(COLUMNNAME_PostingType);
}
/** Set Round Factor.
@param RoundFactor Round Factor
*/
public void setRoundFactor (int RoundFactor)
{
set_Value (COLUMNNAME_RoundFactor, Integer.valueOf(RoundFactor));
}
/** Get Round Factor.
@return Round Factor */
public int getRoundFactor()
{
Integer ii = (Integer)get_Value(COLUMNNAME_RoundFactor);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sequence.
@param SeqNo Method of ordering records; lowest number comes first
*/

View File

@ -1770,26 +1770,50 @@ public class FinReport extends SvrProcess
private void scaleResults() {
for (int column = 0; column < m_columns.length; column++)
{
String factor = m_columns[column].getFactor();
if ( factor != null )
{
int divisor = 1;
if ( factor.equals("k") )
divisor = 1000;
else if (factor.equals("M"))
divisor = 1000000;
else
break;
String sql = "UPDATE T_Report SET Col_" + column
+ "=Col_" + column + "/" + divisor
+ " WHERE AD_PInstance_ID=" + getAD_PInstance_ID();
int no = DB.executeUpdateEx(sql, get_TrxName());
for (int column = 0; column < m_columns.length; column++) {
BigDecimal multiplier = (BigDecimal) m_columns[column].get_Value(MReportColumn.COLUMNNAME_Multiplier);
if ( multiplier != null ) {
String sql = "UPDATE T_Report SET Col_" + column + "=Col_" + column + "*" + multiplier + " WHERE AD_PInstance_ID=?";
int no = DB.executeUpdateEx(sql, new Object[] {getAD_PInstance_ID()}, get_TrxName());
if (no > 0)
if (log.isLoggable(Level.FINE)) log.fine(m_columns[column].getName() + " - #" + no);
}
Integer roundFactor = (Integer) m_columns[column].get_Value(MReportColumn.COLUMNNAME_RoundFactor);
if ( roundFactor != null ) {
String sql = "UPDATE T_Report SET Col_" + column + "=ROUND(Col_" + column + "," + roundFactor + ")" + " WHERE AD_PInstance_ID=?";
int no = DB.executeUpdateEx(sql, new Object[] {getAD_PInstance_ID()}, get_TrxName());
if (no > 0)
if (log.isLoggable(Level.FINE)) log.fine(m_columns[column].getName() + " - #" + no);
}
}
for (int line = 0; line < m_lines.length; line++) {
BigDecimal multiplier = (BigDecimal) m_lines[line].get_Value(MReportColumn.COLUMNNAME_Multiplier);
if ( multiplier != null ) {
StringBuilder cols = new StringBuilder();
for (int column = 0; column < m_columns.length; column++) {
if (cols.length() > 0)
cols.append(",");
cols.append("Col_").append(column).append("=Col_").append(column).append("*").append(multiplier);
}
String sql = "UPDATE T_Report SET " + cols.toString() + " WHERE AD_PInstance_ID=? AND PA_ReportLine_ID=?";
int no = DB.executeUpdateEx(sql, new Object[] {getAD_PInstance_ID(), m_lines[line].getPA_ReportLine_ID()}, get_TrxName());
if (no > 0)
if (log.isLoggable(Level.FINE)) log.fine(m_lines[line].getName() + " - #" + no);
}
Integer roundFactor = (Integer) m_lines[line].get_Value(MReportColumn.COLUMNNAME_RoundFactor);
if ( roundFactor != null ) {
StringBuilder cols = new StringBuilder();
for (int column = 0; column < m_columns.length; column++) {
if (cols.length() > 0)
cols.append(",");
cols.append("Col_").append(column).append("=ROUND(Col_").append(column).append(",").append(roundFactor).append(")");
}
String sql = "UPDATE T_Report SET " + cols.toString() + " WHERE AD_PInstance_ID=? AND PA_ReportLine_ID=?";
int no = DB.executeUpdateEx(sql, new Object[] {getAD_PInstance_ID(), m_lines[line].getPA_ReportLine_ID()}, get_TrxName());
if (no > 0)
if (log.isLoggable(Level.FINE)) log.fine(m_lines[line].getName() + " - #" + no);
}
}
}