IDEMPIERE-4569 Migration Script (#401)

* IDEMPIERE-4569 Migration Script

* Update 202011121122_IDEMPIERE-4569.sql

* Update 202011121122_IDEMPIERE-4569.sql

Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
Orlando Curieles 2020-11-22 06:54:35 -05:00 committed by GitHub
parent 09c5f0ca24
commit ca2570e90e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,13 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-4569 PostgreSQL Native error on Asset Material Receipt
-- Nov 31, 2020, 11:22:07 AM
UPDATE AD_Column SET ColumnSql = '(case when UseLifeMonths - (case when A_Current_Period = 0 then 1 else A_Current_Period end )+ 1> 0 then (A_Asset_Cost - A_Accumulated_Depr)/(UseLifeMonths - (case when A_Current_period = 0 then 1 else A_Current_Period end) + 1) else 0 end)' WHERE AD_Column_ID=59287
;
UPDATE AD_Column SET ColumnSql = '(case when UseLifeMonths_F - (case when A_Current_Period = 0 then 1 else A_Current_Period end )+ 1 > 0 then (A_Asset_Cost - A_Accumulated_Depr_F)/(UseLifeMonths_F - (case when A_Current_Period = 0 then 1 else A_Current_Period end ) + 1) else 0 end)' WHERE AD_Column_ID=59288
;
SELECT register_migration_script('202011121122_IDEMPIERE-4569.sql') FROM dual
;

View File

@ -0,0 +1,10 @@
-- IDEMPIERE-4569 PostgreSQL Native error on Asset Material Receipt
-- Nov 31, 2020, 11:22:07 AM
UPDATE AD_Column SET ColumnSql = '(case when UseLifeMonths - (case when A_Current_Period = 0 then 1 else A_Current_Period end )+ 1> 0 then (A_Asset_Cost - A_Accumulated_Depr)/(UseLifeMonths - (case when A_Current_period = 0 then 1 else A_Current_Period end) + 1) else 0 end)' WHERE AD_Column_ID = 59287
;
UPDATE AD_Column SET ColumnSql = '(case when UseLifeMonths_F - (case when A_Current_Period = 0 then 1 else A_Current_Period end )+ 1 > 0 then (A_Asset_Cost - A_Accumulated_Depr_F)/(UseLifeMonths_F - (case when A_Current_Period = 0 then 1 else A_Current_Period end ) + 1) else 0 end)' WHERE AD_Column_ID = 59288
;
SELECT register_migration_script('202011121122_IDEMPIERE-4569.sql') FROM dual
;