AL icon indicating copy to clipboard operation
AL copied to clipboard

More than 5 decimal places for a currency - Bitcoin

Open OnPointian opened this issue 5 years ago • 4 comments

Good morning everyone,

we've come across a first large issue with the newest version of BC - 15.2. Large number of our current customers are using Bitcoin as one of the currencies they operate in.

Hence I need to create a record in the Currency table and I need to set this currency to operate with 8 decimal places. First the "General Ledger Setup"."Amount Decimal Places" and "General Ledger Setup"."Amount Rounding Precision" must be amended to accept this many decimal places. That can simply be done in code. I've successfully changed it to 2:8.

Then the same has to be applied to the Currency itself and this is where we are stuck:

image

Problem is with a field Currency."Amount Decimal Places". In the standard code, it has a property DecimalPlaces set to 2:5:

image

And I am not able to change that property using an extension:

image

This is a serious issue for us and it might actually force us to go for version 14, just so we can amend the standard object, or possibly lose the customer. I don't understand why Microsoft has decided to restrict this field in such a way. And I presume all companies that use Bitcoin as one of their currency will consider Business Central not to be a good fit for them.

Does anyone have experience with this / idea how this can be changed? Or how else I could achieve this?

Thank you

OnPointian avatar Feb 20 '20 09:02 OnPointian

Hello, Just and idea: would not it be possible to change the currency to mBC (milli bitcoin) or µBC (micro bitcoin) ?

nicolassaleron avatar Feb 21 '20 14:02 nicolassaleron

Hi @nicolassaleron,

thanks for the reply, however that's not acceptable for the customer. Good idea though.

OnPointian avatar Feb 24 '20 08:02 OnPointian

Microsoft didn't decide to limit this; somebody just wasn't thinking.

Anyway as a workaround you can disable (Visible = false) the existing field on the page and add a new one limited in the way you want. IIRC the DecimalPlaces property on the table is only ever used as a default for the pages.

BTW: If you do decide to go "OnPrem" for this customer I suggest you do NOT use V14, but instead use V15/16. Rebuilding the BaseApp is a pain because the Vscode AL extension is bad at big projects, however, it's less pain than you'll get when you're force to upgrade to AL anyway.

rdebath avatar Mar 04 '20 09:03 rdebath

At the moment there is no possibility to move this clients to the SaaS environment. I would really apreciate if we could solve this in the bc core environment. That would help us to transform innovative companies in the crypto market to the cloud.

jan-bossinfo avatar Nov 24 '21 16:11 jan-bossinfo