Dear Experts, I am trying to filter voucher type in the bills receivables report, but unable to fetch the Vouchertype name in that report, please guide me My code is: [#Line: BILLCol1] Local:Field:BillType:Info:"VCH TYPE" [#Line: BILLCol2] Local:Field:BillType:Info:"" [#Field: BILLFixed] Add:Field:Before:BILLDate:BillType [Field:BillType] Use : ShortNameField Set as : $BillType;CurLangVoucherTypeName Width : @@NumberWidth + 1 [#Collection: Company Receivables] ; Walk:Ledger Entries ; Walk:Inventory Entries Compute:Billtype:$Name:VoucherType:$VoucherTypeName
Bills Receivable and Bills Payable has collection of BILLS .... hence there is no direct co-relation with Entries in order for you to extract the Vchtype. You will need to make a FUNCTION to extract the VchType from the bill name and display it in your field.
just for the understanding, check this [#Collection: Company Receivables] Compute : Billtype : $LedgerEntries[1].VoucherTypeName
I WRITE THIS LIKE BELOW BUT NOT WORKING -"SAL IS SALES VOUCHER TYPE" -Kindly suggest [#Collection: Company Receivables] Compute : Billtype : $LedgerEntries[1].VoucherTypeName ;Filter:JJJ [System:Formula] JJJ :$VoucherTypeName CONTAINS "SAL"
In your field do it like this [Field: MyVchTypeField] Set as:$LedgerEntries[1, @@IsSalVchType].VoucherTypeName [System:Formulas] IsSaleVchType:$VoucherTypeName contains "SAL"
HIMANSHUBHAI its working replace of "Vchtype field" perfectly , but not filtering data of "SAL" vouchertype
Great, Yes You need to replace the field name as per your report. It won't filter the other fields directly But you can use the same approach to fetch other things as well Example:How to fetch Invoice Amount of Voucher Type containing "SAL" [Field: MyInvAmtField] Set as:$LedgerEntries[1, @@IsSalVchType].Amount [System:Formulas] IsSaleVchType:$VoucherTypeName contains "SAL" Note: No need to define system formulas again and again
Do like this in your collection [Collection:MyBillsCollection] Type:Bills Filter:IsSaleVchTypeBill [System:Formulas] IsSaleVchTypeBill:NOT $$IsEmpty:$LedgerEntries[1, @@IsSaleVchType].MasterID IsSaleVchType:$VoucherTypeName contains "SAL"