Commit 2124bdbb authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 6fac318f
......@@ -152,9 +152,14 @@ async function run() {
if (arrDate[0].sum === 0)
return run()
let worth = (balance - lastBalance) / (arrDate[0].sum)
// let worth = (balance - lastBalance) / (arrDate[0].sum)
let allMonthLoss = 0
for (let i = 0; i < dates.length; i++)
if (dates[i].profit < 0)
allMonthLoss = allMonthLoss + dates.profit[i]
let worth = balance-allMonthLoss
if (worth > 0 && worth > base) {
if ( worth > base) {
base = worth
console.log(arrDate[0].sum, balance - lastBalance, worth)
let arr5 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment