Hey Everyone.
I have created a hypothetical task in which I am trying to perform a mathematical calculation in Business Central and record the output values in a subledger account. An example of the calculation is
Interest on Savings = $50 * 0.047 (interest rate) * 31/365 (number of days in a month divide by number of days in a year) = $0.20
I have done a similar calculation when i wrote a C++ code in which I would write a procedure and call that procedure to perform the calculation but how can i accomplish something similar in Visual Studio Code in Business Central. I know that I can use CodeUnit which is similar to a procedure I believe in C++ but my worry is how do I record the output into a GL account? Any thoughts would be nice or any experience with writing a similar code with mathematical calculation would also be appreciated.