Collection of global functions
I just finished building a relatively large, I think, CRM and Project Management application which required a bunch of global functions. The more generic I've shared at : https://github.com/rmcilmoyle/ninox
3 replies
-
Looks great, thanks for sharing Roger.
-
I have others that focus on providing a complete project management suite that provides; waterfall, Agile, and Hybrid. Those need a little tidy work before I share as they are somewhat specific to how we project manage.
-
Hi Roger, here is set of additional functions that you can add to your project. These are functions used in excel to calculate interest rates and annuities
function vpm(k : number,n : number,t : number) do
if n = 0 then
0
else
if t = 0 then
k / n
else
let Pv := t;
let APR := number(k);
let R := APR / 100 / 12;
let numerator := Pv * R;
let x := 1 + R;
for i in range(1, n) do
x := x * (1 + R)
end;
let denominator := 1 - 1 / x;
numerator / denominator
end
end
end;
function fv(Pv : number,R : number,n : number) do
let y := 1 + R;
let x := y;
for i in range(1, n) do
x := x * y
end;
Pv * x
end;
function princPer1(k : number,n : number,t : number) do
if n = 0 then
k
else
if t = 0 then
vpm(k, n, t)
else
(k * t) / (pow(1 + t, n) - 1)
end
end
end;
function amortissementPn(k : number,n : number,t : number,p : number) do
let A := princPer1(k, n, t);
if p = 1 or t = 0 then
A
else
pow(1 + t, p - 1) * A
end
end;
function intPer(k : number,n : number,t : number,p : number) do
let m := vpm(k, n, t);
let apn := amortissementPn(k, n, t, p);
m - apn
end
Content aside
- 4 yrs agoLast active
- 3Replies
- 1051Views