mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
refactor(nestjs): hook up new endpoints
This commit is contained in:
15
packages/server/src/utils/running-balance.ts
Normal file
15
packages/server/src/utils/running-balance.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
export const runningBalance = (amount: number) => {
|
||||
let runningBalance = amount;
|
||||
|
||||
return {
|
||||
decrement: (decrement: number) => {
|
||||
runningBalance -= decrement;
|
||||
},
|
||||
increment: (increment: number) => {
|
||||
runningBalance += increment;
|
||||
},
|
||||
amount: () => runningBalance,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user