I need to get result from Existing Table and my current result is like
Code Name Branch Dr Cr Net
1001 Closing Stock UP 150000 195000 -45000
1001 Closing Stock DL 159.74 0 159.74
1001 Closing Stock CH 0 24.37 -24.37
1002 IGST Payable UP 0 135.37 -135.37
1002 IGST Payable DL 0 200 -200
1002 IGST Payable CH 200 0 200
1003 Sundry Debtors UP 15767000 0 15767000
1003 Sundry Debtors DL 0 181716 -181716
Note :
- If Branches Increase then Branch wise (Debit,Credit,Net) Fields should be Create automatically.
And Result should be like this
Code Name UPDr UPCr UPNet CHDr CHCr CHNet DLDr DLCr DLNet
1001 Stk 1500 1950 -450 0 24.37 -24.37 159 0 159.74
1002 IGST 0 135.37 -135 200 0 200 0 181 -181
1003 Sund 157 0 157 159 0 159 200 0 200
Please help for the same.