IDEMPIERE-4490 Set default Contact/User in SO, Invoice, M_InOut (#289)

* IDEMPIERE-4490 Set default Contact/User in SO, Invoice, M_InOut

* Ran modelgenerator again with the new field = null

* IDEMPIERE 4490 - Update the migration scripts to 7.1 and set Bill_User_ID to null

* IDEMPIERE 4490 - Update the migration scripts to 7.1

* Change field name from Invoice Address to Invoice Contact / Ship Address to Ship Contact

* IDEMPIERE-4490 Add logic to CalloutOrder.bpartnerBill
This commit is contained in:
Diego Ruiz 2020-10-08 12:17:07 +02:00 committed by GitHub
parent e3dc0349ad
commit edf407614f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 694 additions and 11 deletions

View File

@ -0,0 +1,294 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-4490 Set default Contact/User in SO, Invoice, M_InOut
-- Oct 7, 2020, 12:56:32 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,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 (214323,0,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',114,'IsShipTo','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2020-10-07 12:56:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 12:56:31','YYYY-MM-DD HH24:MI:SS'),100,929,'N','N','D','N','N','N','Y','1ad8957b-5518-4c91-89e1-3364402c1908','Y',0,'N','N','N')
;
-- Oct 7, 2020, 12:56:47 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,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 (214324,0,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',114,'IsBillTo','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2020-10-07 12:56:46','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 12:56:46','YYYY-MM-DD HH24:MI:SS'),100,916,'N','N','D','N','N','N','Y','cefbc8a2-14fb-43e0-8d14-7ff5e505f36b','Y',0,'N','N','N')
;
-- Oct 7, 2020, 12:56:52 PM CEST
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2020-10-07 12:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214324
;
-- Oct 7, 2020, 12:57:19 PM CEST
UPDATE AD_Column SET IsMandatory='Y', IsUpdateable='Y',Updated=TO_DATE('2020-10-07 12:57:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214323
;
-- Oct 7, 2020, 12:57:28 PM CEST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2020-10-07 12:57:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214324
;
-- Oct 7, 2020, 12:57:56 PM CEST
ALTER TABLE AD_User ADD IsBillTo CHAR(1) DEFAULT 'N' CHECK (IsBillTo IN ('Y','N')) NOT NULL
;
-- Oct 7, 2020, 12:58:05 PM CEST
ALTER TABLE AD_User ADD IsShipTo CHAR(1) DEFAULT 'N' CHECK (IsShipTo IN ('Y','N')) NOT NULL
;
-- Oct 7, 2020, 1:02:50 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206515,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',118,214324,'Y',0,440,0,'N','N','N','N',0,0,'Y',TO_DATE('2020-10-07 13:02:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 13:02:50','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','760d9248-fae6-41a5-a422-1599e483a4c5','Y',420,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:03:13 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206516,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',118,214323,'Y',0,450,0,'N','N','N','N',0,0,'Y',TO_DATE('2020-10-07 13:03:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 13:03:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','28f0a50b-47e1-4504-a0a7-64ae64293299','Y',430,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:04:01 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4260
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=302
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6521
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6515
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12323
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6517
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6514
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6518
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11679
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12324
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52010
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5883
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5884
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4261
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10491
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205948
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6511
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200072
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6513
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11525
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202876
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202875
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6520
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8342
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6519
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Oct 7, 2020, 1:04:53 PM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:04:58 PM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:05:33 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:05:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:05:39 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:05:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:06:28 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206517,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',496,214323,'Y',0,240,0,'N','N','N','N',0,0,'Y',TO_DATE('2020-10-07 13:06:28','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 13:06:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','0e3bb576-8daf-4e3a-a163-ba665c08442c','Y',240,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:06:47 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206518,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',496,214324,'Y',0,250,0,'N','N','N','N',0,0,'Y',TO_DATE('2020-10-07 13:06:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-07 13:06:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c0301624-3d0d-4f04-840d-1c01d47212aa','Y',250,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:06:55 PM CEST
UPDATE AD_Field SET EntityType='D', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:06:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7023
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206518
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7020
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7028
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7022
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7024
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7021
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7025
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11681
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12321
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12320
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11526
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8255
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7027
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7026
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204608
;
-- Oct 7, 2020, 1:17:54 PM CEST
UPDATE AD_Field SET Name='Ship Contact', Description='Business Partner Shipment Contact', Help='If the Ship Contact is selected, the contact is used for notification.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:18:41 PM CEST
UPDATE AD_Field SET Name='Invoice Contact', Description='Business Partner Invoice/Bill Contact', Help='If the Invoice Contact is selected, the contact is used to send notifications about invoices to a customer or a vendor.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:18:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:17:54 PM CEST
UPDATE AD_Field SET Name='Ship Contact', Description='Business Partner Shipment Contact', Help='If the Ship Contact is selected, the contact is used for notification.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:18:41 PM CEST
UPDATE AD_Field SET Name='Invoice Contact', Description='Business Partner Invoice/Bill Contact', Help='If the Invoice Contact is selected, the contact is used to send notifications about invoices to a customer or a vendor.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-07 13:18:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206518
;
SELECT register_migration_script('202010071405_IDEMPIERE-4490.sql') FROM dual
;

View File

@ -0,0 +1,291 @@
-- IDEMPIERE-4490 Set default Contact/User in SO, Invoice, M_InOut
-- Oct 7, 2020, 12:56:32 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,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 (214323,0,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',114,'IsShipTo','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2020-10-07 12:56:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 12:56:31','YYYY-MM-DD HH24:MI:SS'),100,929,'N','N','D','N','N','N','Y','1ad8957b-5518-4c91-89e1-3364402c1908','Y',0,'N','N','N')
;
-- Oct 7, 2020, 12:56:47 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,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 (214324,0,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',114,'IsBillTo','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2020-10-07 12:56:46','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 12:56:46','YYYY-MM-DD HH24:MI:SS'),100,916,'N','N','D','N','N','N','Y','cefbc8a2-14fb-43e0-8d14-7ff5e505f36b','Y',0,'N','N','N')
;
-- Oct 7, 2020, 12:56:52 PM CEST
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2020-10-07 12:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214324
;
-- Oct 7, 2020, 12:57:19 PM CEST
UPDATE AD_Column SET IsMandatory='Y', IsUpdateable='Y',Updated=TO_TIMESTAMP('2020-10-07 12:57:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214323
;
-- Oct 7, 2020, 12:57:28 PM CEST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2020-10-07 12:57:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214324
;
-- Oct 7, 2020, 12:57:56 PM CEST
ALTER TABLE AD_User ADD COLUMN IsBillTo CHAR(1) DEFAULT 'N' CHECK (IsBillTo IN ('Y','N')) NOT NULL
;
-- Oct 7, 2020, 12:58:05 PM CEST
ALTER TABLE AD_User ADD COLUMN IsShipTo CHAR(1) DEFAULT 'N' CHECK (IsShipTo IN ('Y','N')) NOT NULL
;
-- Oct 7, 2020, 1:02:50 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206515,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',118,214324,'Y',0,440,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-10-07 13:02:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 13:02:50','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','760d9248-fae6-41a5-a422-1599e483a4c5','Y',420,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:03:13 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206516,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',118,214323,'Y',0,450,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-10-07 13:03:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 13:03:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','28f0a50b-47e1-4504-a0a7-64ae64293299','Y',430,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:04:01 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4260
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=302
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6521
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6515
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12323
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6517
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6514
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6518
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11679
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12324
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52010
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5883
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5884
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4261
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10491
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205948
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6511
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200072
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6513
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11525
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202876
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202875
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6520
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8342
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6519
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Oct 7, 2020, 1:04:02 PM CEST
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Oct 7, 2020, 1:04:53 PM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:04:58 PM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:05:33 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:05:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:05:39 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:05:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:06:28 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206517,'Ship Address','Business Partner Shipment Address','If the Ship Address is selected, the location is used to ship goods to a customer or receive goods from a vendor.',496,214323,'Y',0,240,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-10-07 13:06:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 13:06:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','0e3bb576-8daf-4e3a-a163-ba665c08442c','Y',240,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:06:47 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (206518,'Invoice Address','Business Partner Invoice/Bill Address','If the Invoice Address is selected, the location is used to send invoices to a customer or receive invoices from a vendor.',496,214324,'Y',0,250,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-10-07 13:06:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-07 13:06:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c0301624-3d0d-4f04-840d-1c01d47212aa','Y',250,1,1,1,'N','N','N')
;
-- Oct 7, 2020, 1:06:55 PM CEST
UPDATE AD_Field SET EntityType='D', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:06:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7023
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206518
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7020
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7028
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7022
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7024
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7021
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7025
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11681
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12321
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12320
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11526
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8255
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7027
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7026
;
-- Oct 7, 2020, 1:08:42 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204608
;
-- Oct 7, 2020, 1:17:54 PM CEST
UPDATE AD_Field SET Name='Ship Contact', Description='Business Partner Shipment Contact', Help='If the Ship Contact is selected, the contact is used for notification.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206516
;
-- Oct 7, 2020, 1:18:41 PM CEST
UPDATE AD_Field SET Name='Invoice Contact', Description='Business Partner Invoice/Bill Contact', Help='If the Invoice Contact is selected, the contact is used to send notifications about invoices to a customer or a vendor.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:18:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206515
;
-- Oct 7, 2020, 1:17:54 PM CEST
UPDATE AD_Field SET Name='Ship Contact', Description='Business Partner Shipment Contact', Help='If the Ship Contact is selected, the contact is used for notification.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206517
;
-- Oct 7, 2020, 1:18:41 PM CEST
UPDATE AD_Field SET Name='Invoice Contact', Description='Business Partner Invoice/Bill Contact', Help='If the Invoice Contact is selected, the contact is used to send notifications about invoices to a customer or a vendor.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-07 13:18:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206518
;
SELECT register_migration_script('202010071405_IDEMPIERE-4490.sql') FROM dual
;

View File

@ -272,6 +272,7 @@ public class CalloutInOut extends CalloutEngine
+ "p.SO_Description,p.IsDiscountPrinted,"
+ "p.SO_CreditLimit-p.SO_CreditUsed AS CreditAvailable,"
+ "(select max(l.C_BPartner_Location_ID) from C_BPartner_Location l where p.C_BPartner_ID=l.C_BPartner_ID AND l.IsActive='Y') as C_BPartner_Location_ID,"
+ "(select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y' AND IsShipTo='Y') as ShipTo_User_ID,"
+ "(select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') as AD_User_ID "
+ "FROM C_BPartner p "
+ "WHERE p.C_BPartner_ID=?"; // 1
@ -299,8 +300,11 @@ public class CalloutInOut extends CalloutEngine
ii = Integer.valueOf(rs.getInt("AD_User_ID"));
if (rs.wasNull())
mTab.setValue("AD_User_ID", null);
else
mTab.setValue("AD_User_ID", ii);
else {
int ShipTo_User_ID = rs.getInt("ShipTo_User_ID");
Integer userID = ShipTo_User_ID > 0 ? Integer.valueOf(ShipTo_User_ID) : ii;
mTab.setValue("AD_User_ID", userID);
}
}
//Bugs item #1679818: checking for SOTrx only

View File

@ -138,6 +138,7 @@ public class CalloutInvoice extends CalloutEngine
+ " p.SO_CreditLimit, p.SO_CreditLimit-p.SO_CreditUsed AS CreditAvailable,"
+ " (select max(lbill.C_BPartner_Location_ID) from C_BPartner_Location lbill where p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y') AS C_BPartner_Location_ID,"
+ " (select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') as AD_User_ID,"
+ " (select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y' AND IsBillTo='Y') as BillTo_User_ID,"
+ " COALESCE(p.PO_PriceList_ID,g.PO_PriceList_ID) AS PO_PriceList_ID, p.PaymentRulePO,p.PO_PaymentTerm_ID, p.SalesRep_ID "
+ "FROM C_BPartner p"
+ " INNER JOIN C_BP_Group g ON (p.C_BP_Group_ID=g.C_BP_Group_ID)"
@ -217,10 +218,14 @@ public class CalloutInvoice extends CalloutEngine
if (cont.length() > 0)
contID = Integer.parseInt(cont);
}
int BillTo_User_ID = rs.getInt("BillTo_User_ID");
if (contID == 0)
mTab.setValue("AD_User_ID", null);
else
mTab.setValue("AD_User_ID", Integer.valueOf(contID));
else {
Integer userID = BillTo_User_ID > 0 ? Integer.valueOf(BillTo_User_ID) : Integer.valueOf(contID);
mTab.setValue("AD_User_ID", userID);
}
// CreditAvailable
if (IsSOTrx)

View File

@ -253,6 +253,8 @@ public class CalloutOrder extends CalloutEngine
+ " p.SO_CreditLimit, p.SO_CreditLimit-p.SO_CreditUsed AS CreditAvailable,"
+ " (select max(lship.C_BPartner_Location_ID) from C_BPartner_Location lship where p.C_BPartner_ID=lship.C_BPartner_ID AND lship.IsShipTo='Y' AND lship.IsActive='Y') as C_BPartner_Location_ID,"
+ " (select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') as AD_User_ID,"
+ " (select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y' AND IsBillTo='Y') as BillTo_User_ID,"
+ " (select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y' AND IsShipTo='Y') as ShipTo_User_ID,"
+ " COALESCE(p.PO_PriceList_ID,g.PO_PriceList_ID) AS PO_PriceList_ID, p.PaymentRulePO,p.PO_PaymentTerm_ID,"
+ " (select max(lbill.C_BPartner_Location_ID) from C_BPartner_Location lbill where p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y') AS Bill_Location_ID, "
+ " p.SOCreditStatus, "
@ -344,12 +346,17 @@ public class CalloutOrder extends CalloutEngine
if (cont.length() > 0)
contID = Integer.parseInt(cont);
}
if (contID == 0)
int BillTo_User_ID = rs.getInt("BillTo_User_ID");
int ShipTo_User_ID = rs.getInt("ShipTo_User_ID");
if (contID == 0) {
mTab.setValue("AD_User_ID", null);
else
mTab.setValue("Bill_User_ID", null);
} else
{
mTab.setValue("AD_User_ID", Integer.valueOf(contID));
mTab.setValue("Bill_User_ID", Integer.valueOf(contID));
Integer userID = ShipTo_User_ID > 0 ? Integer.valueOf(ShipTo_User_ID) : Integer.valueOf(contID);
mTab.setValue("AD_User_ID", userID);
userID = BillTo_User_ID > 0 ? Integer.valueOf(BillTo_User_ID) : Integer.valueOf(contID);
mTab.setValue("Bill_User_ID", userID);
}
// CreditAvailable
@ -464,6 +471,7 @@ public class CalloutOrder extends CalloutEngine
+ "p.InvoiceRule,p.DeliveryRule,p.FreightCostRule,DeliveryViaRule,"
+ "p.SO_CreditLimit, p.SO_CreditLimit-p.SO_CreditUsed AS CreditAvailable,"
+ "(select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') as AD_User_ID,"
+ "(select max(c.AD_User_ID) from AD_User c where p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y' AND IsBillTo='Y') as BillTo_User_ID,"
+ "p.PO_PriceList_ID, p.PaymentRulePO, p.PO_PaymentTerm_ID,"
+ "(select max(lbill.C_BPartner_Location_ID) from C_BPartner_Location lbill where p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y') AS Bill_Location_ID "
+ "FROM C_BPartner p "
@ -522,6 +530,7 @@ public class CalloutOrder extends CalloutEngine
mTab.setValue("Bill_Location_ID", Integer.valueOf(bill_Location_ID));
// Contact - overwritten by InfoBP selection
int BillTo_User_ID = rs.getInt("BillTo_User_ID");
int contID = rs.getInt("AD_User_ID");
if (bill_BPartner_ID.toString().equals(Env.getContext(ctx, WindowNo, Env.TAB_INFO, "C_BPartner_ID")))
{
@ -531,8 +540,10 @@ public class CalloutOrder extends CalloutEngine
}
if (contID == 0)
mTab.setValue("Bill_User_ID", null);
else
mTab.setValue("Bill_User_ID", Integer.valueOf(contID));
else {
Integer userID = BillTo_User_ID > 0 ? Integer.valueOf(BillTo_User_ID) : Integer.valueOf(contID);
mTab.setValue("Bill_User_ID", userID);
}
// CreditAvailable
if (IsSOTrx)

View File

@ -428,6 +428,19 @@ public interface I_AD_User
*/
public boolean isAddMailTextAutomatically();
/** Column name IsBillTo */
public static final String COLUMNNAME_IsBillTo = "IsBillTo";
/** Set Invoice Address.
* Business Partner Invoice/Bill Address
*/
public void setIsBillTo (boolean IsBillTo);
/** Get Invoice Address.
* Business Partner Invoice/Bill Address
*/
public boolean isBillTo();
/** Column name IsExpired */
public static final String COLUMNNAME_IsExpired = "IsExpired";
@ -516,6 +529,19 @@ public interface I_AD_User
*/
public boolean isSalesLead();
/** Column name IsShipTo */
public static final String COLUMNNAME_IsShipTo = "IsShipTo";
/** Set Ship Address.
* Business Partner Shipment Address
*/
public void setIsShipTo (boolean IsShipTo);
/** Get Ship Address.
* Business Partner Shipment Address
*/
public boolean isShipTo();
/** Column name IsSupportUser */
public static final String COLUMNNAME_IsSupportUser = "IsSupportUser";

View File

@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20200413L;
private static final long serialVersionUID = 20201007L;
/** Standard Constructor */
public X_AD_User (Properties ctx, int AD_User_ID, String trxName)
@ -43,6 +43,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
setFailedLoginCount (0);
// 0
setIsAddMailTextAutomatically (false);
// N
setIsBillTo (false);
// N
setIsExpired (false);
// N
@ -57,6 +59,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
setIsNoPasswordReset (false);
// 'N'
setIsSalesLead (false);
// N
setIsShipTo (false);
// N
setIsSupportUser (false);
// N
@ -637,6 +641,30 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return false;
}
/** Set Invoice Address.
@param IsBillTo
Business Partner Invoice/Bill Address
*/
public void setIsBillTo (boolean IsBillTo)
{
set_Value (COLUMNNAME_IsBillTo, Boolean.valueOf(IsBillTo));
}
/** Get Invoice Address.
@return Business Partner Invoice/Bill Address
*/
public boolean isBillTo ()
{
Object oo = get_Value(COLUMNNAME_IsBillTo);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Expired.
@param IsExpired Expired */
public void setIsExpired (boolean IsExpired)
@ -817,6 +845,30 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return false;
}
/** Set Ship Address.
@param IsShipTo
Business Partner Shipment Address
*/
public void setIsShipTo (boolean IsShipTo)
{
set_Value (COLUMNNAME_IsShipTo, Boolean.valueOf(IsShipTo));
}
/** Get Ship Address.
@return Business Partner Shipment Address
*/
public boolean isShipTo ()
{
Object oo = get_Value(COLUMNNAME_IsShipTo);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Support User.
@param IsSupportUser Support User */
public void setIsSupportUser (boolean IsSupportUser)