microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

More than 5 decimal places for a currency - Bitcoin #5682

Open OnPointian opened 4 years ago

OnPointian commented 4 years ago

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

nicolassaleron commented 4 years ago

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

OnPointian commented 4 years ago

Hi @nicolassaleron,

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

rdebath commented 4 years ago

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.

jan-bossinfo commented 2 years ago

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.