dee pan
dee pan

Reputation: 161

how can I sum the values from the first row using jquery

enter image description here

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

Answers (1)

Jerome Bravin
Jerome Bravin

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

Related Questions