Merge with 8d21f0c68a4c0a40002e6b280006a9186bd13828 (iDempiere Head)

This commit is contained in:
Heng Sin Low 2012-04-04 18:29:18 +08:00
commit 894ebe49ee
35 changed files with 626 additions and 120 deletions

View File

@ -4,7 +4,7 @@ CREATE OR REPLACE VIEW RV_M_REQUISITION
HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED,
PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS,
PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED,
M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT) M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID)
AS AS
SELECT r.M_Requisition_ID, SELECT r.M_Requisition_ID,
r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy,
@ -16,7 +16,7 @@ SELECT r.M_Requisition_ID,
(CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered,
l.M_Product_ID, l.M_Product_ID,
l.Description AS LineDescription, l.Description AS LineDescription,
l.PriceActual, l.LineNetAmt l.PriceActual, l.LineNetAmt, l.C_Charge_ID
FROM M_Requisition r FROM M_Requisition r
INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID);

View File

@ -4,7 +4,7 @@ CREATE OR REPLACE VIEW RV_M_REQUISITION
HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED,
PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS,
PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED,
M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT) M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID)
AS AS
SELECT r.M_Requisition_ID, SELECT r.M_Requisition_ID,
r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy,
@ -16,7 +16,7 @@ SELECT r.M_Requisition_ID,
(CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered,
l.M_Product_ID, l.M_Product_ID,
l.Description AS LineDescription, l.Description AS LineDescription,
l.PriceActual, l.LineNetAmt l.PriceActual, l.LineNetAmt, l.C_Charge_ID
FROM M_Requisition r FROM M_Requisition r
INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID);

View File

@ -0,0 +1,205 @@
-- required to fill UU columns for installations coming from transition version
UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001;
UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020;
UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021;
UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022;
UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023;
UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024;
UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025;
UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026;
UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027;
UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005;
UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028;
UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006;
UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029;
UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007;
UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030;
UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031;
UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008;
UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032;
UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009;
UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033;
UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010;
UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034;
UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011;
UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035;
UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012;
UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036;
UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013;
UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037;
UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014;
UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038;
UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039;
UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040;
UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002;
UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001;
UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041;
UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042;
UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043;
UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044;
UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045;
UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046;
UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047;
UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048;
UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049;
UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050;
UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051;
UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052;
UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053;
UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054;
UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055;
UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056;
UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057;
UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058;
UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059;
UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060;
UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061;
UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062;
UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063;
UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064;
UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065;
UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066;
UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067;
UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068;
UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069;
UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070;
UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071;
UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072;
UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073;
UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074;
UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000;
UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005;
UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006;
UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007;
UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008;
UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009;
UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010;
UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012;
UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011;
UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013;
UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014;
UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015;
UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016;
UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017;
UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018;
UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019;
UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020;
UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021;
UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023;
UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022;
UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024;
UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025;
UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026;
UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027;
UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028;
UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029;
UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030;
UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031;
UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032;
UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033;
UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034;
UPDATE AD_System
SET LastMigrationScriptApplied='824z_UpdateUU.sql'
WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,41 @@
CREATE OR REPLACE VIEW RV_M_REQUISITION
(M_REQUISITION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED,
CREATEDBY, UPDATED, UPDATEDBY, DOCUMENTNO, DESCRIPTION,
HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED,
PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS,
PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED,
M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID)
AS
SELECT r.M_Requisition_ID,
r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy,
r.DocumentNo, r.Description, r.Help,
r.AD_User_ID, r.M_PriceList_ID, r.M_Warehouse_ID, r.IsApproved, r.PriorityRule,
r.DateRequired, r.TotalLines, r.DocAction, r.DocStatus, r.Processed,
l.M_RequisitionLine_ID, l.Line,
l.Qty,
(CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered,
l.M_Product_ID,
l.Description AS LineDescription,
l.PriceActual, l.LineNetAmt, l.C_Charge_ID
FROM M_Requisition r
INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID);
-- Mar 22, 2012 9:47:24 AM COT
-- IDEMPIERE-204 Add charge to Open Requisitions report
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200082,711,'U',0,'N','N','N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N',968,'N','N','N','C_Charge_ID','Additional document charges','Charge',100,TO_DATE('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 22, 2012 9:47:24 AM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200082 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 22, 2012 9:47:47 AM COT
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-03-22 09:47:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200082
;
UPDATE AD_System
SET LastMigrationScriptApplied='828_IDEMPIERE-204.sql'
WHERE LastMigrationScriptApplied<'828_IDEMPIERE-204.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,10 @@
-- Apr 3, 2012 11:17:51 AM COT
-- IDEMPIERE-117 Add cost history table and cost movement view
INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
UPDATE AD_System
SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql'
WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,205 @@
-- required to fill UU columns for installations coming from transition version
UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001;
UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020;
UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021;
UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022;
UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023;
UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024;
UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025;
UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026;
UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027;
UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005;
UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028;
UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006;
UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029;
UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007;
UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030;
UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031;
UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008;
UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032;
UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009;
UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033;
UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010;
UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034;
UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011;
UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035;
UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012;
UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036;
UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013;
UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037;
UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014;
UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038;
UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039;
UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040;
UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002;
UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001;
UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041;
UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042;
UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043;
UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044;
UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045;
UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046;
UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047;
UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048;
UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049;
UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050;
UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051;
UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052;
UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053;
UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054;
UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055;
UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056;
UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057;
UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058;
UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059;
UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060;
UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061;
UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062;
UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063;
UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064;
UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065;
UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066;
UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067;
UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068;
UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069;
UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070;
UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071;
UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072;
UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073;
UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074;
UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000;
UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005;
UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006;
UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007;
UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008;
UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009;
UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010;
UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012;
UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011;
UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013;
UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014;
UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015;
UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016;
UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017;
UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018;
UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019;
UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020;
UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021;
UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023;
UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022;
UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024;
UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025;
UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026;
UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027;
UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028;
UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029;
UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030;
UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031;
UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032;
UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033;
UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034;
UPDATE AD_System
SET LastMigrationScriptApplied='824z_UpdateUU.sql'
WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,40 @@
CREATE OR REPLACE VIEW RV_M_REQUISITION
(M_REQUISITION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED,
CREATEDBY, UPDATED, UPDATEDBY, DOCUMENTNO, DESCRIPTION,
HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED,
PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS,
PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED,
M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID)
AS
SELECT r.M_Requisition_ID,
r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy,
r.DocumentNo, r.Description, r.Help,
r.AD_User_ID, r.M_PriceList_ID, r.M_Warehouse_ID, r.IsApproved, r.PriorityRule,
r.DateRequired, r.TotalLines, r.DocAction, r.DocStatus, r.Processed,
l.M_RequisitionLine_ID, l.Line,
l.Qty,
(CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered,
l.M_Product_ID,
l.Description AS LineDescription,
l.PriceActual, l.LineNetAmt, l.C_Charge_ID
FROM M_Requisition r
INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID);
-- Mar 22, 2012 9:47:24 AM COT
-- IDEMPIERE-204 Add charge to Open Requisitions report
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200082,711,'U',0,'N','N','N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N',968,'N','N','N','C_Charge_ID','Additional document charges','Charge',100,TO_TIMESTAMP('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 22, 2012 9:47:24 AM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200082 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 22, 2012 9:47:47 AM COT
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-03-22 09:47:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200082
;
UPDATE AD_System
SET LastMigrationScriptApplied='828_IDEMPIERE-204.sql'
WHERE LastMigrationScriptApplied<'828_IDEMPIERE-204.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,10 @@
-- Apr 3, 2012 11:17:51 AM COT
-- IDEMPIERE-117 Add cost history table and cost movement view
INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
UPDATE AD_System
SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql'
WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -142,7 +142,7 @@ public class BPartnerOrgLink extends SvrProcess
{ {
mLoc = new MLocator (wh, "Standard"); mLoc = new MLocator (wh, "Standard");
mLoc.setIsDefault(true); mLoc.setIsDefault(true);
mLoc.save(get_TrxName()); mLoc.saveEx(get_TrxName());
} }
// Update/Save Org Info // Update/Save Org Info
@ -176,7 +176,7 @@ public class BPartnerOrgLink extends SvrProcess
if (!found) if (!found)
{ {
MRoleOrgAccess orgAccess = new MRoleOrgAccess (org, p_AD_Role_ID); MRoleOrgAccess orgAccess = new MRoleOrgAccess (org, p_AD_Role_ID);
orgAccess.save(get_TrxName()); orgAccess.saveEx(get_TrxName());
} }
} }

View File

@ -20,6 +20,7 @@ import java.util.logging.Level;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
import org.compiere.model.MTable; import org.compiere.model.MTable;
import org.compiere.model.M_Element; import org.compiere.model.M_Element;
import org.compiere.model.PO;
import org.compiere.util.AdempiereSystemError; import org.compiere.util.AdempiereSystemError;
/** /**
@ -84,6 +85,9 @@ public class CopyColumnsFromTable extends SvrProcess
for (int i = 0; i < sourceColumns.length; i++) for (int i = 0; i < sourceColumns.length; i++)
{ {
MColumn colTarget = new MColumn(targetTable); MColumn colTarget = new MColumn(targetTable);
PO.copyValues(sourceColumns[i], colTarget);
colTarget.setAD_Table_ID (targetTable.getAD_Table_ID());
colTarget.setEntityType(targetTable.getEntityType());
// special case the key -> sourceTable_ID // special case the key -> sourceTable_ID
if (sourceColumns[i].getColumnName().equals(sourceTable.getTableName()+"_ID")) { if (sourceColumns[i].getColumnName().equals(sourceTable.getTableName()+"_ID")) {
String targetColumnName = new String(targetTable.getTableName()+"_ID"); String targetColumnName = new String(targetTable.getTableName()+"_ID");
@ -104,39 +108,9 @@ public class CopyColumnsFromTable extends SvrProcess
colTarget.setName(targetTable.getName()); colTarget.setName(targetTable.getName());
colTarget.setDescription(targetTable.getDescription()); colTarget.setDescription(targetTable.getDescription());
colTarget.setHelp(targetTable.getHelp()); colTarget.setHelp(targetTable.getHelp());
} else {
colTarget.setColumnName(sourceColumns[i].getColumnName());
colTarget.setAD_Element_ID(sourceColumns[i].getAD_Element_ID());
colTarget.setName(sourceColumns[i].getName());
colTarget.setDescription(sourceColumns[i].getDescription());
colTarget.setHelp(sourceColumns[i].getHelp());
} }
colTarget.setVersion(sourceColumns[i].getVersion());
colTarget.setAD_Val_Rule_ID(sourceColumns[i].getAD_Val_Rule_ID());
colTarget.setDefaultValue(sourceColumns[i].getDefaultValue());
colTarget.setFieldLength(sourceColumns[i].getFieldLength());
colTarget.setIsKey(sourceColumns[i].isKey());
colTarget.setIsParent(sourceColumns[i].isParent());
colTarget.setIsMandatory(sourceColumns[i].isMandatory());
colTarget.setIsTranslated(sourceColumns[i].isTranslated());
colTarget.setIsIdentifier(sourceColumns[i].isIdentifier());
colTarget.setSeqNo(sourceColumns[i].getSeqNo());
colTarget.setIsEncrypted(sourceColumns[i].getIsEncrypted());
colTarget.setAD_Reference_ID(sourceColumns[i].getAD_Reference_ID());
colTarget.setAD_Reference_Value_ID(sourceColumns[i].getAD_Reference_Value_ID());
colTarget.setIsActive(sourceColumns[i].isActive()); colTarget.setIsActive(sourceColumns[i].isActive());
colTarget.setVFormat(sourceColumns[i].getVFormat()); colTarget.saveEx(get_TrxName());
colTarget.setCallout(sourceColumns[i].getCallout());
colTarget.setIsUpdateable(sourceColumns[i].isUpdateable());
colTarget.setAD_Process_ID(sourceColumns[i].getAD_Process_ID());
colTarget.setValueMin(sourceColumns[i].getValueMin());
colTarget.setValueMax(sourceColumns[i].getValueMax());
colTarget.setIsSelectionColumn(sourceColumns[i].isSelectionColumn());
colTarget.setReadOnlyLogic(sourceColumns[i].getReadOnlyLogic());
colTarget.setIsSyncDatabase(sourceColumns[i].getIsSyncDatabase());
colTarget.setIsAlwaysUpdateable(sourceColumns[i].isAlwaysUpdateable());
colTarget.setColumnSQL(sourceColumns[i].getColumnSQL());
colTarget.save(get_TrxName());
// TODO: Copy translations // TODO: Copy translations
m_count++; m_count++;
} }

View File

@ -44,6 +44,7 @@ import org.compiere.util.DB;
import org.compiere.util.TimeUtil; import org.compiere.util.TimeUtil;
import org.eevolution.model.X_DD_Order; import org.eevolution.model.X_DD_Order;
import org.eevolution.model.X_HR_Process; import org.eevolution.model.X_HR_Process;
import org.eevolution.model.X_PP_Cost_Collector;
import org.eevolution.model.X_PP_Order; import org.eevolution.model.X_PP_Order;
/** /**
@ -243,6 +244,8 @@ public class FactAcctReset extends SvrProcess
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'"; docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'";
else if (AD_Table_ID == X_HR_Process.Table_ID) else if (AD_Table_ID == X_HR_Process.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_Payroll+ "'"; docBaseType = "= '" + MPeriodControl.DOCBASETYPE_Payroll+ "'";
else if (AD_Table_ID == X_PP_Cost_Collector.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingCostCollector+ "'";
// //
if (docBaseType == null) if (docBaseType == null)
{ {

View File

@ -85,7 +85,7 @@ public class M_Product_BOM_Check extends SvrProcess
log.info("NOT BOM Product"); log.info("NOT BOM Product");
// No BOM - should not happen, but no problem // No BOM - should not happen, but no problem
xp.setIsVerified(true); xp.setIsVerified(true);
xp.save(get_TrxName()); xp.saveEx(get_TrxName());
return "OK"; return "OK";
} }
@ -170,7 +170,7 @@ public class M_Product_BOM_Check extends SvrProcess
// Finish process // Finish process
xp.setIsVerified(true); xp.setIsVerified(true);
xp.save(get_TrxName()); xp.saveEx(get_TrxName());
return "OK"; return "OK";
} // doIt } // doIt

View File

@ -45,6 +45,9 @@ import org.compiere.util.Login;
import org.compiere.util.SecureEngine; import org.compiere.util.SecureEngine;
import org.compiere.util.SecureInterface; import org.compiere.util.SecureInterface;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
/** /**
* Adempiere Control Class * Adempiere Control Class
@ -139,9 +142,21 @@ public final class Adempiere
*/ */
public static String getVersion() public static String getVersion()
{ {
return MAIN_VERSION + " @ " + DATE_VERSION; IProduct product = Platform.getProduct();
if (product != null) {
Bundle bundle = product.getDefiningBundle();
if (bundle != null) {
return bundle.getVersion().toString();
}
}
return "Unknown";
} // getVersion } // getVersion
public static String getDatabaseVersion()
{
return DB.getSQLValueString(null, "select lastmigrationscriptapplied from ad_system");
}
/** /**
* Short Summary (Windows) * Short Summary (Windows)
* @return summary * @return summary
@ -183,8 +198,8 @@ public final class Adempiere
s_ImplementationVersion = adempierePackage.getImplementationVersion(); s_ImplementationVersion = adempierePackage.getImplementationVersion();
if (s_ImplementationVendor == null) if (s_ImplementationVendor == null)
{ {
s_ImplementationVendor = "Supported by ADempiere community"; s_ImplementationVendor = "Supported by iDempiere community";
s_ImplementationVersion = "ADempiere"; s_ImplementationVersion = "iDempiere";
} }
} // setPackageInfo } // setPackageInfo
@ -576,5 +591,4 @@ public final class Adempiere
public static URL getResource(String name) { public static URL getResource(String name) {
return Core.getResourceFinder().getResource(name); return Core.getResourceFinder().getResource(name);
} }
} // Adempiere } // Adempiere

View File

@ -14,11 +14,10 @@
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/ *****************************************************************************/
package org.adempiere.model; package org.compiere.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.Timestamp; import java.sql.Timestamp;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair; import org.compiere.util.KeyNamePair;
/** Generated Interface for M_CostHistory /** Generated Interface for M_CostHistory

View File

@ -111,7 +111,7 @@ public class MAdvertisement extends X_W_Advertisement
if (m_clickCount != null) if (m_clickCount != null)
{ {
m_clickCount.setTargetURL(TargetURL); m_clickCount.setTargetURL(TargetURL);
m_clickCount.save(get_TrxName()); m_clickCount.saveEx(get_TrxName());
} }
} // getClickTargetURL } // getClickTargetURL

View File

@ -387,7 +387,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
{ {
MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), get_TrxName()); MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), get_TrxName());
payment.setIsReconciled(true); payment.setIsReconciled(true);
payment.save(get_TrxName()); payment.saveEx(get_TrxName());
} }
} }
// Update Bank Account // Update Bank Account
@ -395,7 +395,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
ba.load(get_TrxName()); ba.load(get_TrxName());
//BF 1933645 //BF 1933645
ba.setCurrentBalance(ba.getCurrentBalance().add(getStatementDifference())); ba.setCurrentBalance(ba.getCurrentBalance().add(getStatementDifference()));
ba.save(get_TrxName()); ba.saveEx(get_TrxName());
// User Validation // User Validation
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);

View File

@ -287,7 +287,7 @@ public class MCStage extends X_CM_CStage
thisElement.setCM_CStage_ID(this.get_ID()); thisElement.setCM_CStage_ID(this.get_ID());
thisElement.setContentHTML(" "); thisElement.setContentHTML(" ");
thisElement.setName(elementName); thisElement.setName(elementName);
thisElement.save(get_TrxName()); thisElement.saveEx(get_TrxName());
} }
} }

View File

@ -23,7 +23,7 @@ import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.model.X_M_CostHistory; import org.compiere.model.X_M_CostHistory;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.Env; import org.compiere.util.Env;

View File

@ -106,7 +106,7 @@ public class MExpenseType extends X_S_ExpenseType
MProduct prod = getProduct(); MProduct prod = getProduct();
if (prod.setExpenseType(this)) if (prod.setExpenseType(this))
prod.save(get_TrxName()); prod.saveEx(get_TrxName());
return success; return success;
} // afterSave } // afterSave

View File

@ -743,7 +743,7 @@ public class MInOut extends X_M_InOut implements DocAction
if (counter) if (counter)
{ {
fromLine.setRef_InOutLine_ID(line.getM_InOutLine_ID()); fromLine.setRef_InOutLine_ID(line.getM_InOutLine_ID());
fromLine.save(get_TrxName()); fromLine.saveEx(get_TrxName());
} }
} }
if (fromLines.length != count) { if (fromLines.length != count) {
@ -1544,7 +1544,7 @@ public class MInOut extends X_M_InOut implements DocAction
&& sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ]
{ {
oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID());
oLine.save(get_TrxName()); oLine.saveEx(get_TrxName());
} }
} }
else // No Order - Try finding links via Invoice else // No Order - Try finding links via Invoice
@ -1573,7 +1573,7 @@ public class MInOut extends X_M_InOut implements DocAction
&& sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ]
{ {
oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID());
oLine.save(get_TrxName()); oLine.saveEx(get_TrxName());
} }
} }
} // No Order } // No Order
@ -1667,7 +1667,7 @@ public class MInOut extends X_M_InOut implements DocAction
// References (Should not be required // References (Should not be required
dropShipment.setSalesRep_ID(getSalesRep_ID()); dropShipment.setSalesRep_ID(getSalesRep_ID());
dropShipment.save(get_TrxName()); dropShipment.saveEx(get_TrxName());
// Update line order references to linked sales order lines // Update line order references to linked sales order lines
MInOutLine[] lines = dropShipment.getLines(true); MInOutLine[] lines = dropShipment.getLines(true);
@ -1877,7 +1877,7 @@ public class MInOut extends X_M_InOut implements DocAction
// Refernces (Should not be required // Refernces (Should not be required
counter.setSalesRep_ID(getSalesRep_ID()); counter.setSalesRep_ID(getSalesRep_ID());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
String MovementType = counter.getMovementType(); String MovementType = counter.getMovementType();
boolean inTrx = MovementType.charAt(1) == '+'; // V+ Vendor Receipt boolean inTrx = MovementType.charAt(1) == '+'; // V+ Vendor Receipt
@ -1892,7 +1892,7 @@ public class MInOut extends X_M_InOut implements DocAction
counterLine.setM_Locator_ID(0); counterLine.setM_Locator_ID(0);
counterLine.setM_Locator_ID(inTrx ? Env.ZERO : counterLine.getMovementQty()); counterLine.setM_Locator_ID(inTrx ? Env.ZERO : counterLine.getMovementQty());
// //
counterLine.save(get_TrxName()); counterLine.saveEx(get_TrxName());
} }
log.fine(counter.toString()); log.fine(counter.toString());
@ -1904,7 +1904,7 @@ public class MInOut extends X_M_InOut implements DocAction
{ {
counter.setDocAction(counterDT.getDocAction()); counter.setDocAction(counterDT.getDocAction());
counter.processIt(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
} }
} }
return counter; return counter;
@ -1947,7 +1947,7 @@ public class MInOut extends X_M_InOut implements DocAction
{ {
line.setQty(Env.ZERO); line.setQty(Env.ZERO);
line.addDescription("Void (" + old + ")"); line.addDescription("Void (" + old + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
// //

View File

@ -689,7 +689,7 @@ public class MInventory extends X_M_Inventory implements DocAction
line.setQtyInternalUse(Env.ZERO); line.setQtyInternalUse(Env.ZERO);
line.setQtyCount(line.getQtyBook()); line.setQtyCount(line.getQtyBook());
line.addDescription("Void (" + oldCount + "/" + oldInternal + ")"); line.addDescription("Void (" + oldCount + "/" + oldInternal + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
} }

View File

@ -761,7 +761,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
if (counter) if (counter)
{ {
fromLine.setRef_InvoiceLine_ID(line.getC_InvoiceLine_ID()); fromLine.setRef_InvoiceLine_ID(line.getC_InvoiceLine_ID());
fromLine.save(get_TrxName()); fromLine.saveEx(get_TrxName());
} }
// MZ Goodwill // MZ Goodwill
@ -2004,7 +2004,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
counter.setBPartner(counterBP); counter.setBPartner(counterBP);
// Refernces (Should not be required // Refernces (Should not be required
counter.setSalesRep_ID(getSalesRep_ID()); counter.setSalesRep_ID(getSalesRep_ID());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
// Update copied lines // Update copied lines
MInvoiceLine[] counterLines = counter.getLines(true); MInvoiceLine[] counterLines = counter.getLines(true);
@ -2016,7 +2016,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
counterLine.setPrice(); counterLine.setPrice();
counterLine.setTax(); counterLine.setTax();
// //
counterLine.save(get_TrxName()); counterLine.saveEx(get_TrxName());
} }
log.fine(counter.toString()); log.fine(counter.toString());
@ -2028,7 +2028,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
{ {
counter.setDocAction(counterDT.getDocAction()); counter.setDocAction(counterDT.getDocAction());
counter.processIt(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
} }
} }
return counter; return counter;
@ -2080,10 +2080,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
{ {
MInOutLine ioLine = new MInOutLine(getCtx(), line.getM_InOutLine_ID(), get_TrxName()); MInOutLine ioLine = new MInOutLine(getCtx(), line.getM_InOutLine_ID(), get_TrxName());
ioLine.setIsInvoiced(false); ioLine.setIsInvoiced(false);
ioLine.save(get_TrxName()); ioLine.saveEx(get_TrxName());
line.setM_InOutLine_ID(0); line.setM_InOutLine_ID(0);
} }
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
addDescription(Msg.getMsg(getCtx(), "Voided")); addDescription(Msg.getMsg(getCtx(), "Voided"));
@ -2147,7 +2147,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
{ {
allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct); allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);
allocations[i].reverseCorrectIt(); allocations[i].reverseCorrectIt();
allocations[i].save(get_TrxName()); allocations[i].saveEx(get_TrxName());
} }
// Reverse/Delete Matching // Reverse/Delete Matching
if (!isSOTrx()) if (!isSOTrx())
@ -2163,7 +2163,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
else else
{ {
mPO[i].setC_InvoiceLine_ID(null); mPO[i].setC_InvoiceLine_ID(null);
mPO[i].save(get_TrxName()); mPO[i].saveEx(get_TrxName());
} }
} }
} }
@ -2232,10 +2232,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
{ {
MInOutLine ioLine = new MInOutLine(getCtx(), iLine.getM_InOutLine_ID(), get_TrxName()); MInOutLine ioLine = new MInOutLine(getCtx(), iLine.getM_InOutLine_ID(), get_TrxName());
ioLine.setIsInvoiced(false); ioLine.setIsInvoiced(false);
ioLine.save(get_TrxName()); ioLine.saveEx(get_TrxName());
// Reconsiliation // Reconsiliation
iLine.setM_InOutLine_ID(0); iLine.setM_InOutLine_ID(0);
iLine.save(get_TrxName()); iLine.saveEx(get_TrxName());
} }
} }
setProcessed(true); setProcessed(true);

View File

@ -388,7 +388,7 @@ public class MMeasure extends X_PA_Measure
{ {
MGoal goal = goals[i]; MGoal goal = goals[i];
goal.setMeasureActual(getManualActual()); goal.setMeasureActual(getManualActual());
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateManualGoals } // updateManualGoals
@ -431,7 +431,7 @@ public class MMeasure extends X_PA_Measure
} }
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateAchievementGoals } // updateAchievementGoals
@ -478,7 +478,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateCalculatedGoals } // updateCalculatedGoals
@ -532,7 +532,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateRequests } // updateRequests
@ -575,7 +575,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateProjects } // updateProjects
@ -659,7 +659,7 @@ public class MMeasure extends X_PA_Measure
} }
} }
goal.setMeasureActual(amt); goal.setMeasureActual(amt);
goal.save(get_TrxName()); goal.saveEx(get_TrxName());
} }
return true; return true;
} // updateUserDefinedGoals } // updateUserDefinedGoals

View File

@ -634,7 +634,7 @@ public class MMovement extends X_M_Movement implements DocAction
{ {
line.setMovementQty(Env.ZERO); line.setMovementQty(Env.ZERO);
line.addDescription("Void (" + old + ")"); line.addDescription("Void (" + old + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
} }

View File

@ -394,14 +394,14 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
if (confirm.isFullyConfirmed()) if (confirm.isFullyConfirmed())
{ {
confirm.setProcessed(true); confirm.setProcessed(true);
confirm.save(get_TrxName()); confirm.saveEx(get_TrxName());
} }
else else
{ {
if (createDifferenceDoc (move, confirm)) if (createDifferenceDoc (move, confirm))
{ {
confirm.setProcessed(true); confirm.setProcessed(true);
confirm.save(get_TrxName()); confirm.saveEx(get_TrxName());
} }
else else
{ {

View File

@ -553,7 +553,7 @@ public class MOrder extends X_C_Order implements DocAction
if (counter) if (counter)
{ {
fromLines[i].setRef_OrderLine_ID(line.getC_OrderLine_ID()); fromLines[i].setRef_OrderLine_ID(line.getC_OrderLine_ID());
fromLines[i].save(get_TrxName()); fromLines[i].saveEx(get_TrxName());
} }
} }
if (fromLines.length != count) if (fromLines.length != count)
@ -704,7 +704,7 @@ public class MOrder extends X_C_Order implements DocAction
{ {
MOrderLine line = lines[i]; MOrderLine line = lines[i];
line.setLine(number); line.setLine(number);
line.save(get_TrxName()); line.saveEx(get_TrxName());
number += step; number += step;
} }
m_lines = null; m_lines = null;
@ -892,7 +892,7 @@ public class MOrder extends X_C_Order implements DocAction
if (schedule[i].isValid() != valid) if (schedule[i].isValid() != valid)
{ {
schedule[i].setIsValid(valid); schedule[i].setIsValid(valid);
schedule[i].save(get_TrxName()); schedule[i].saveEx(get_TrxName());
} }
} }
return valid; return valid;
@ -2061,7 +2061,7 @@ public class MOrder extends X_C_Order implements DocAction
counter.setDatePromised(getDatePromised()); // default is date ordered counter.setDatePromised(getDatePromised()); // default is date ordered
// Refernces (Should not be required // Refernces (Should not be required
counter.setSalesRep_ID(getSalesRep_ID()); counter.setSalesRep_ID(getSalesRep_ID());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
// Update copied lines // Update copied lines
MOrderLine[] counterLines = counter.getLines(true, null); MOrderLine[] counterLines = counter.getLines(true, null);
@ -2071,7 +2071,7 @@ public class MOrder extends X_C_Order implements DocAction
counterLine.setOrder(counter); // copies header values (BP, etc.) counterLine.setOrder(counter); // copies header values (BP, etc.)
counterLine.setPrice(); counterLine.setPrice();
counterLine.setTax(); counterLine.setTax();
counterLine.save(get_TrxName()); counterLine.saveEx(get_TrxName());
} }
log.fine(counter.toString()); log.fine(counter.toString());
@ -2082,7 +2082,7 @@ public class MOrder extends X_C_Order implements DocAction
{ {
counter.setDocAction(counterDT.getDocAction()); counter.setDocAction(counterDT.getDocAction());
counter.processIt(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction());
counter.save(get_TrxName()); counter.saveEx(get_TrxName());
} }
} }
return counter; return counter;
@ -2111,7 +2111,7 @@ public class MOrder extends X_C_Order implements DocAction
line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")");
line.setQty(Env.ZERO); line.setQty(Env.ZERO);
line.setLineNetAmt(Env.ZERO); line.setLineNetAmt(Env.ZERO);
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
//AZ Goodwill //AZ Goodwill
if (!isSOTrx()) if (!isSOTrx())
@ -2199,7 +2199,7 @@ public class MOrder extends X_C_Order implements DocAction
return false; return false;
} }
ship.setDocAction(MInOut.DOCACTION_None); ship.setDocAction(MInOut.DOCACTION_None);
ship.save(get_TrxName()); ship.saveEx(get_TrxName());
} // for all shipments } // for all shipments
// Reverse All *Invoices* // Reverse All *Invoices*
@ -2232,7 +2232,7 @@ public class MOrder extends X_C_Order implements DocAction
return false; return false;
} }
invoice.setDocAction(MInvoice.DOCACTION_None); invoice.setDocAction(MInvoice.DOCACTION_None);
invoice.save(get_TrxName()); invoice.saveEx(get_TrxName());
} // for all shipments } // for all shipments
m_processMsg = info.toString(); m_processMsg = info.toString();
@ -2265,7 +2265,7 @@ public class MOrder extends X_C_Order implements DocAction
line.setQtyOrdered(line.getQtyDelivered()); line.setQtyOrdered(line.getQtyDelivered());
// QtyEntered unchanged // QtyEntered unchanged
line.addDescription("Close (" + old + ")"); line.addDescription("Close (" + old + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
// Clear Reservations // Clear Reservations

View File

@ -2379,7 +2379,7 @@ public final class MPayment extends X_C_Payment
reversal.closeIt(); reversal.closeIt();
reversal.setDocStatus(DOCSTATUS_Reversed); reversal.setDocStatus(DOCSTATUS_Reversed);
reversal.setDocAction(DOCACTION_None); reversal.setDocAction(DOCACTION_None);
reversal.save(get_TrxName()); reversal.saveEx(get_TrxName());
// Unlink & De-Allocate // Unlink & De-Allocate
deAllocate(); deAllocate();
@ -2418,7 +2418,7 @@ public final class MPayment extends X_C_Payment
log.warning("Automatic allocation - reversal line not saved"); log.warning("Automatic allocation - reversal line not saved");
} }
alloc.processIt(DocAction.ACTION_Complete); alloc.processIt(DocAction.ACTION_Complete);
alloc.save(get_TrxName()); alloc.saveEx(get_TrxName());
// //
StringBuffer info = new StringBuffer (reversal.getDocumentNo()); StringBuffer info = new StringBuffer (reversal.getDocumentNo());
info.append(" - @C_AllocationHdr_ID@: ").append(alloc.getDocumentNo()); info.append(" - @C_AllocationHdr_ID@: ").append(alloc.getDocumentNo());
@ -2428,7 +2428,7 @@ public final class MPayment extends X_C_Payment
{ {
MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
bp.setTotalOpenBalance(); bp.setTotalOpenBalance();
bp.save(get_TrxName()); bp.saveEx(get_TrxName());
} }
// After reverseCorrect // After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);

View File

@ -166,7 +166,7 @@ public class MProductBOM extends X_M_Product_BOM
if (product.isVerified()) if (product.isVerified())
{ {
product.setIsVerified(false); product.setIsVerified(false);
product.save(get_TrxName()); product.saveEx(get_TrxName());
} }
// Invalidate Products where BOM is used // Invalidate Products where BOM is used

View File

@ -240,6 +240,11 @@ public class MRecentItem extends X_AD_RecentItem
String windowName = win.get_Translation("Name"); String windowName = win.get_Translation("Name");
MTable table = MTable.get(getCtx(), getAD_Table_ID()); MTable table = MTable.get(getCtx(), getAD_Table_ID());
PO po = table.getPO(getRecord_ID(), null); PO po = table.getPO(getRecord_ID(), null);
if (po == null) {
/* Recent Item was deleted (probably with direct SQL DELETE) */
this.deleteEx(true, null);
return null;
}
String recordIdentifier = ""; String recordIdentifier = "";
if (po.get_ColumnIndex("DocumentNo") > 0) if (po.get_ColumnIndex("DocumentNo") > 0)
recordIdentifier = recordIdentifier + "_" + po.get_ValueAsString("DocumentNo"); recordIdentifier = recordIdentifier + "_" + po.get_ValueAsString("DocumentNo");

View File

@ -126,7 +126,7 @@ public class MRecurring extends X_C_Recurring
} }
else else
return "Invalid @RecurringType@ = " + getRecurringType(); return "Invalid @RecurringType@ = " + getRecurringType();
run.save(get_TrxName()); run.saveEx(get_TrxName());
// //
setDateLastRun (run.getUpdated()); setDateLastRun (run.getUpdated());

View File

@ -15,12 +15,11 @@
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/ *****************************************************************************/
/** Generated Model - DO NOT CHANGE */ /** Generated Model - DO NOT CHANGE */
package org.adempiere.model; package org.compiere.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import org.compiere.model.*;
import org.compiere.util.Env; import org.compiere.util.Env;
/** Generated Model for M_CostHistory /** Generated Model for M_CostHistory
@ -32,7 +31,7 @@ public class X_M_CostHistory extends PO implements I_M_CostHistory, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20120308L; private static final long serialVersionUID = 20120402L;
/** Standard Constructor */ /** Standard Constructor */
public X_M_CostHistory (Properties ctx, int M_CostHistory_ID, String trxName) public X_M_CostHistory (Properties ctx, int M_CostHistory_ID, String trxName)

View File

@ -341,11 +341,22 @@ public class FinStatement extends SvrProcess
log.finest(sb.toString()); log.finest(sb.toString());
// Set Name,Description // Set Name,Description
String sql_select = "SELECT e.Name, fa.Description " String sql_select;
Language lang = Language.getLoginLanguage();
if (Env.isBaseLanguage(lang, "AD_Element")) {
sql_select = "SELECT e.Name, fa.Description "
+ "FROM Fact_Acct fa" + "FROM Fact_Acct fa"
+ " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)" + " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)"
+ " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) " + " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) "
+ "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID"; + "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID";
} else {
sql_select = "SELECT et.Name, fa.Description "
+ "FROM Fact_Acct fa"
+ " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)"
+ " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) "
+ " INNER JOIN AD_Element_Trl et ON (e.AD_Element_ID=et.AD_Element_ID AND et.AD_Language='"+lang.getAD_Language()+"') "
+ "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID";
}
// Translated Version ... // Translated Version ...
sb = new StringBuffer ("UPDATE T_ReportStatement r SET (Name,Description)=(") sb = new StringBuffer ("UPDATE T_ReportStatement r SET (Name,Description)=(")
.append(sql_select).append(") " .append(sql_select).append(") "

View File

@ -486,7 +486,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
{ {
MDDOrderLine line = lines[i]; MDDOrderLine line = lines[i];
line.setLine(number); line.setLine(number);
line.save(get_TrxName()); line.saveEx(get_TrxName());
number += step; number += step;
} }
m_lines = null; m_lines = null;
@ -1008,7 +1008,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
if (old.signum() != 0) if (old.signum() != 0)
{ {
line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
addDescription(Msg.getMsg(getCtx(), "Voided")); addDescription(Msg.getMsg(getCtx(), "Voided"));
@ -1133,7 +1133,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
line.setQtyOrdered(line.getQtyDelivered()); line.setQtyOrdered(line.getQtyDelivered());
// QtyEntered unchanged // QtyEntered unchanged
line.addDescription("Close (" + old + ")"); line.addDescription("Close (" + old + ")");
line.save(get_TrxName()); line.saveEx(get_TrxName());
} }
} }
// Clear Reservations // Clear Reservations

View File

@ -170,6 +170,8 @@ public class DPRecentItems extends DashboardPanel implements EventListener {
int riShown = 0; int riShown = 0;
for (MRecentItem ri : ris) { for (MRecentItem ri : ris) {
String label = ri.getLabel(); String label = ri.getLabel();
if (label == null)
continue;
ToolBarButton btnrecentItem = new ToolBarButton(String.valueOf(ri.getAD_RecentItem_ID())); ToolBarButton btnrecentItem = new ToolBarButton(String.valueOf(ri.getAD_RecentItem_ID()));
btnrecentItem.setLabel(label); btnrecentItem.setLabel(label);
btnrecentItem.setImage(getIconFile()); btnrecentItem.setImage(getIconFile());

View File

@ -6,11 +6,9 @@ Copyright (C) 2009 Idalica Corporation
<zk> <zk>
<zscript> <zscript>
import org.compiere.Adempiere; import org.compiere.Adempiere;
var mainVersion = Adempiere.MAIN_VERSION; var mainVersion = Adempiere.getVersion();
var dateVersion = Adempiere.DATE_VERSION; var dbVersion = Adempiere.getDatabaseVersion();
var dbVersion = Adempiere.DB_VERSION;
var vendor = Adempiere.getImplementationVendor(); var vendor = Adempiere.getImplementationVendor();
var vendorVersion = Adempiere.getImplementationVersion();
var jvm = Adempiere.getJavaInfo(); var jvm = Adempiere.getJavaInfo();
var os = Adempiere.getOSInfo(); var os = Adempiere.getOSInfo();
</zscript> </zscript>
@ -30,15 +28,10 @@ Copyright (C) 2009 Idalica Corporation
<div class="versionInfoBox"> <div class="versionInfoBox">
<table border="0"> <table border="0">
<tr> <tr>
<td align="right">Main Version</td> <td align="right">Version</td>
<td>:</td> <td>:</td>
<td aligh="left">${mainVersion}</td> <td aligh="left">${mainVersion}</td>
</tr> </tr>
<tr>
<td align="right">Date Version</td>
<td>:</td>
<td aligh="left">${dateVersion}</td>
</tr>
<tr> <tr>
<td align="right">Database Version</td> <td align="right">Database Version</td>
<td>:</td> <td>:</td>
@ -49,11 +42,6 @@ Copyright (C) 2009 Idalica Corporation
<td>:</td> <td>:</td>
<td aligh="left">${vendor}</td> <td aligh="left">${vendor}</td>
</tr> </tr>
<tr>
<td align="right">Vendor Version</td>
<td>:</td>
<td aligh="left">${vendorVersion}</td>
</tr>
<tr> <tr>
<td align="right">JVM</td> <td align="right">JVM</td>
<td>:</td> <td>:</td>