Hi,
I need to calculate the cumulative sum for the <VFRCA1> field.
Anyone can help me?
Sample input:
<Line>
<VFCINO>007692175</VFCINO>
<VFVDSC>INVOICE</VFVDSC>
<VFRCA1>121.32</VFRCA1>
<VFRCA2>121.32</VFRCA2>
<VFIVDT>2020-01-08</VFIVDT>
<VFDUDT>2020-03-16</VFDUDT>
<TextBlock Label="Order line text" Type="OrderLineText" Subtype="PostText"/>
</Line>
<Line>
<VFCINO>007692181</VFCINO>
<VFVDSC>INVOICE</VFVDSC>
<VFRCA1>817.85</VFRCA1>
<VFRCA2>817.85</VFRCA2>
<VFIVDT>2020-01-08</VFIVDT>
<VFDUDT>2020-03-16</VFDUDT>
<TextBlock Label="Order line text" Type="OrderLineText" Subtype="PostText"/>
</Line>
<Line>
<VFCINO>007700743</VFCINO>
<VFVDSC>INVOICE</VFVDSC>
<VFRCA1>119.33</VFRCA1>
<VFRCA2>119.33</VFRCA2>
<VFIVDT>2020-01-24</VFIVDT>
<VFDUDT>2020-03-16</VFDUDT>
<TextBlock Label="Order line text" Type="OrderLineText" Subtype="PostText"/>
</Line>
<Line>
<VFCINO>007709766</VFCINO>
<VFVDSC>INVOICE</VFVDSC>
<VFRCA1>170.63</VFRCA1>
<VFRCA2>170.63</VFRCA2>
<VFIVDT>2020-02-13</VFIVDT>
<VFDUDT>2020-04-15</VFDUDT>
<TextBlock Label="Order line text" Type="OrderLineText" Subtype="PostText"/>
</Line>
Sample Output:
|
Debits |
Balance |
007692175 |
121.32 |
121.32 |
007692181 |
817.85 |
939.17 |
007700743 |
119.33 |
1058.5 |
007709766 |
170.63 |
1,229.13 |
Calculation:
Credit |
Balance |
121.32 |
121.32 |
817.85 |
121.32 + 817.85 = 939.17 |
119.33 |
939.17 + 119.33 =1058.5 |
170.63 |
1058.5 + 170.63 =1,229.13 |
Thanks
Nuz