From bcbbc8e99f41f4369b3eeb9f408cde40e00b9627 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 30 Jul 2007 11:57:10 +0000 Subject: [PATCH] BF [ 1763523 ] Translate errors from Cash Line http://sourceforge.net/tracker/index.php?func=detail&aid=1763523&group_id=176962&atid=879332 --- base/src/org/compiere/model/MCashLine.java | 4 ++-- migration/330-trunk/003_BF_1763523.sql | 23 +++++++++++++++++++ .../330-trunk/postgresql/003_BF_1763523.sql | 23 +++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 migration/330-trunk/003_BF_1763523.sql create mode 100644 migration/330-trunk/postgresql/003_BF_1763523.sql diff --git a/base/src/org/compiere/model/MCashLine.java b/base/src/org/compiere/model/MCashLine.java index f4e530fb51..2e30dd38f9 100644 --- a/base/src/org/compiere/model/MCashLine.java +++ b/base/src/org/compiere/model/MCashLine.java @@ -257,7 +257,7 @@ public class MCashLine extends X_C_CashLine { if (get_ValueOld("C_Invoice_ID") != null) { - log.warning("Cannot delete line with generated Invoice"); + log.saveError("Error", Msg.getMsg(getCtx(), "CannotDeleteCashGenInvoice")); return false; } } @@ -290,7 +290,7 @@ public class MCashLine extends X_C_CashLine Object generated = get_ValueOld("IsGenerated"); if (generated != null && ((Boolean)generated).booleanValue()) { - log.warning("Cannot change line with generated Invoice"); + log.saveError("Error", Msg.getMsg(getCtx(), "CannotChangeCashGenInvoice")); return false; } } diff --git a/migration/330-trunk/003_BF_1763523.sql b/migration/330-trunk/003_BF_1763523.sql new file mode 100644 index 0000000000..9d8baabac7 --- /dev/null +++ b/migration/330-trunk/003_BF_1763523.sql @@ -0,0 +1,23 @@ +-- +-- BF [ 1763523 ] Translate errors from Cash Line +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1763523&group_id=176962&atid=879332 +-- +insert into AD_Message ( + AD_MESSAGE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY, + VALUE,MSGTEXT,MSGTIP,MSGTYPE,ENTITYTYPE) +values ( + 53003,0,0,'Y',to_date('30-07-2007','DD-MM-RRRR'),0,to_date('30-07-2007','DD-MM-RRRR'),0, + 'CannotDeleteCashGenInvoice','Cannot delete line with generated Invoice',null,'E','D' +); +-- +insert into AD_Message ( + AD_MESSAGE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY, + VALUE,MSGTEXT,MSGTIP,MSGTYPE,ENTITYTYPE) +values ( + 53004,0,0,'Y',to_date('30-07-2007','DD-MM-RRRR'),0,to_date('30-07-2007','DD-MM-RRRR'),0, + 'CannotChangeCashGenInvoice','Cannot change line with generated Invoice',null,'E','D' +); +-- +commit; +-- +-- NOTE: don't forget to run add missing translations and sequence check diff --git a/migration/330-trunk/postgresql/003_BF_1763523.sql b/migration/330-trunk/postgresql/003_BF_1763523.sql new file mode 100644 index 0000000000..9d8baabac7 --- /dev/null +++ b/migration/330-trunk/postgresql/003_BF_1763523.sql @@ -0,0 +1,23 @@ +-- +-- BF [ 1763523 ] Translate errors from Cash Line +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1763523&group_id=176962&atid=879332 +-- +insert into AD_Message ( + AD_MESSAGE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY, + VALUE,MSGTEXT,MSGTIP,MSGTYPE,ENTITYTYPE) +values ( + 53003,0,0,'Y',to_date('30-07-2007','DD-MM-RRRR'),0,to_date('30-07-2007','DD-MM-RRRR'),0, + 'CannotDeleteCashGenInvoice','Cannot delete line with generated Invoice',null,'E','D' +); +-- +insert into AD_Message ( + AD_MESSAGE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY, + VALUE,MSGTEXT,MSGTIP,MSGTYPE,ENTITYTYPE) +values ( + 53004,0,0,'Y',to_date('30-07-2007','DD-MM-RRRR'),0,to_date('30-07-2007','DD-MM-RRRR'),0, + 'CannotChangeCashGenInvoice','Cannot change line with generated Invoice',null,'E','D' +); +-- +commit; +-- +-- NOTE: don't forget to run add missing translations and sequence check