Overview: I have been exporting batched vouchers by making a post request with my program with a "start" date/time equal to the "end" date/time of the previous batch and an "end" time set to the current time. I had success with this until recently when vouchers just stopped getting found as matches by the batch exporter. The records met all three qualifications for batch selection:exportToAccount is TRUE
the invoice's batch group matches the group I am exporting for
and the voucher date is >= the "start" time and <= the "end" time.Since the only thing that I could think might be off was the voucher date matching, I tried posting with a start date significantly in the past, this worked to export all of the vouchers that were failing to export, but it also picked up duplicates. Do you know why using the previous end for "start" and current time for "end" in the batch exports isn't finding newer records? Alternatively, do you have any ideas for how I could avoid picking up duplicates in my exports?
Steps to Reproduce:
- See overview above
Expected Results: All vouchers with creation date within export start and end, for given batch group, with "export to accounting = true, are included in the batch export file
Actual Results: Not all vouchers that meet the expected criteria are exported.
Additional Information: This is a link to the Code base that the user who discovered this issue is working on https://github.com/ameliasutton/Voucher-Export