I am trying to get all ledger details through ODBC. In few cases, a voucher has multiple ledger entries with the same name. Whats happening is ODBC is only able to pick the first entry for that ledger and ignoring the others as you can see in the screenshot below. How do i get all the entries along with their bill transaction details? Any help is much appreciated [Collection : RTSAllVouchers2] Type: Voucher IsODBCTable: Yes Fetch: Vouchernumber,date,vouchertypename [Collection : Reccoll] Source Collection: RTSAllVouchers2 Walk : LedgerEntries by : Vouchernumber:$Vouchernumber by : Date:$Date by : VoucherTypeName:$VoucherTypeName by : PartyLedgerName:$PartyLedgerName by : PartyName:$PartyName by : LedgerName:$LedgerName by : BillRef : $.Ledgerentries[1].BILLALLOCATIONS[1].Name by : BillType : $.Ledgerentries[1].BILLALLOCATIONS[1].BillType Compute:Amount:$Amount ISODBCTable : Yes
[Collection : RTSAllVouchers2] Type: Voucher [Collection : Reccoll] Source Collection: RTSAllVouchers2 Walk : LedgerEntries Fetch: date,vouchertypename,Vouchernumber,PartyLedgerName,PartyName Compute:LedgerName:$LedgerName Compute:BillRef :$.Ledgerentries[1].BILLALLOCATIONS[1].Name Compute: BillType: $.Ledgerentries[1].BILLALLOCATIONS[1].BillType Compute:Amount:$Amount ISODBCTable : Yes
Thanks a lot Sudhir, it works now! However bill ref is still not showing the correct value as attached. Any way to fix that?
Total is fine. I was referring to the bill reference numbers. It is showing the value as of the first entry for all the entries. MNF/MH/2021/0279 MNF/MH/2021/0279 MNF/MH/2021/0279 MNF/MH/2021/0279 MNF/MH/2021/0279
Thanks for your reply! I tried the below code but still getting the same value repeated as in screenshot shared above [Collection : Reccoll] Source Collection: RTSAllVouchers2 Walk : LedgerEntries Fetch: date,vouchertypename,Vouchernumber,PartyLedgerName,PartyName Compute:LedgerName:$LedgerName Compute:BillRef :$.Ledgerentries[$$Line].BILLALLOCATIONS[$$Line].Name Compute: BillType: $.Ledgerentries[$$Line].BILLALLOCATIONS[$$Line].BillType Compute:Amount:$Amount ISODBCTable : Yes
I tried this as well. Still doesn't work Compute:BillRef :$.Ledgerentries[1].BILLALLOCATIONS[$$Line].Name Compute: BillType: $.Ledgerentries[1].BILLALLOCATIONS[$$Line].BillType
@Amit Kamdar Any idea how i can get this? My guess is bill reference details are coming from pending bills. How do we fetch that?
@Amit Kamdar Still doesn't seem to work. See attached screenshot. Is there a way to see the bill allocations table alone?
Hey Samiksha, Thanks for your response. Can you please elaborate? I am not following. I am very new to this
Am in learning mode too....... but from what I know and by logic........ Try to get / extract your value from Vouchers with a Function.......... then compute that in your required collection.
I changed my code to below and now it works for target 1, however target 2 i am still getting only the top row. [Collection : Reccoll] Source Collection: RTSAllVouchers2 Walk : LedgerEntries Compute: date:$date Compute: vouchertypename :$vouchertypename Compute: vouchernumber :$vouchernumber Compute: partyledgername :$partyledgername Compute: partyname :$partyname Compute:LedgerName:$LedgerName Compute:BillRef :$BILLALLOCATIONS.Name Compute: BillType: $BILLALLOCATIONS.BillType Compute:Amount:$Amount ISODBCTable : Yes For target 2, i wrote a code as below but still not getting the sub allocations bill wise according to the target2 screenshot. DO I NEED TO SPECIFY A DIFFERENT CHILD OF/USE BATCH ALLOCATIONS? Please advise [Collection : PurOrd_VchSrc] Type : Vouchers : Voucher type Child of : $$VchTypeReceipt Belongs To : Yes Fetch: date,vouchertypename,Vouchernumber,PartyLedgerName,PartyName Compute:LedgerName:$LedgerName Compute:BillRef :$BILLALLOCATIONS.Name Compute: BillType: $BILLALLOCATIONS.BillType Compute : Led1 : $$CollectionField:$BILLALLOCATIONS.Name:1:AllLedgerEntries Compute : Led2 : $$CollectionField:$BILLALLOCATIONS[$$Line].Name:2:AllLedgerEntries Compute:Amount:$Amount ISODBCTable : Yes
[Collection : Reccoll] Source Collection: allvouchers Walk : LedgerEntries,billallocations ; [Collection : Reccoll1] ;Source Collection: reccoll Fetch :LedgerEntries.billallocations.* Compute: date:$date Compute: vouchertypename :$vouchertypename Compute: vouchernumber :$vouchernumber Compute: partyledgername :$partyledgername Compute: partyname :$partyname Compute:LedgerName:$LedgerName Fetch:Isdeemedpositive,Masterid,Alterid Compute:BillRef :$name Compute: BillType: $BillType Compute:Amount:$$AsCrAmt:$Amount Compute: billcreditper:$BILLCREDITPERIOD