From 1153e4d159dffda58fd1c44afa87e1a5f7c4f0c8 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Mon, 5 Mar 2018 21:20:03 +0100 Subject: [PATCH] IDEMPIERE-3648 Bank statement : Error on BeginningBalance when creating a bank statement with empty BankAccount field --- migration/i5.1/oracle/201703051030_IDEMPIERE-3648.sql | 10 ++++++++++ .../i5.1/postgresql/201703051030_IDEMPIERE-3648.sql | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 migration/i5.1/oracle/201703051030_IDEMPIERE-3648.sql create mode 100644 migration/i5.1/postgresql/201703051030_IDEMPIERE-3648.sql diff --git a/migration/i5.1/oracle/201703051030_IDEMPIERE-3648.sql b/migration/i5.1/oracle/201703051030_IDEMPIERE-3648.sql new file mode 100644 index 0000000000..c8807dcef2 --- /dev/null +++ b/migration/i5.1/oracle/201703051030_IDEMPIERE-3648.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3648 Bank statement : Error on BeginningBalance when creating a bank statement with empty BankAccount field +-- Mar 5, 2018 10:21:44 AM CET +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MIN(CurrentBalance),0) FROM C_BankAccount WHERE C_BankAccount_ID=@C_BankAccount_ID:0@',Updated=TO_DATE('2018-03-05 10:21:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4919 +; + +SELECT register_migration_script('201703051030_IDEMPIERE-3648.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i5.1/postgresql/201703051030_IDEMPIERE-3648.sql b/migration/i5.1/postgresql/201703051030_IDEMPIERE-3648.sql new file mode 100644 index 0000000000..83cc81f0f5 --- /dev/null +++ b/migration/i5.1/postgresql/201703051030_IDEMPIERE-3648.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-3648 Bank statement : Error on BeginningBalance when creating a bank statement with empty BankAccount field +-- Mar 5, 2018 10:21:44 AM CET +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MIN(CurrentBalance),0) FROM C_BankAccount WHERE C_BankAccount_ID=@C_BankAccount_ID:0@',Updated=TO_TIMESTAMP('2018-03-05 10:21:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4919 +; + +SELECT register_migration_script('201703051030_IDEMPIERE-3648.sql') FROM dual +; \ No newline at end of file