Handling DateAcct on CostDetail null after Migrate 7.1 to 13

40 views
Skip to first unread message

Avian Driyanto

unread,
Sep 29, 2026, 12:13:21 AM (9 days ago) Sep 29
to iDempiere
Dear all,

I forgot to ask this, in version 7.1 table M_CostDetail does not have field DateAcct. Then in version v12 and v13 it added. 

The Problem is, after upgrade the version. Old CostDetail data for field DateAcct is NULL. 
In Isssue IDEMPIERE-6203 , just wanna make sure. There is no script to update DateAcct in M_CostDetail right?

When tryring to Back Date, it got error because DateAcct is NULL. Any Solution, other than update the DateAcct from header Document?

Regards,
Avian

Elaine Tan

unread,
Sep 29, 2026, 12:50:01 AM (9 days ago) Sep 29
to iDempiere
Dear Avian,

In the 202408051548_IDEMPIERE-6203.sql migration script, we set DateAcct to the Created date.

UPDATE M_CostDetail SET DateAcct=TRUNC(Created) WHERE DateAcct IS NULL;
UPDATE M_CostHistory SET DateAcct=TRUNC(Created) WHERE DateAcct IS NULL;

Thanks,
Elaine

Avian Driyanto

unread,
Sep 29, 2026, 2:43:33 AM (9 days ago) Sep 29
to iDempiere
Dear Elaine,

Screenshot 2026-09-29 115916.png

I have check it in AD_MigrationScript, it got executed. But there is still data DateAcct on CostDetail is NULL. The Field is added, buat that script not udpate the field. 
As far i remember, it got not error.

So, if i Run that 2 Line Query now. It's not gonna be a problem right?


Regads,
Avian Driyanto
Reply all
Reply to author
Forward
0 new messages