Legal number on AP Invoice

Legal number is generating based on the invoice date at this moment but we want to generate the legal number based on the Apply Date. Is this possible to change ?

I do not find any option to change the legal number to generate based on the invoice apply date.

Use Company Configuration to indicate whether legal numbers are required on all AP invoices and debit memos and whether legal numbers should be based on Invoice Date or Apply Date.

awesome @hkeric.wci