我正在为1个账户项目工作,我卡在1个地方。需要计算借方的运行余额
表是借记
ID Debit Credit A B C
1 1000.00 900.00 0 0 1000.00
2 450.00 425.00 0 450.00 0
3 500.00 490.00 500.00 0 0
4 600.00 599.00 600.00 0 0
5 748.00 700.00 0 748.00 0
Now if we sum the credit it will be = 3114,
What I have to do here is whatever total credit I have it has to start from top (A+B+C) - 3114
So It will make C = 0 and my new credit will be 3114-1000=2114,
Then in my id=2 it will do the same thing (A+B+C) - 2114
so now B will be 0 and my new credit will be 2114-450=1664
所有的计算后,我的最终输出应该是
ID Debit Credit A B C
1 1000.00 900.00 0 0 0.00
2 450.00 425.00 0 0.00 0
3 500.00 490.00 0.00 0 0
4 600.00 599.00 0.00 0 0
5 748.00 700.00 0 184.00 0
如果我们试图(和A +总和B +总和C) - 信贷,数字将是一样的,但它会出现在A列,所以在我认为以上计算必须应用的所有头脑风暴之后。
有没有人有任何想法如何实现这一点。
任何帮助,将不胜感激。
我不明白你在这里计算总运行逻辑。 –
你不明白哪个逻辑? –