Calculating the cumulative of the payed amount per month

Please I need the cumulative column to populate with monthly payed amount. So that when you add to the balance, it will give the principal.

Attached are the files for the php script and the report with empty cummulative.

Thanks

EVENT REPORT.pdf (54.1 KB)
pastpayitemreport1.php (8.1 KB)

Hi, could you elaborate a bit more?
What is the problem you are encountering?

Thanks,
I want the script to calculate the monthly cumulative of the deduction made.
Such as;
If Principal = 100,000
Deduction=10,000 (Monthly)
Jan. =10,000
Feb.= 20,000
Mar.=30,000 and so on.

Each staff has at least three deductions, which each deduction cumulatives should be display in the cummulative column in the report page attached. As you can see it is showing zeros instead of cumulatives of the deductions.

I’ll be greatful if you can update it in my script attached.

Thanks once again.

This sounds too much like “here’s my homework, do it for me” to me. (Even if it isn’t actually homework). Are you having any specific problems we can help you with?

As @guido2004 says

Hi, could you elaborate a bit more?
What is the problem you are encountering?

You’ve identified your goal, but what problems are you having getting there?

Please it just to populate the cummulative column in the report generated with deduction cumulatives month by month. I’m just trying to elaborate.

for($month = 0; $month < 3; $month++) {
  $totaldeduction += $deduction
  echo $totaldeduction;
}

?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.