From 3b9a37e64be6f4841765770fc25d8827055658b0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 8 May 2007 03:40:49 +0000 Subject: [PATCH] - InOutGenerate.java - minor indentation enhancement - 002_add_feature_1714090.sql - change it to make new parameter optional - 003_make_feature_1714090_optional.sql - update for those who already ran the 002 --- .../org/compiere/process/InOutGenerate.java | 8 +-- .../320-trunk/002_add_feature_1714090.sql | 51 +++++++++++-------- .../003_make_feature_1714090_optional.sql | 8 +++ .../postgresql/002_add_feature_1714090.sql | 51 +++++++++++-------- .../003_make_feature_1714090_optional.sql | 8 +++ 5 files changed, 82 insertions(+), 44 deletions(-) create mode 100644 migration/320-trunk/003_make_feature_1714090_optional.sql create mode 100644 migration/320-trunk/postgresql/003_make_feature_1714090_optional.sql diff --git a/base/src/org/compiere/process/InOutGenerate.java b/base/src/org/compiere/process/InOutGenerate.java index f88862e21f..7807c35651 100644 --- a/base/src/org/compiere/process/InOutGenerate.java +++ b/base/src/org/compiere/process/InOutGenerate.java @@ -106,10 +106,10 @@ public class InOutGenerate extends SvrProcess // juddm - added ability to specify a shipment date from Generate Shipments if (p_DateShipped == null) { m_movementDate = Env.getContextAsDate(getCtx(), "#Date"); - if (m_movementDate == null) - m_movementDate = new Timestamp(System.currentTimeMillis()); - } else - m_movementDate = p_DateShipped; + if (m_movementDate == null) + m_movementDate = new Timestamp(System.currentTimeMillis()); + } else + m_movementDate = p_DateShipped; // DocAction check if (!DocAction.ACTION_Complete.equals(p_docAction)) p_docAction = DocAction.ACTION_Prepare; diff --git a/migration/320-trunk/002_add_feature_1714090.sql b/migration/320-trunk/002_add_feature_1714090.sql index 0400210caa..5b38da4e9e 100644 --- a/migration/320-trunk/002_add_feature_1714090.sql +++ b/migration/320-trunk/002_add_feature_1714090.sql @@ -1,20 +1,31 @@ --- Feature Request --- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process --- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335 - -INSERT INTO AD_PROCESS_PARA (ad_process_para_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, - name, description, help, ad_process_id, seqno, ad_reference_id, ad_reference_value_id, ad_val_rule_id, columnname, iscentrallymaintained, - fieldlength, ismandatory, isrange, defaultvalue, defaultvalue2, vformat, valuemin, valuemax, ad_element_id, entitytype ) - VALUES (50019, 0, 0, 'Y', TO_DATE('2007-03-03','YYYY-MM-DD'), 100, TO_DATE('2007-03-03','YYYY-MM-DD'), 100, - 'Shipment Date', 'Date printed on shipment', 'The Shipment Date indicates the date printed on the shipment.', 118, 15, 15,null,null, 'MovementDate', 'Y', - 0, 'Y', 'N', '@#Date@', '','','','', 1037, 'D'); - -COMMIT; - -UPDATE AD_SEQUENCE - SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1 - FROM AD_PROCESS_PARA - WHERE ad_process_para_id < 1000000) - WHERE NAME = 'AD_Process_Para'; - -COMMIT; \ No newline at end of file +-- Feature Request +-- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335 + +INSERT INTO AD_PROCESS_PARA + (ad_process_para_id, ad_client_id, ad_org_id, isactive, created, + createdby, updated, updatedby, NAME, + description, + HELP, + ad_process_id, seqno, ad_reference_id, ad_reference_value_id, + ad_val_rule_id, columnname, iscentrallymaintained, fieldlength, + ismandatory, isrange, ad_element_id, entitytype + ) + VALUES (50019, 0, 0, 'Y', TO_DATE ('2007-03-03', 'YYYY-MM-DD'), + 100, TO_DATE ('2007-03-03', 'YYYY-MM-DD'), 100, 'Shipment Date', + 'Date printed on shipment', + 'The Shipment Date indicates the date printed on the shipment.', + 118, 15, 15, NULL, + NULL, 'MovementDate', 'N', 0, + 'Y', 'N', 1037, 'D' + ); + +COMMIT ; + +UPDATE AD_SEQUENCE + SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1 + FROM AD_PROCESS_PARA + WHERE ad_process_para_id < 1000000) + WHERE NAME = 'AD_Process_Para'; + +COMMIT ; diff --git a/migration/320-trunk/003_make_feature_1714090_optional.sql b/migration/320-trunk/003_make_feature_1714090_optional.sql new file mode 100644 index 0000000000..009b9eb261 --- /dev/null +++ b/migration/320-trunk/003_make_feature_1714090_optional.sql @@ -0,0 +1,8 @@ +UPDATE AD_PROCESS_PARA + SET defaultvalue = NULL, + ismandatory = 'N', + updated = TO_DATE ('2007-05-07 20:55:59', 'YYYY-MM-DD HH24:MI:SS'), + updatedby = 100 + WHERE ad_process_para_id = 50019; + +COMMIT ; diff --git a/migration/320-trunk/postgresql/002_add_feature_1714090.sql b/migration/320-trunk/postgresql/002_add_feature_1714090.sql index 2c251f954d..aba71211f7 100644 --- a/migration/320-trunk/postgresql/002_add_feature_1714090.sql +++ b/migration/320-trunk/postgresql/002_add_feature_1714090.sql @@ -1,20 +1,31 @@ --- Feature Request --- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process --- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335 - -INSERT INTO AD_PROCESS_PARA (ad_process_para_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, - name, description, help, ad_process_id, seqno, ad_reference_id, ad_reference_value_id, ad_val_rule_id, columnname, iscentrallymaintained, - fieldlength, ismandatory, isrange, defaultvalue, defaultvalue2, vformat, valuemin, valuemax, ad_element_id, entitytype ) - VALUES (50019, 0, 0, 'Y', TO_TIMESTAMP('2007-03-03','YYYY-MM-DD'), 100, TO_TIMESTAMP('2007-03-03','YYYY-MM-DD'), 100, - 'Shipment Date', 'Date printed on shipment', 'The Shipment Date indicates the date printed on the shipment.', 118, 15, 15,null,null, 'MovementDate', 'Y', - 0, 'Y', 'N', '@#Date@', '','','','', 1037, 'D'); - -COMMIT; - -UPDATE AD_SEQUENCE - SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1 - FROM AD_PROCESS_PARA - WHERE ad_process_para_id < 1000000) - WHERE NAME = 'AD_Process_Para'; - -COMMIT; \ No newline at end of file +-- Feature Request +-- juddm - add the ability to specific a shipment date (instead of current date) to the shipment generation process +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1714090&group_id=176962&atid=879335 + +INSERT INTO AD_PROCESS_PARA + (ad_process_para_id, ad_client_id, ad_org_id, isactive, created, + createdby, updated, updatedby, + NAME, description, + HELP, + ad_process_id, seqno, ad_reference_id, ad_reference_value_id, + ad_val_rule_id, columnname, iscentrallymaintained, fieldlength, + ismandatory, isrange, ad_element_id, entitytype + ) + VALUES (50019, 0, 0, 'Y', TO_TIMESTAMP ('2007-03-03', 'YYYY-MM-DD'), + 100, TO_TIMESTAMP ('2007-03-03', 'YYYY-MM-DD'), 100, + 'Shipment Date', 'Date printed on shipment', + 'The Shipment Date indicates the date printed on the shipment.', + 118, 15, 15, NULL, + NULL, 'MovementDate', 'N', 0, + 'Y', 'N', 1037, 'D' + ); + +COMMIT ; + +UPDATE AD_SEQUENCE + SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1 + FROM AD_PROCESS_PARA + WHERE ad_process_para_id < 1000000) + WHERE NAME = 'AD_Process_Para'; + +COMMIT ; diff --git a/migration/320-trunk/postgresql/003_make_feature_1714090_optional.sql b/migration/320-trunk/postgresql/003_make_feature_1714090_optional.sql new file mode 100644 index 0000000000..b424a9a280 --- /dev/null +++ b/migration/320-trunk/postgresql/003_make_feature_1714090_optional.sql @@ -0,0 +1,8 @@ +UPDATE AD_PROCESS_PARA + SET defaultvalue = NULL, + ismandatory = 'N', + updated = TO_TIMESTAMP ('2007-05-07 20:55:59', 'YYYY-MM-DD HH24:MI:SS'), + updatedby = 100 + WHERE ad_process_para_id = 50019; + +COMMIT ;