Reputation: 161
I want to sum the debit value from the opening balance for first row and minus the credit value and the final is balance....
debit= (opening balance+debit)
balance=debit-Credit
for the second row I want to sum the debit with firstrow balance value
debit= (firstrow balance+secondrow debit)
balance=debit-Credit
using jquery I want a value like that.
Upvotes: 0
Views: 165
Reputation: 66
1.assign ur opening value to a variable outside the loop decimal total=opening;
2.inside the loop use this do this and display the balance decimal balance=total+debit; 3.again assign back to total inside the loop total=balance;
Upvotes: 1