Closed dhruvahuja2301 closed 10 months ago
This library support filtering vouchers based on Date. Ex : VoucherTest
As of now we didn't added support to get voucher's based on Ledger (I am planning to add them in future for fetching vouchers based on ledger,stockitem ..etc.,)
For now, you can use filters. supported by this library.
var vchs = await _tallyService.GetVouchersAsync<Voucher>(new RequestOptions()
{
FromDate = new(2022, 4, 1),
ToDate = new(2023 3, 31),
Filters = new List<Filter>() { new("TC_VCHLEDGFILTER","$PartyName =LedgName") }
});
I tried calling the function but getting error
TypeError: No method matches given arguments for TallyService.GetVouchersAsync: (<class 'TallyConnector.Core.Models.RequestOptions'>)
below is my code
reqoptions.FromDate=DateTime(2023,4,1)
reqoptions.ToDate=DateTime(2024,3,31)
print(reqoptions.FromDate)
print(reqoptions.ToDate)
reqoptions.Filter = List[Filter]()
reqoptions.Filter.Add(Filter("TC_VCHLEDGFILTER","PartyName ="+LedgName))
print(tally.GetVouchersAsync(reqoptions).Result)
you are using which version of tallyconnector?
I had picked the latest one from here https://github.com/saivineeth100/Python_Tally/tree/main
Change code to
tally.GetVouchersAsync[Voucher](reqoptions).Result
and update the lib folder, pushed new files now
Below code works (python) but it doesn't give list of inventories
reqoptions.Filters = List[Filter]()
reqoptions.Filters.Add(Filter("TC_VCHLEDGFILTER","$PartyName=ABCD EFGH"))
Is there another filter to get the purchase and receipt details to for a specific ledger?
Below code works (python) but it doesn't give list of inventories
reqoptions.Filters = List[Filter]() reqoptions.Filters.Add(Filter("TC_VCHLEDGFILTER","$PartyName=ABCD EFGH"))
There fetch list property in request option mention what you want there , For EX: refer -This FetchList Also refer tests even though its in c#, concept is same
Is there another filter to get the purchase and receipt details to for a specific ledger?
Purchase will be there in purchase vouchers so you need to filter based on property vouchertypename Ex : reqoptions.Filters.Add(Filter("TC_VCHTYPEFILTER","$vouchertypename={Constants.VoucherType.PurchaseVoucherType }"))
Also create a new issue for every new query and since you are using python create an issue here
Is there a way to get all the vouchers for a time period for a ledger using python?
I am able to get all ledgers, but i am not able to find how to put a specific ledger in filter for GetVouchersAsync function