core-jgi/migration/i7.1z/oracle/202004091706_IDEMPIERE-4207...

132 lines
19 KiB
SQL

SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-4207 Fill Testing Asset Data
-- Apr 9, 2020, 5:05:18 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200001,11,0,'Y',TO_DATE('2020-04-09 17:05:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:18','YYYY-MM-DD HH24:MI:SS'),100,101,501,'*-67230-_-_-_-_','Y','*-Equipment Depreciation-_-_-_-_','37f52556-a668-47b2-bba3-1d217ca3594b')
;
-- Apr 9, 2020, 5:05:19 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200002,11,0,'Y',TO_DATE('2020-04-09 17:05:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:19','YYYY-MM-DD HH24:MI:SS'),100,101,742,'*-14120-_-_-_-_','Y','*-Product asset-_-_-_-_','a03b859a-83c4-4baf-a003-b855786a77fc')
;
-- Apr 9, 2020, 5:05:20 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200003,11,11,'Y',TO_DATE('2020-04-09 17:05:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:19','YYYY-MM-DD HH24:MI:SS'),100,101,574,'HQ-18230-_-_-_-_','Y','HQ-Equipment Accumulated Depreciation-_-_-_-_','88cc7ebe-6198-4f36-9026-15158373c009')
;
-- Apr 9, 2020, 5:05:20 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200004,11,0,'Y',TO_DATE('2020-04-09 17:05:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:20','YYYY-MM-DD HH24:MI:SS'),100,101,574,'*-18230-_-_-_-_','Y','*-Equipment Accumulated Depreciation-_-_-_-_','71f91849-92c6-46bb-a13c-b4b57e6b4410')
;
-- Apr 9, 2020, 5:05:21 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200005,11,0,'Y',TO_DATE('2020-04-09 17:05:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:20','YYYY-MM-DD HH24:MI:SS'),100,101,714,'*-80800-_-_-_-_','Y','*-Fixed Asset Sale Gain-_-_-_-_','c53e98b8-cec9-4ae4-b512-e93c4e41975e')
;
-- Apr 9, 2020, 5:05:22 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200006,11,0,'Y',TO_DATE('2020-04-09 17:05:21','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:21','YYYY-MM-DD HH24:MI:SS'),100,101,726,'*-82800-_-_-_-_','Y','*-Fixed Asset Sale Loss-_-_-_-_','f0b1588b-6233-4d2c-b922-1eda7ca9460d')
;
-- Apr 9, 2020, 5:05:22 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200007,11,11,'Y',TO_DATE('2020-04-09 17:05:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:22','YYYY-MM-DD HH24:MI:SS'),100,101,646,'HQ-67140-_-_-_-_','Y','HQ-Building Improvement Depreciation-_-_-_-_','c73462d9-6912-4001-90b0-15bd1513b698')
;
-- Apr 9, 2020, 5:05:23 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200008,11,0,'Y',TO_DATE('2020-04-09 17:05:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:22','YYYY-MM-DD HH24:MI:SS'),100,101,558,'*-16400-_-_-_-_','Y','*-Building Improvements-_-_-_-_','0349e6d7-58a2-4b04-8233-1e9a33c4a5b2')
;
-- Apr 9, 2020, 5:05:23 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200009,11,11,'Y',TO_DATE('2020-04-09 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,101,726,'HQ-82800-_-_-_-_','Y','HQ-Fixed Asset Sale Loss-_-_-_-_','00b77739-8c05-407e-86e8-5436f97e1e17')
;
-- Apr 9, 2020, 5:05:24 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200010,11,0,'Y',TO_DATE('2020-04-09 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,101,556,'*-16200-_-_-_-_','Y','*-Building-_-_-_-_','ba28ef13-6534-4678-9e85-8714a056f388')
;
-- Apr 9, 2020, 5:05:25 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200011,11,11,'Y',TO_DATE('2020-04-09 17:05:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:24','YYYY-MM-DD HH24:MI:SS'),100,101,569,'HQ-18120-_-_-_-_','Y','HQ-Building Accumulated Depreciation-_-_-_-_','a5726887-5e5f-459d-8ad0-8bbeaa57016d')
;
-- Apr 9, 2020, 5:05:25 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200012,11,11,'Y',TO_DATE('2020-04-09 17:05:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:25','YYYY-MM-DD HH24:MI:SS'),100,101,558,'HQ-16400-_-_-_-_','Y','HQ-Building Improvements-_-_-_-_','100434cd-c481-43a4-8786-80d87cdabf25')
;
-- Apr 9, 2020, 5:05:26 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200013,11,0,'Y',TO_DATE('2020-04-09 17:05:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:25','YYYY-MM-DD HH24:MI:SS'),100,101,563,'*-17300-_-_-_-_','Y','*-Equipment-_-_-_-_','fbeda72b-3e16-476a-88d4-c73a1eef78b2')
;
-- Apr 9, 2020, 5:05:26 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200014,11,0,'Y',TO_DATE('2020-04-09 17:05:26','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:26','YYYY-MM-DD HH24:MI:SS'),100,101,564,'*-17400-_-_-_-_','Y','*-Vehicles-_-_-_-_','85ea543b-4546-404a-9d3b-d37c3ddd2264')
;
-- Apr 9, 2020, 5:05:27 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200015,11,0,'Y',TO_DATE('2020-04-09 17:05:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:27','YYYY-MM-DD HH24:MI:SS'),100,101,575,'*-18240-_-_-_-_','Y','*-Vehicles Accumulated Depreciation-_-_-_-_','f47d670a-2dbd-48a9-8b80-16198c0b5cee')
;
-- Apr 9, 2020, 5:05:28 PM CEST
INSERT INTO C_ValidCombination (C_ValidCombination_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Account_ID,Combination,IsFullyQualified,Description,C_ValidCombination_UU) VALUES (200016,11,0,'Y',TO_DATE('2020-04-09 17:05:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:27','YYYY-MM-DD HH24:MI:SS'),100,101,647,'*-67240-_-_-_-_','Y','*-Vehicles Depreciation-_-_-_-_','522349cd-9f28-4b32-aba3-99d747ad4263')
;
-- Apr 9, 2020, 5:05:29 PM CEST
INSERT INTO M_Product_Category (AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,M_Product_Category_ID,Value,IsDefault,PlannedMargin,A_Asset_Group_ID,IsSelfService,AD_PrintColor_ID,MMPolicy,M_Product_Category_UU) VALUES (11,0,'Y',TO_DATE('2020-04-09 17:05:28','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:28','YYYY-MM-DD HH24:MI:SS'),100,'Vehicles',200000,'ASSET-Vehicle','N',0,50006,'Y',100,'F','9efc6cd4-30d6-4291-8582-b79071fae470')
;
-- Apr 9, 2020, 5:05:29 PM CEST
INSERT INTO M_Product_Category_Acct (M_Product_Category_ID, C_AcctSchema_ID, AD_Client_ID,AD_Org_ID,IsActive, Created,CreatedBy,Updated,UpdatedBy ,P_Asset_Acct,P_AverageCostVariance_Acct,P_COGS_Acct,P_CostAdjustment_Acct,P_Expense_Acct,P_InventoryClearing_Acct,P_InvoicePriceVariance_Acct,P_LandedCostClearing_Acct,P_PurchasePriceVariance_Acct,P_RateVariance_Acct,P_Revenue_Acct,P_TradeDiscountGrant_Acct,P_TradeDiscountRec_Acct,M_Product_Category_Acct_UU) SELECT 200000, p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', getDate(),100,getDate(),100,p.P_Asset_Acct,p.P_AverageCostVariance_Acct,p.P_COGS_Acct,p.P_CostAdjustment_Acct,p.P_Expense_Acct,p.P_InventoryClearing_Acct,p.P_InvoicePriceVariance_Acct,p.P_LandedCostClearing_Acct,p.P_PurchasePriceVariance_Acct,p.P_RateVariance_Acct,p.P_Revenue_Acct,p.P_TradeDiscountGrant_Acct,p.P_TradeDiscountRec_Acct,'0e8382df-0af2-4699-ba04-b5de7a50dbcc' FROM C_AcctSchema_Default p WHERE p.AD_Client_ID=11 AND NOT EXISTS (SELECT * FROM M_Product_Category_Acct e WHERE e.C_AcctSchema_ID=p.C_AcctSchema_ID AND e.M_Product_Category_ID=200000)
;
-- Apr 9, 2020, 5:05:29 PM CEST
INSERT INTO M_Product_Category (AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,M_Product_Category_ID,Value,IsDefault,PlannedMargin,A_Asset_Group_ID,IsSelfService,AD_PrintColor_ID,MMPolicy,M_Product_Category_UU) VALUES (11,0,'Y',TO_DATE('2020-04-09 17:05:29','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:29','YYYY-MM-DD HH24:MI:SS'),100,'Computers',200001,'ASSET-Computers','N',0,50007,'Y',100,'F','658a8ad9-dad3-46f8-bc8f-0c59640188fa')
;
-- Apr 9, 2020, 5:05:29 PM CEST
INSERT INTO M_Product_Category_Acct (M_Product_Category_ID, C_AcctSchema_ID, AD_Client_ID,AD_Org_ID,IsActive, Created,CreatedBy,Updated,UpdatedBy ,P_Asset_Acct,P_AverageCostVariance_Acct,P_COGS_Acct,P_CostAdjustment_Acct,P_Expense_Acct,P_InventoryClearing_Acct,P_InvoicePriceVariance_Acct,P_LandedCostClearing_Acct,P_PurchasePriceVariance_Acct,P_RateVariance_Acct,P_Revenue_Acct,P_TradeDiscountGrant_Acct,P_TradeDiscountRec_Acct,M_Product_Category_Acct_UU) SELECT 200001, p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', getDate(),100,getDate(),100,p.P_Asset_Acct,p.P_AverageCostVariance_Acct,p.P_COGS_Acct,p.P_CostAdjustment_Acct,p.P_Expense_Acct,p.P_InventoryClearing_Acct,p.P_InvoicePriceVariance_Acct,p.P_LandedCostClearing_Acct,p.P_PurchasePriceVariance_Acct,p.P_RateVariance_Acct,p.P_Revenue_Acct,p.P_TradeDiscountGrant_Acct,p.P_TradeDiscountRec_Acct,'3ede7698-325b-4e57-ae85-9a55a01a2bef' FROM C_AcctSchema_Default p WHERE p.AD_Client_ID=11 AND NOT EXISTS (SELECT * FROM M_Product_Category_Acct e WHERE e.C_AcctSchema_ID=p.C_AcctSchema_ID AND e.M_Product_Category_ID=200001)
;
-- Apr 9, 2020, 5:05:30 PM CEST
INSERT INTO A_Asset_Group_Acct (A_Asset_Group_Acct_ID,AD_Client_ID,AD_Org_ID,A_Asset_Group_ID,A_Depreciation_Acct,A_Depreciation_ID,C_AcctSchema_ID,A_Split_Percent,UseLifeYears,UseLifeMonths,UpdatedBy,Updated,Processing,PostingType,IsActive,CreatedBy,Created,A_Accumdepreciation_Acct,A_Asset_Acct,A_Disposal_Loss_Acct,A_Disposal_Revenue_Acct,A_Depreciation_F_ID,UseLifeYears_F,UseLifeMonths_F,A_Asset_Group_Acct_UU) VALUES (200000,11,11,50000,200007,50003,101,1,0,0,100,TO_DATE('2020-04-09 17:05:29','YYYY-MM-DD HH24:MI:SS'),'N','A','Y',100,TO_DATE('2020-04-09 17:05:29','YYYY-MM-DD HH24:MI:SS'),200011,200010,200009,200005,50003,10,120,'9896f277-5b54-4b6c-911e-3eb5a3a26b23')
;
-- Apr 9, 2020, 5:05:31 PM CEST
INSERT INTO A_Asset_Group_Acct (A_Asset_Group_Acct_ID,AD_Client_ID,AD_Org_ID,A_Asset_Group_ID,A_Depreciation_Acct,A_Depreciation_ID,C_AcctSchema_ID,A_Split_Percent,UseLifeYears,UseLifeMonths,UpdatedBy,Updated,Processing,PostingType,IsActive,CreatedBy,Created,A_Accumdepreciation_Acct,A_Asset_Acct,A_Disposal_Loss_Acct,A_Disposal_Revenue_Acct,A_Depreciation_F_ID,UseLifeYears_F,UseLifeMonths_F,A_Asset_Group_Acct_UU) VALUES (200001,11,11,50006,200016,50003,101,1,0,0,100,TO_DATE('2020-04-09 17:05:30','YYYY-MM-DD HH24:MI:SS'),'N','A','Y',100,TO_DATE('2020-04-09 17:05:30','YYYY-MM-DD HH24:MI:SS'),200015,200014,200006,200005,50003,5,60,'24232cfe-f6cb-4421-b018-4ed2201d74df')
;
-- Apr 9, 2020, 5:05:31 PM CEST
INSERT INTO A_Asset_Group_Acct (A_Asset_Group_Acct_ID,AD_Client_ID,AD_Org_ID,A_Asset_Group_ID,A_Depreciation_Acct,A_Depreciation_ID,C_AcctSchema_ID,A_Split_Percent,UseLifeYears,UseLifeMonths,UpdatedBy,Updated,Processing,PostingType,IsActive,CreatedBy,Created,A_Accumdepreciation_Acct,A_Asset_Acct,A_Disposal_Loss_Acct,A_Disposal_Revenue_Acct,A_Depreciation_F_ID,UseLifeYears_F,UseLifeMonths_F,A_Asset_Group_Acct_UU) VALUES (200002,11,11,50007,200001,50003,101,1,0,0,100,TO_DATE('2020-04-09 17:05:31','YYYY-MM-DD HH24:MI:SS'),'N','A','Y',100,TO_DATE('2020-04-09 17:05:31','YYYY-MM-DD HH24:MI:SS'),200004,200013,200006,200005,50003,5,60,'722d0c9c-a09a-42cc-a3a2-978cd2a06cb1')
;
-- Apr 9, 2020, 5:05:32 PM CEST
INSERT INTO M_Product (M_Product_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsSummary,C_UOM_ID,IsStocked,IsPurchased,IsSold,Volume,Weight,Value,M_Product_Category_ID,C_TaxCategory_ID,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet,Discontinued,SalesRep_ID,IsBOM,IsInvoicePrintDetails,IsPickListPrintDetails,IsVerified,Processing,ProductType,GuaranteeDays,M_AttributeSetInstance_ID,GuaranteeDaysMin,IsWebStoreFeatured,IsSelfService,IsDropShip,IsExcludeAutoDelivery,UnitsPerPack,LowLevel,CopyFrom,M_Product_UU,IsKanban,IsManufactured,IsPhantom,IsOwnBox) VALUES (200001,11,0,'Y',TO_DATE('2020-04-09 17:05:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:31','YYYY-MM-DD HH24:MI:SS'),100,'Asset Vehicle','N',100,'N','Y','Y',0,0,'ASSET-Vehicle',200000,107,0,0,0,0,'N',100,'N','N','N','N','N','A',0,0,0,'N','Y','N','N',0,0,'N','fa1fe0de-9c64-4c9d-a17f-125f8a0e630a','N','N','N','N')
;
-- Apr 9, 2020, 5:05:32 PM CEST
INSERT INTO M_Product_Acct (M_Product_ID, C_AcctSchema_ID, AD_Client_ID,AD_Org_ID,IsActive, Created,CreatedBy,Updated,UpdatedBy ,P_Asset_Acct,P_AverageCostVariance_Acct,P_COGS_Acct,P_CostAdjustment_Acct,P_Expense_Acct,P_InventoryClearing_Acct,P_InvoicePriceVariance_Acct,P_LandedCostClearing_Acct,P_PurchasePriceVariance_Acct,P_RateVariance_Acct,P_Revenue_Acct,P_TradeDiscountGrant_Acct,P_TradeDiscountRec_Acct,M_Product_Acct_UU) SELECT 200001, p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', getDate(),100,getDate(),100,p.P_Asset_Acct,p.P_AverageCostVariance_Acct,p.P_COGS_Acct,p.P_CostAdjustment_Acct,p.P_Expense_Acct,p.P_InventoryClearing_Acct,p.P_InvoicePriceVariance_Acct,p.P_LandedCostClearing_Acct,p.P_PurchasePriceVariance_Acct,p.P_RateVariance_Acct,p.P_Revenue_Acct,p.P_TradeDiscountGrant_Acct,p.P_TradeDiscountRec_Acct,'4d520992-f4b1-43c8-a8b5-541f320aaf6a' FROM M_Product_Category_Acct p WHERE p.AD_Client_ID=11 AND p.M_Product_Category_ID=200000 AND NOT EXISTS (SELECT * FROM M_Product_Acct e WHERE e.C_AcctSchema_ID=p.C_AcctSchema_ID AND e.M_Product_ID=200001)
;
-- Apr 9, 2020, 5:05:32 PM CEST
INSERT INTO AD_TreeNodePR (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodePR_UU) SELECT t.AD_Client_ID, 0, 'Y', getDate(), 100, getDate(), 100,t.AD_Tree_ID, 200001, 0, 999, '45ade6e2-2a82-468d-917c-3734d1f34c82' FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='PR' AND NOT EXISTS (SELECT * FROM AD_TreeNodePR e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200001)
;
-- Apr 9, 2020, 5:05:32 PM CEST
INSERT INTO M_Cost (AD_Client_ID,AD_Org_ID,M_Product_ID,M_CostType_ID,C_AcctSchema_ID,M_CostElement_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,CurrentCostPrice,FutureCostPrice,M_AttributeSetInstance_ID,CumulatedAmt,CumulatedQty,CurrentQty,M_Cost_UU) VALUES (11,0,200001,100,101,100,'Y',TO_DATE('2020-04-09 17:05:32','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:32','YYYY-MM-DD HH24:MI:SS'),100,0.0,0.0,0,0.0,0.0,0.0,'41646475-dd06-498f-ad16-64e3f563d02b')
;
-- Apr 9, 2020, 5:05:34 PM CEST
INSERT INTO M_Product (M_Product_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsSummary,C_UOM_ID,IsStocked,IsPurchased,IsSold,Volume,Weight,Value,M_Product_Category_ID,C_TaxCategory_ID,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet,Discontinued,SalesRep_ID,IsBOM,IsInvoicePrintDetails,IsPickListPrintDetails,IsVerified,Processing,ProductType,GuaranteeDays,M_AttributeSetInstance_ID,GuaranteeDaysMin,IsWebStoreFeatured,IsSelfService,IsDropShip,IsExcludeAutoDelivery,UnitsPerPack,LowLevel,CopyFrom,M_Product_UU,IsKanban,IsManufactured,IsPhantom,IsOwnBox) VALUES (200002,11,0,'Y',TO_DATE('2020-04-09 17:05:32','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:32','YYYY-MM-DD HH24:MI:SS'),100,'Computers','N',100,'N','Y','Y',0,0,'ASSET-Computers',200001,107,0,0,0,0,'N',100,'N','N','N','N','N','A',0,0,0,'N','Y','N','N',0,0,'N','4429975c-6ac1-4e23-a50c-6a4258ba2c59','N','N','N','N')
;
-- Apr 9, 2020, 5:05:34 PM CEST
INSERT INTO M_Product_Acct (M_Product_ID, C_AcctSchema_ID, AD_Client_ID,AD_Org_ID,IsActive, Created,CreatedBy,Updated,UpdatedBy ,P_Asset_Acct,P_AverageCostVariance_Acct,P_COGS_Acct,P_CostAdjustment_Acct,P_Expense_Acct,P_InventoryClearing_Acct,P_InvoicePriceVariance_Acct,P_LandedCostClearing_Acct,P_PurchasePriceVariance_Acct,P_RateVariance_Acct,P_Revenue_Acct,P_TradeDiscountGrant_Acct,P_TradeDiscountRec_Acct,M_Product_Acct_UU) SELECT 200002, p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', getDate(),100,getDate(),100,p.P_Asset_Acct,p.P_AverageCostVariance_Acct,p.P_COGS_Acct,p.P_CostAdjustment_Acct,p.P_Expense_Acct,p.P_InventoryClearing_Acct,p.P_InvoicePriceVariance_Acct,p.P_LandedCostClearing_Acct,p.P_PurchasePriceVariance_Acct,p.P_RateVariance_Acct,p.P_Revenue_Acct,p.P_TradeDiscountGrant_Acct,p.P_TradeDiscountRec_Acct,'85fd8af1-0be8-4104-9027-4ab570c2a475' FROM M_Product_Category_Acct p WHERE p.AD_Client_ID=11 AND p.M_Product_Category_ID=200001 AND NOT EXISTS (SELECT * FROM M_Product_Acct e WHERE e.C_AcctSchema_ID=p.C_AcctSchema_ID AND e.M_Product_ID=200002)
;
-- Apr 9, 2020, 5:05:34 PM CEST
INSERT INTO AD_TreeNodePR (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodePR_UU) SELECT t.AD_Client_ID, 0, 'Y', getDate(), 100, getDate(), 100,t.AD_Tree_ID, 200002, 0, 999, 'b9476f9c-4363-45f1-b8b1-4d8753beb90e' FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='PR' AND NOT EXISTS (SELECT * FROM AD_TreeNodePR e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200002)
;
-- Apr 9, 2020, 5:05:34 PM CEST
INSERT INTO M_Cost (AD_Client_ID,AD_Org_ID,M_Product_ID,M_CostType_ID,C_AcctSchema_ID,M_CostElement_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,CurrentCostPrice,FutureCostPrice,M_AttributeSetInstance_ID,CumulatedAmt,CumulatedQty,CurrentQty,M_Cost_UU) VALUES (11,0,200002,100,101,100,'Y',TO_DATE('2020-04-09 17:05:34','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-04-09 17:05:34','YYYY-MM-DD HH24:MI:SS'),100,0.0,0.0,0,0.0,0.0,0.0,'b3792d32-f636-4174-a53a-e2076ebb49e6')
;
SELECT register_migration_script('202004091706_IDEMPIERE-4207.sql') FROM dual
;