Hi All,
This is my table(below), here i should calculate the "cash advance outstanding" based on the "Requisition date" in Ascending order for the person , and i should start with zero outstanding, if i select first date, the outstanding amount(OA) for the first date should be zero, then for the second date, it should show the first date outstanding amount, and for the third date it should show by adding the 1st+2nd date OA and so on..
How to achieve this logic by x++. Please share the syntax.
Ex.,
(if i select "RA-001607" then it should sum the "Req cash advance" for the Requisition date, which are all lesser than "26/01/2015")
| RequisitionNumber |
HcmPersonnelNum |
ReqCashAdvance |
RequisitionDate |
CashAdvanceOutstanding |
| RA-001315 |
91000091 |
5,000.00 |
14/01/2015 |
0.00 |
| RA-001316 |
91000091 |
5,000.00 |
14/01/2015 |
0.00 |
| RA-001546 |
91000091 |
3,000.00 |
22/01/2015 |
0.00 |
| RA-001607 |
91000091 |
7,000.00 |
26/01/2015 |
0.00 |
| RA-001772 |
91000091 |
3,000.00 |
03/02/2015 |
0.00 |
| RA-001773 |
91000091 |
2,250.00 |
03/02/2015 |
0.00 |
| RA-003545 |
91000091 |
5,200.00 |
28/05/2015 |
0.00 |
| RA-003590 |
91000091 |
0.00 |
01/06/2015 |
0.00 |
| RA-003593 |
91000091 |
5,200.00 |
01/06/2015 |
0.00 |
*This post is locked for comments
I have the same question (0)